<s>[INST] How find $a$ such that $x^2-\sqrt{a-x}=a$ has exactly two real solutions Consider the equation
$$ x^2-\sqrt{a-x}=a.$$ I wish to determine the values of $a$ for which the above equation has exactly two real solutions (for $x$).
My idea:
$$a-x=(x^2-a)^2=x^4-2ax^2+a^2\Longrightarrow f(x)=x^4-2ax^2+x+a^2-a=0$$ and we must have
$$a-x\ge 0$$
$$x^2= a+\sqrt{a-x}\ge a,$$
so $f(x)=x^4-2ax^2+x+a^2-a=0$ has only real solution $x$, and this solution $x^2\ge a, x\le a.$ But can I use this to find the possible values of $a$?
then we have $f''(x)=0 ?$ 
 $$\Longrightarrow f'(x)=4x^3-4ax+1,\Longrightarrow f''(x)=12x^2-4a=0$$
then $$12x^2=4a\Longrightarrow a=3x^2>0$$
so $$ a^2\le \sqrt{\dfrac{a}{3}}\le a$$
$$\Longrightarrow \dfrac{1}{3}\le a\le \sqrt[3]{\dfrac{1}{3}}$$
my reslut is true?and I think this problem have other nice methods.
I hope someone can write the  final results，because I don't know the correct result.Thank you everyone
 [/INST] Continuing from the moment of squaring both parts of the equation, we will solve the equation with respect to the parameter $a$. From $x^4-2ax^2+x-a+a^2=0$ we have:
$$a^2-\left(2x^2+1\right)a+\left(x^4+x\right)=0 \Rightarrow \left(a-x^2-x\right)(a-x^2+x-1)=0.$$
Now find $x$ in terms of $a$:
$$x=\frac{1\pm \sqrt{4a-3}}{2} \text{ or } x=\frac{-1\pm\sqrt{4a+1}}{2}.$$
Plugging this values in the initial equation we will get that $x=\dfrac{-1-\sqrt{4a+1}}{2}$ and $x=\dfrac{1+\sqrt{4a-3}}{2}$ are solutions. Then for $a\in\left[-\dfrac{1}{4}; 0\right]$ we have two solutions. When $a\in\left(0; 1\right)$ only one solution, because one of the root on this interval is bigger than $a$. For $a\in\left[1;+\infty\right)$ we have two solutions.
Answer: $a\in\left[-\dfrac{1}{4};0\right]\cup\left[1;+\infty\right).$
</s>