Factorizing Equations I am solving some questions given as assignment and I am having trouble understanding why the  method I am using is not working.
The question is Factorize the following:
$$ a^2+4b^2\label{eq:i}\tag{i}$$
$$9a^2+16b^\label{eq:ii}\tag{ii}2$$
$$3x^2+3y^2\label{eq:iii}\tag{iii}$$
I solved the first question using the method,
$$a^2+4b^2=0$$
$$a^2=-4b^2$$
$$a=\sqrt{-4b^2}$$
$$a=\pm2bi$$
$$a^2+4b^2=(a+2bi)(a-2bi)$$
But the same method doesn't works for the remaining two questions.
For $9a^2+16b^2$ I get $$9a^2+16b^2=0$$
$$9a^2=-16b^2$$
$$a^2=\frac{-16b^2}{9}$$
$$a=\pm\frac{4bi}{3}$$
$$(a+\frac{4b^2}{3})(a-\frac{4b^2}{3})$$ where the correct answer is $$(3a+4bi)(3a-4bi)$$
For $3x^2+3y^2$ using the same method, I get $$(x+iy)(x-iy)$$ where the correct answer is $$3(x+yi)(x-yi)$$.
I noticed that this method works if when I don't simplify the L.H.S of $\eqref{eq:ii}$ I get the correct answer
$$9a^2+16b^2=0$$
$$9a^2=-16b^2$$
$$3a=\pm4bi$$
$$(3a+4bi)(3a-4bi)$$
My questions are:

*

*Is this the correct method to factorize these type of equations?

*If not then why does this method works for specific cases? Was it just a coincidence? Or is there more to it?

*Also why did it work for $\eqref{eq:ii}$ when I didn't simplify the L.H.S of the  equation?

 A: You should first factorize common factors if there is anything, e.g.: $3x^2+3y^2=3(x^2+y^2)$. Now, all the questions are sums of squares, for example $9a^2+16b^2=x^2+y^2$. This is factored as $(x+iy)(x-iy)$ for example, if you are allowed to factor using complex numbers.
A: I don't fully understand what you are doing, but here's how I would do it.
First, notice you are factorizing equations, so you are free to multiply or divide your expression by any constant. This means that if I take the equation
$$A a^2 + B b^2 = 0 \; ,$$
then the solution will be the same as the one for the equation
$$a^2 + \frac{B}{A} b^2 = 0 \; .$$
Next, note that
$$ (a+ x b) (a- x b) = a^2- x^2b^2 \; .$$
This can be seen the easiest by labeling $x b \rightarrow b'$ or any other variable.
Therefore the factorization will be
$$A a^2 + B b^2 = 0 \; \rightarrow \left(a+\sqrt{-\frac{B}{A}} b\right)\left(a-\sqrt{-\frac{B}{A}} b\right) = 0$$
So for the two examples you would get
$$a^2+4b^2 =0 \rightarrow (a-2ib)(a+2ib)=0 \\
9a^2+16b^2 = 0 \rightarrow \left(a-\frac{4}{3}ib\right)\left(a+\frac{4}{3}ib\right)=0 \\
3x^2+3y^2 =0 \rightarrow (x-iy)(x+iy)=0
 $$
Again, the only difference would be how you are handling the division/multiplication with a constant, which you are free to do if you are solving equations where your polynomial is equal to zero. You might alternatively try the approach
$$ A x^2 + B y^2 = (\sqrt{A} x + \sqrt{B} i y)(\sqrt{A} x - \sqrt{B} i y) \; ,$$
which will give the prefactors that I think you expect to get, but then again, for equations, it's the same thing.
