2.13. Solve the equation $\sqrt{a-\sqrt{a+x}}=x$.
2.13. By getting rid of the radicals, we first arrive at the equation $a-\sqrt{a+x}=x^{2}$, and then to the equation $\left(a-x^{2}\right)^{2}=a+x$, i.e.

$$
x^{4}-2 a x^{2}-x+a^{2}-a=0
$$

With respect to $a$, this is a quadratic equation. Solving it, we get two solutions:

$$
\begin{gathered}
a=x^{2}+x+1 \\
a=x^{2}-x
\end{gathered}
$$

Solving these quadratic equations with respect to $x$, we obtain four solutions:

$$
\begin{gathered}
x_{1,2}=-\frac{1}{2} \pm \sqrt{a-\frac{3}{4}} \\
x_{3,4}=\frac{1}{2} \pm \sqrt{a+\frac{1}{4}}
\end{gathered}
$$

Now let's check if any extraneous roots appeared when getting rid of the radicals (i.e., when squaring). For this, we need to check that $x>0$ and $a>x^{2}$. Only the root $-\frac{1}{2}+\sqrt{a-\frac{3}{4}}$ satisfies these conditions for $a \geqslant 1$; for $a<1$ there are no solutions.