Find $a$ such that $\log _{2}^{2}x-{{\log }_{\sqrt{2}}}x=a-\sqrt{a+{{\log }_{2}}x}$ has exactly $2$ solutions 
Find $a$ so that equation $\log _{2}^{2}x-{{\log }_{\sqrt{2}}}x=a-\sqrt{a+{{\log }_{2}}x}$ has exactly $2$ solutions.

My approach: Since that $$\log_{2}(x)=\frac{\ln(x)}{\ln(2)} \quad \text{and} \quad \log_{\sqrt{2}}(x)=\frac{\ln(x)}{\ln(\sqrt{2})}$$
then, we can re-write the equation as $$\left(\frac{\ln(x)}{\ln(2)}\right)^{2}-\left( \frac{\ln(x)}{\ln(\sqrt{2})}\right)^{2}=a-\sqrt{a+\frac{\ln(x)}{\ln(2)}}$$
Let $t:=\ln(x)$ so the equation above we can re-write in terms  of $t$ as $$\left(\frac{1}{\ln(2)}t\right)^{2}-\left( \frac{1}{\ln(\sqrt{2})}t\right)^{2}=a-\sqrt{a+\frac{1}{\ln(2)}t}$$
Then, the idea that I was thinking is squaring both sides of the equation, but there appears an equation of degree 4 that is difficult to solve. How could I continue from there? or maybe a simpler approach?

New approach: Using the point out of @Ross Millikan and since that $$\log_{\sqrt{2}}(x)=\frac{\log_{2}(x)}{\log_{2}(\sqrt{2})}=2\log_{2}(x)$$
and let $t:=\log_{2}(x)$ so the equation can be we-write in terms of $t$ as $$t^{2}-2t=a-\sqrt{a+t} \implies t^{2}-2t\color{blue}{+1}=a-\sqrt{a+t}\color{blue}{+1} \implies (t-1)^{2}=a+1-\sqrt{a+t}$$
or maybe $$ t^{2}-2t=a-\sqrt{a+t} \overset{y^{2}=a+t}{\implies} (y^{2}-a)^{2}-2(y^{2}-a)=a-y^{2}$$
solving a little the expression above we can see that $$y^{4}-2y^{2}a+a^{2}-2y^{2}+2a-a+y^{2}=0$$
how can I solve this?
 A: Consider the function $$f(x)=\left(\log_2 x\right)^2-\log_{\sqrt 2} x-a+\sqrt{a+\log_2 x},$$ defined for all $x\ge 2^{-a}.$ Then we find that $$f'(x)=\frac{1}{2x\log_e 2\cdot \sqrt{a+\log_2 x}}\left(4\log_2 x\sqrt{a+\log_2 x}-4\sqrt{a+\log_2 x}+1\right).$$ Letting $M=\log_2 x,$ we see that $f'(x)=0$ whenever $16(M+a)(M-1)^2=1,$ or in other words when $$g(M)=16M^3+16(a-2)M^2+16(1-2a)M-1=0,$$ which is to say, when $\log_2 x =m,$ for some real number $m$ a root of the cubic in $M.$ This happens either once or thrice.
Now for exactly two roots of the original equation we must have a unique solution to the cubic. We find that the discriminant of $g'(M)$ is given by $$\Delta=16^2(a-2)^2-3\times 16\times 16(1-2a)=16^2(a+1)^2>0$$ for all real values of $a.$ Thus to ensure a unique solution we must have that $$g\left(\frac{a-2+|a+1|}{3}\right)g\left(\frac{a-2-|a+1|}{3}\right)>0.$$ This gives us a preliminary condition on $a.$
Now for the values of $a$ satisfying the inequality above we have ensured that $f'(x)$ vanishes exactly once, namely whenever $x=2^m,$ where $m=m(a)$ is the unique solution of $g(M)=0.$ Finally, since for $x\to +\infty,$ we have that $f(x)>0$ and for $x=2^{-a}$ we have that $f(x)=a(a+1),$ it follows that if $a=-1$ or $a=0$ we already have one root, and if these values of $a$ satisfy the previous condition then we have found two values of $a.$ On the other hand if $-1<a<0$ then there cannot be two roots if $a$ also satisfies the previous condition.
This leaves us with the case when $a<-1$ or $a>0,$ so that $f(2^{-a})>0.$ Thus in this case there are also exactly two roots provided the previous condition is satisfied and also the minimum value $f(2^m)$ is negative. This gives us a further condition on $a,$ namely that $(m-1)^2-(1+a)+\sqrt{a+m}<0.$
In summary we must have that $a$ satisfies the following conditions:
(1) $g\left(\frac{a-2+|a+1|}{3}\right)g\left(\frac{a-2-|a+1|}{3}\right)>0,$
and exactly one of the following:
(2) $a=-1$ or $a=0,$
or
(3) $a<-1$ or $a>0$ and $(m-1)^2-(1+a)+\sqrt{a+m}<0.$
Given these, then $f(x)=0$ has exactly two roots.
PS. Note that the conditions are to be selected as (1) and (2) or (1) and (3).
A: Somewhat oddly, this becomes easier by first eliminating $a$.  Using your substitution for $t$, let $b=\sqrt{a+t}$.  Then $a=b^2-t$ and the equation becomes
$$t^2 - 2t = b^2 - t - b$$
Or $$
0 = t^2 - b^2 - (t - b)
  = (t-b)(t+b-1)
$$
At this point it might be tempting to get back to $t$ by replacing $b$ with $\sqrt{a+t}$.  Don't do it.  When solving equations with radicals, it's almost always better to solve for the value of the radical instead of solving for the original variable.  The reason is that constraint on $b$ is just $b\ge0$, which is very convenient.  So keep solving for $b$ by getting rid of $t$ with $t = b^2-a$.
$$
\begin{cases}
(b^2 - b - a)(b^2 + b - a - 1)=0\\[2ex]
b\ge0
\end{cases}
$$
The 4 solutions for $2b$ and the requirement for $b\ge0$ are:

*

*$1-\sqrt{1+4a}$,  where $-1\le4a\le0$

*$1+\sqrt{1+4a}$,  where $-1\le4a$

*$-1+\sqrt{5+4a}$,  where $-4\le4a$

*$-1-\sqrt{5+4a}$, never non-negative

Whenever root 1 is valid, so are roots 2 and 3.  So, aside from degenerate roots, the only way to just have two roots is with roots 2 and 3 but not 1.  So, $a>0$
Degenerate Roots
It is important to remember that roots can be degenerate.  While we established that for $-1\le4a\le0$, there are 3 roots, we cannot eliminate that range just yet.  What if there's some value of $a$ in that range where 2 of the 3 roots are equal.
There are two possibilities

*

*$b_1 = b_2$
Then, $4a = -1$ and the third root $b_3$ equals the other two so we will have a triple degenerate root and only 1 distinct root.


*$b_3 = b_1$ or $b_3=b_2$
Then $-1+\sqrt{5+4a} = 1 \pm\sqrt{1+4a}$
But, since $$(\sqrt{5+4a}\pm\sqrt{1+4a})(\sqrt{5+4a}\mp\sqrt{1+4a})=4$$
If $\sqrt{5+4a}\pm\sqrt{1+4a} = 2$, then $\sqrt{5+4a}\mp\sqrt{1+4a} = 2$ from which it follows that $\sqrt{1+4a}=0$ and again we would end up with a triple degenerate root.
This leaves us with $a>0$ as the solution
