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
 A: To get a better overview we can argue as follows: Substitute $a-x=:y$. For a given value of the parameter $a\in{\mathbb R}$ the equation
$$\sqrt{a-x}=x^2-a\tag{1}$$  has two real solutions $x$ iff the equation
$$\sqrt{\mathstrut y}=(y-a)^2-a$$
has two real solutions $y$. The graph of the left hand side as a function of $y$ is the upper half of a horizontal parabola, and the graph of the right hand side is a  vertical parabola with its apex at $(a,-a)$. When $a\leq-1$ the two graphs don't intersect. Letting $a$ increase from $-1$ the vertical parabola moves southeast without changing its shape, and there will be a value $a_0<0$ of $a$ where the two parabolas just touch. From then on we have two points of intersection  until $a=0$. For $0<a<1$ there is just one point of intersection, and for $a\geq1$ there are again two of them. 
The value $a_0$ is obtained by solving the system
$$\sqrt{\mathstrut y}=(y-a)^2-a,\qquad{1\over 2\sqrt{\mathstrut y}}=2(y-a)$$
for $a$ and $y$. By trial and error one finds the solution $(a_0,y_0)=(-{1\over4},{1\over 4})$.
It follows that the set $S$ of $a$'s for which we have two real solutions of $(1)$ is given by $$S=\bigl ]-{1\over4},0\bigr]\cup[1,\infty[\ .$$
A: Hint:$x^2-a=\sqrt{(a-x)}\ge 0$.So we have $x\le a\le x^2$
A: Another idea is:
Equation is equivalent to the system
1) $\sqrt{a-x}=y$ 
2) $\sqrt{a+y}=|x|$ 
with conditions
3) $x\leq a$ and $y\geq0$, $y \geq -a$.
Are obtained by squaring
1') $ a-x = y^{2}$
2') $ a+y = x^{2}$.
Subtracting the last equation is obtained:
$(x+y)(1-x+y)=0$ si cazurile $y= -x$ si $y =x-1$.
Replace $ y $ in 2 ') etc...
A: 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).$
