Given a positive integer $n$. Determine all positive real numbers $x$ such that

$$
n x^{2}+\frac{2^{2}}{x+1}+\frac{3^{2}}{x+2}+\ldots+\frac{(n+1)^{2}}{x+n}=n x+\frac{n(n+3)}{2} .
$$
For $1 \leq i \leq n$ it holds that
$\frac{(i+1)^{2}}{x+i}=i+1+\frac{(i+1)^{2}-(i+1)(x+i)}{x+i}=i+1+\frac{i+1-(i+1) x}{x+i}=i+1+\frac{(i+1)(1-x)}{x+i}$,
so we can rewrite the left side of the given equation to

$$
n x^{2}+2+3+\ldots+(n+1)+\frac{2(1-x)}{x+1}+\frac{3(1-x)}{x+2}+\ldots+\frac{(n+1)(1-x)}{x+n}
$$

It holds that $2+3+\ldots+(n+1)=\frac{1}{2} n(n+3)$, so this sum cancels out with $\frac{n(n+3)}{2}$ on the right side of the given equation. Furthermore, we can move $n x^{2}$ to the other side and factor out $1-x$ in all fractions. The equation can thus be rewritten as

$$
(1-x) \cdot\left(\frac{2}{x+1}+\frac{3}{x+2}+\ldots+\frac{n+1}{x+n}\right)=n x-n x^{2} .
$$

The right side can be factored as $n x(1-x)$. We now see that $x=1$ is a solution to this equation. If there were another solution $x \neq 1$, then it would have to satisfy

$$
\frac{2}{x+1}+\frac{3}{x+2}+\ldots+\frac{n+1}{x+n}=n x .
$$

For $0 < x < 1$ it holds that

$$
\frac{2}{x+1}+\frac{3}{x+2}+\ldots+\frac{n+1}{x+n}>\frac{2}{2}+\frac{3}{3}+\ldots+\frac{n+1}{n+1}=n>n x
$$

while for $x>1$ it holds that

$$
\frac{2}{x+1}+\frac{3}{x+2}+\ldots+\frac{n+1}{x+n}<\frac{2}{2}+\frac{3}{3}+\ldots+\frac{n+1}{n+1}=n<n x .
$$

Thus, there are no solutions with $x \neq 1$. We conclude that for all $n$, the only solution is $x=1$.