<s>[INST] Solve the equation $\sqrt{a(2^{x}-2)+1}=1-2^{x}$ for every value of the parameter $a$. Question : Solve the equation $\sqrt{a(2^{x}-2)+1}=1-2^{x}$   for every value of the parameter a.
I have solved the problem as follows
$\sqrt{a\left(2^{x}-2\right)+1}=1-2^{x}$
$a\left(2^{x}-2\right)+1=\left(1-2^{x}\right)^{2}=2^{2 x}+1-2 \cdot 2^{x}=2^{2 x}-2^{x+1}+1$
$a 2^{x}-2 a=2^{2 x}-2^{x+1}$
$2^{2 x}-(a-1) 2^{x}+2 a=0$
$y^{2}-(a-1) y+2 a=0$
$y=\frac{(a-1) \pm \sqrt{(a-1)^{2}-8 a}}{2}=\frac{(a-1) \pm \sqrt{a^{2}-10 a+1}}{2}$
$2^{x}=\frac{(a-1) \pm \sqrt{(a-5)^{2}-24}}{2}$
After this there are so many conditions on a. Do i need to check for each and every value ?
 [/INST] With $z:=2^x-2$, $$\sqrt{az+1}=-z-1$$
or after rewriting,
$$z(z+2-a)=0,z\le-1.$$
Hence
$$z=a-2\le-1,$$ which is $$2^x=a\le1$$
or
$$x=\log_2a,\\0<a\le1.$$
</s>