2. (24th Canadian Mathematical Olympiad) Solve the equation $x^{2}+\left(\frac{x^{2}}{x+1}\right)^{2}=3$ in the set of complex numbers.
2. Since $x^{2}-2 \cdot \frac{x^{2}}{x+1}+\left(\frac{x}{x+1}\right)^{2}=\left(x-\frac{x}{x+1}\right)^{2}=\left(\frac{x^{2}}{x+1}\right)^{2}$, the original equation can be transformed into $x^{2}+\left(\frac{x}{x+1}\right)^{2}-2 \cdot$ $\frac{x^{2}}{x+1}+2 \cdot \frac{x^{2}}{x+1}=3$

which simplifies to $\left(\frac{x^{2}}{x+1}\right)^{2}+2 \cdot \frac{x^{2}}{x+1}-3=0$, or $\left(\frac{x^{2}}{x+1}+3\right)\left(\frac{x^{2}}{x+1}-1\right)=0$. Thus, $\frac{x^{2}}{x+1}=-3$ or $\frac{x^{2}}{x+1}=1$. Solving these equations yields:
$$
x_{1}=\frac{1}{2}(-3+\sqrt{3} \mathrm{i}), x_{2}=\frac{1}{2}(-3-\sqrt{3} \mathrm{i}), x_{3}=\frac{1}{2}(1+\sqrt{5}), x_{4}=\frac{1}{2}(1-\sqrt{5}) .
$$