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 ?
 A: $$\sqrt{a(2^{x}-2)+1}=1-2^{x}\tag1$$
First of all, we have to have
$$a(2^{x}-2)+1\ge 0\qquad\text{and}\qquad 1-2^x\ge 0\tag2$$
Under $(2)$, we have
$$\begin{align}(1)&\implies a(2^x-2)+1=(1-2^x)^2
\\\\&\implies a(2^x-2)+1=1-2^{x+1}+2^{2x}
\\\\&\implies a\cdot 2^x-2a=2^{2x}-2\cdot 2^{x}
\\\\&\implies 2^{2x}+2^x(-2-a)+2a=0
\\\\&\implies (2^x-2)(2^x-a)=0
\\\\&\implies 2^x=2\quad \text{or}\quad 2^x=a\end{align}$$
Now, $2^x=2$ does not satisfy $(2)$.
When $2^x=a$, we have to have $0\lt a\le 1$ from $(2)$.
So, the answer is as follows :


*

*If $a\le 0$ or $a\gt 1$, then there is no $x$ satisfying $(1)$.

*If $0\lt a\le 1$, then $x=\log_2 a$.
A: By letting $y=1-2^x$, you can simplify the problem to:
$$
\sqrt{a(3-y)+1} = y
$$
Since root is non-negative, $y\ge0$. Since $2^x$ is always positive, $y<1$. Thus we want to find the solution of the equation above with the condition $0\le y<1$.
Since both sides are non-negative, we can square them and keep the equality:
$$
a(3-y)+1=y^2\\
y^2+ay - (1+3a)=0
$$
This equation will have the solution when $D=a^2+4(1+3a)\ge 0$.
By solving the corresponding equation, we will get $a\in I_1=(-\infty;-6-4\sqrt2]\cup[-6+4\sqrt2;+\infty)$.
Solution for $y$:
$$
y_{1,2}=\frac12\left(-a\pm\sqrt{a^2+12a+4}\right).
$$
Now let's check when $y\ge0$. For smaller root:
$$
y_1\ge0\\
-a-\sqrt{a^2+12a+4} \ge 0\\
-a \ge \sqrt{a^2+12a+4}\\
a\le0\qquad\text{and}\qquad a^2\ge a^2+12a+4
$$
So, smaller root is always smaller than 0. For larger root:
$$
y_2\ge 0\\
-a+\sqrt{a^2+12a+4} \ge 0 \\
\sqrt{a^2+12a+4}\ge a\\
\text{either}\qquad a<0\qquad \text{or }\qquad a^2+12a+4\ge a^2 \\
\text{either}\qquad a<0\qquad \text{or }\qquad a\ge -1/3
$$
Thus, $y_2\ge 0$ when exists.
Finally, we need to check that $y<1$. We don't need to check the $y_1$, since it already failed previous condition. For larger root:
$$
y_1 < 1\\
-a+\sqrt{a^2+12a+4} < 2\\
\sqrt{a^2+12a+4} < 2+a\\
a\ge-2\qquad\text{and}\qquad a^2+12a+4 < (2+a)^2 \\
a\ge-2\qquad\text{and}\qquad 12a+4 < 4a+4 \\
a\ge-2\qquad\text{and}\qquad a< 0 \\
$$
Thus, $a\in I_1 \cap[-2; 0)=[-6+4\sqrt2; 0)$. Finally, the answer:
When $a\in [-6+4\sqrt2; 0)$, the equation has one root, which is:
$$
x = \log_2\left(1-\frac{\sqrt{a^2+12a+4}-a}2\right).
$$
Note. I didn't include analysis of that expression under the root should be non-negative when was calculating $y\ge0$ and $y<1$, because we already did this analysis, and the corresponding interval would be intersecting the result anyway.
Note 2. We didn't need to check that $a(3-y)+1\ge 0$, because we set it equal to $y^2$ which is always non-negative
A: 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.$$
