<s>[INST] Mistake in solving an equation involving a square root I want to solve $2x = \sqrt{x+3}$, which I have tried as below:
$$\begin{equation}
4x^2 - x -3 = 0 \\
x^2 - \frac14 x - \frac34 = 0 \\
x^2 - \frac14x = \frac34 \\
\left(x - \frac12 \right)^2 = 1 \\
x = \frac32 , -\frac12
\end{equation}$$
This, however, is incorrect.
What is wrong with my solution?
 [/INST] You made a mistake when completing the square.
$$x^2-\frac{1}{4}x = \frac{3}{4} \color{red}{\implies\left(x-\frac{1}{2}\right)^2 = 1}$$
This is easy to spot since $(a\pm b)^2 = a^2\pm2ab+b^2$, which means the coefficient of the linear term becomes $-2\left(\frac{1}{2}\right) = -1 \color{red}{\neq -\frac{1}{4}}$. This means something isn’t correct...
Note that the equation is rewritten such that $a = 1$, so you need to add $\left(\frac{b}{2}\right)^2$ to both sides and factor. (In other words, divide the coefficient of the linear term $x$ by $2$ and square the result, which will then be added to both sides.)
$$b = -\frac{1}{4} \implies \left(\frac{b}{2}\right)^2 \implies \frac{1}{64}$$
Which gets
$$x^2-\frac{1}{4}x+\color{blue}{\frac{1}{64}} = \frac{3}{4}+\color{blue}{\frac{1}{64}}$$
Factoring the perfect square trinomial yields
$$\left(x-\frac{1}{8}\right)^2 = \frac{49}{64}$$
And you can probably take it on from here.
Edit: As it has been noted in the other answers (should have clarified this as well), squaring introduces the possibility of extraneous solutions, so always check your solutions by plugging in the values obtained in the original equation. By squaring, you’re solving
$$4x^2 = x+3$$
which is actually
$$2x = \color{blue}{\pm}\sqrt{x+3}$$
so your negative solution will satisfy this new equation but not the original one, since that one is
$$2x = \sqrt{x+3}$$
with no $\pm$.
</s>