I sincerely apologize in advance for the simple question I am asking but I really cannot live with this doubt in my mind.
I have the following equation to solve analytically: $$\ 0.5q+\sqrt q -2=0$$
Obviously there are different ways to solve it. If I use the substitution $x=\sqrt q$, I can get the solutions to a quadratic-form equation and pick only the positive ones. Then, using the initial definition of $x$, I get the unique solution for $q=1.5279$. However, I also saw a solution which goes as follow:
$$\sqrt q =2-0.5q \to q=(2-0.5q)^2 \to 4+0.25q^2-3q=0,$$ which however yields TWO solutions, $q=1.5279$ and $q=10.47$.
However, by plotting both the initial equation and the last one, I obviously notice that we are dealing with different functions.
Can someone please carefully explain why this happens and if one can actually performs the transformation shown in the last line to find the zeros of the initial function?
Note that first implication: it says that if $q$ is a solution to the first equation, then it is also a solution to the second. It does not say that all solutions to the second equation are solutions to the first. And indeed, if you take the "bad" solution to the second equation, $q = 10.47$, and look at $$ 0.5 q + q^\frac12 - 2 $$ you get a number near $6.4$, so it's definitely not zero.
This is analogous to starting with $$ q = -2 $$ and squaring both sides to get $$ q^2 = 4 $$ which has two solutions: $q = 2, q = -2$. But only one of these two solutions is a solution to the original equation.