<s>[INST] How to find the complex roots of $x^2-2ax+a^2+b^2$? 
How to find the complex roots of $x^2-2ax+a^2+b^2$?

I tried using the quadratic formula:
$$ x_{1,2} = \frac{2a \pm \sqrt {4a^2-4b^2}}{2} = {a \pm \sqrt {a^2-b^2}} = a\pm \sqrt{a-b}\sqrt{a+b}$$
I tried to represent each root as $x+iy$ but got stuck along the way.
What should I do? 
Thanks
 [/INST] Your equation can be rewritten as
$$(x-a)^2=-b^2\iff x-a=\pm ib$$
so the roots are $x_{1,2}=a\pm ib$.

The quadratic formula also gives the right answer, but it should be
$$x_{1,2}=\frac{2a\pm\sqrt{4a^2-4(a^2+b^2)}}2=a\pm\sqrt{-b^2}=a\pm ib$$
</s>