Find the number of real roots for $x+\sqrt{a^2-x^2}=b$, $a>0$, $b>0$, as a function of $a$ and $b$ Given: (1) $x+\sqrt{a^2-x^2}=b$, $(a,b,x)\subset \mathbb R$, $a&gt;0$, $b&gt;0$.
Find: number of roots for (1), given possible values for $a$ and $b$.

This is a question from a book for the preparation for math contests.
It states as final answer: (a) 1 root if $b&lt;a$; and (b) 2 roots if $a&lt;b&lt;a\sqrt{2}$.
I'm having difficulties on finding this answer. I don't know whether it is correct or perhaps I'm not finding the right approach.
I started moving $x$ in (1) to the left, to get
$$\sqrt{a^2-x^2}=b-x$$
Before proceeding with squaring both sides, I saved 2 needed conditions for checking the final solution (c1) $a^2-x^2\ge 0$ and (c2) $b-x\ge 0$. Then squaring both sides, we get:
$$a^2-x^2=b^2+x^2-2bx\Leftrightarrow 2x^2-2bx+(b^2-a^2)=0$$
with discriminant $\triangle$ defined by:
$$\triangle=4(2a^2-b^2)$$
From this it is easy to see that a condition for 2 roots is (c3) $\sqrt{2}a&gt;b,$ and for 1 root is (c4) $\sqrt{2}a=b,$ as $a&gt;0$ and $b&gt;0$. Then I find the roots as $$x=\frac{2b\pm \sqrt{\triangle}}{4}=\frac{b\pm \sqrt{2a^2-b^2}}{2}$$
From this point, I can't see a way to reach the stated answer, if it is right.
Full solutions or helpful hints are welcome. Sorry if it is a duplicate.
As $a&gt;0$, posing $x=as$ and $b=\beta a$, the problem is equivalent to discuss the real roots of
$$s+\sqrt{1-s^2}=\beta$$ with $\beta&gt;0$. The function has real values for $\left| s\right|&lt;1$. Moreover, $f(s)=s+\sqrt{1-s^2}$ has a single maximum at $s=1/\sqrt{2}$ with $f(1/\sqrt{2})=\sqrt{2}$, $f(0)=f(1)=1$ and finally $f(-1)&lt;0$. Thus, there are no real root for $\beta&gt;\sqrt{2}$, 2 real roots for $1&lt;\beta&lt;\sqrt{2}$, a single real root for $0&lt;\beta&lt;1$ and a double root at $\beta=\sqrt{2}$.
it must be $$a\geq |x|$$ and $$b\geq x$$
after squaring we get the equation
$$0=2x^2-2bx+b^2-a^2=0$$
solving this equation we get
$$x_1=\frac{b}{2}+\frac{1}{2}\sqrt{2a^2-b^2}$$
$$x_2=\frac{b}{2}-\frac{1}{2}\sqrt{2a^2-b^2}$$
so we get the following solution set
$$x=b$$ and $a=b$
$$x=\frac{1}{2}(b\pm i\sqrt{b^2-2a^2}$$ and $$0&lt;a&lt;\frac{b}{\sqrt{2}}$$
$$x=\frac{b}{2}$$ and $$a=\frac{b}{\sqrt{2}}$$
$$x=\frac{1}{2}(b\pm \sqrt{2a^2-b^2})$$ and $$\frac{b}{\sqrt{2}}&lt;a&lt;b$$
$$x=\frac{1}{2}(b-\sqrt{2a^2-b^2})$$ and $$a\geq b$$
Observe that i need time nto type all these formulas