Solve for four values of x where x lies in complex plane. I came across this problem and have to find four roots of this equation. Direct multiplication was of no help and factorizing it is a mess.
I tried to factor it using $a^2+b^2=(a+ib)(a-ib) $ 
but was of no help.
$$x^2 + (\frac{ax}{x+a})^2= 3a^2$$
Can anyone through in some ideas?
 A: Wolog $a\neq 0.$ If we substitute $x=ay$, we get completely rid of the $a$:
$$
(ay)^2+\left(\frac{a^2y}{ay+a}\right)^2=3a^2
\;\;\Longleftrightarrow \;\;
y^2+\left(\frac{ay}{ay+a}\right)^2=3
\;\;\Longleftrightarrow \;\;
y^2+\left(\frac{y}{y+1}\right)^2=3
$$
Now we multiply this with $(y+1)^2$ and we get
$$
y^4+2y^3-y^2-6y-3 =0
$$
Now we can cheat a little bit and use e.g. an online solver for roots of polynomials, and we see that the golden ratio $1,618\ldots\ $ seems to be one of the roots, so we can try the factor $y^2-y-1$. And indeed we get
$$
y^4+2y^3-y^2-6y-3 =0
\;\;\Longleftrightarrow \;\;
(y^2-y-1)(y^2+3y+3)=0
$$
Now it is easy to get the $y$. From $x=ay$, we finally get the $x$.
A: Okay I tried to solve this question using two techniques, one is by factorizing and then substitution as below:
$$x^2 +(\frac{ax}{x+a})^2 = 3a^2$$
We can write $ a^2 + b^2$ as $$a^2 + b^2= (a-b)^2 +2ab$$ so $x^2 +(\frac{ax}{x+a})^2$ can be written as $$(x -\frac{ax}{x+a})^2 + 2 * x * \frac{ax}{x+a}$$ $$\implies (\frac{x+ax-ax}{x+a})^2 + 2a*\frac{x}{x+a} = 3a^2 $$ $$\implies (\frac{x}{x+a})^2 + 2a*\frac{x}{x+a} = 3a^2$$
Now substitute $$\frac{x}{x+a} = y$$ $$\implies y^2 + 2a*y= 3a^2 $$$$\implies y^2 + 2a*y-3a^2=0 $$ This becomes $$(y+3a)(y-a)=0 $$
$\implies y=a $ or $y=-3a$
When $y=a$
$$\frac{x^2}{x+a}=a$$ $$\implies x^2-ax-a^2 =0$$ $$\implies x = \frac{a\pm a\sqrt(5)}{2}$$
When $y=-3a$
$$\frac{x^2}{x+a}=-3a$$ $$\implies x^2+3ax+3a^2 =0$$ $$\implies x = \frac{-3a\pm ai\sqrt(3)}{2}$$
