<s>[INST] Solve the equation $\sqrt{x+5}=5-x^2$ Solve the equation $\sqrt{x+5}=5-x^2$. I have tried to make the substitution $x=\sqrt{5}\tan^2 \theta$ and wanted to make use of the identity $\tan^2\theta+1=\sec^2\theta$ but it didn't work out. I also tried to make the substitution $y=x+5$ but it lead to nowhere. Since this was a contest problem, I believe there is a short, elegant and elementary solution, please helps.
 [/INST] Here $5+x\geq 0\Rightarrow x\geq -5$ and $5-x^2\geq 0\Rightarrow x^2-\left(\sqrt{5}\right)^2\leq 0\Rightarrow -\sqrt{5}\leq x \leq \sqrt{5}$
So we get $-\sqrt{5}\leq x \leq \sqrt{5}.$
Now Let $\sqrt{5+x}=y\;,$ Then $$y^2=5+x \tag{1}$$
and equation convert into $$y=5-x^2\Rightarrow x^2=5-y\tag{2}$$
So $$y^2-x^2 = 5+x-(5-y)=(y+x)\Rightarrow (y^2-x^2)=(y+x)$$
So $$(y+x)\cdot(y-x)-(y+x) =0\Rightarrow (y+x)\cdot \left[y-x-1\right]=0$$
So either $y=x$ or $y=x+1$
$\bullet \; $ If $y=x\;,$ Then put into $y^2=5+x\Rightarrow x^2=5+x$
So we get $$\displaystyle x^2-x-5=0\Rightarrow x=\frac{1\pm \sqrt{1+20}}{2}=\frac{1\pm\sqrt{21}}{2}$$
So we get $$\displaystyle x=\frac{1-\sqrt{21}}{2}.$$ bcz here $-\sqrt{5}\leq x\leq \sqrt{5}$
$\bullet \; $ If $y=1+x\;,$ Then put into $y^2=5+x\Rightarrow (1+x)^2=5+x$
So we get $$1+x^2+2x=5+x\Rightarrow \displaystyle x^2+x-4=0\Rightarrow x= \frac{-1\pm\sqrt{17}}{2}$$
So we get $$\displaystyle x= \frac{-1+\sqrt{17}}{2}$$ bcz here $-\sqrt{5}\leq x\leq \sqrt{5}$
So final solution is $\displaystyle x = \left\{\displaystyle  \frac{-1+\sqrt{17}}{2}\;, \frac{1-\sqrt{21}}{2} \right\}$
</s>