3 years without math exercises , today I found a question in Quora about the solution of $x+ix =i$.
So I reasoned this way :
\begin{align} x+ix=i &\implies x=i−ix &\\ & \implies x=i(1−x) &\\ & \implies x/(1−x)=i\\ &\implies x^2/(1−x)^2=−1 \\ &\implies x^2=−[(1−x)^2]\\ & \implies x^2=−[1−2x+x^2] \\ &\implies x^2=−x^2+2x−1\\ &\implies 2x^2−2x+1=0\\ &\implies x^2−x+(1/2)=0 \end{align} $$ a=1\quad b=−1 \quad c=1/2\\ \delta=b^2−4ac =−1=i^2 $$ so
$$x_1=(−b−i)/2∗a=(1−i)/2 \\ x_2=(−b+i)/2∗a=(1+i)/2$$
However the solution, as in site, is only $(1+i)/2$. What am I doing wrong?
Let's keep things simple. Suppose you are given $$x=1$$ Squaring both sides gives $$x^2=1$$ And the solutions of the quadratic equation $x^2=1$ are $x=1$ and $x=-1$. So the squared equation has more solutions that the original equation!
Whenever you square both sides of an equation like this, you must always go back to the original equation at the end, to check whether your solutions are still valid. In this case, you see that the solution $x=-1$ is not a valid solution of the equation $x=1$, so you reject it.
In your case, you must check both your solutions $x_1$ and $x_2$. You will find that only $x_2$ is a valid solution of the original equation. So you must discard $x_1$.
Having said that, there is no need to square both sides to solve your equation. Just write it as $$x(1+i)=i$$ and divide both sides by $1+i$.