<s>[INST] Solution of |x| + 3x = 2 + 6i. Where is an error in my thinking? So I solved the equation: $|x| + 3x = 2 + 6i$ but I don't know where my error is. And I know there is an error because Wolfram Alpha shows that the only solution is $ x = 2i $ . In my calculations I have 2 solutions.
$$|x| + 3x = 2 + 6i$$
$$\sqrt{a^2 + b^2} +3(a + bi) = 2 +6i$$
$$\sqrt{a^2 + b^2} = 2 +6i - 3a -3bi$$
$$\sqrt{a^2 + b^2} = 2-3a +(6 -3b)i$$
$$6 -3b=0$$
$$b=2$$
$$\sqrt{a^2 + 4} = 2-3a $$
$$a^2 + 4 = 4-12a+9a^2 $$
$$8a^2-12a=0 $$
$$4a(2a-3)=0 $$
$$a = 0 || a=3/2 $$
Why $x = 3/2 + 2i$ is not an answer?
 [/INST] When you square both sides of $\sqrt{a^2+4} = 2-3a$, an extra solution is generated.
In particular, the solution $a = 3/2$ is the solution to $\sqrt {a^2+4} = 3a-2$, which is a perfectly valid solution for the squared equation $a^2+4 = (2-3a)^2$.
However for this $a$, $\sqrt{a^2+4} > 0$ but $2-3a < 0$, rendering it invalid for the original equation. For this reason, we must check whether all our solutions satisfy the original equation. There are no invalid steps in your calculations otherwise.
</s>