a thoughtful web.
Share good ideas and conversation.   Login, Join Us, or Take a Tour!
comment by tvirlip
tvirlip  ·  1019 days ago  ·  link  ·    ·  parent  ·  post: Roots, Roots!

Side comment first: yes, root of the polynomial is something that makes it to be equal to zero, so there is 0 in the right side of every equation.

Square equations

You're completely right up to the point where you're trying to find complex roots of a square equation. It is done using exactly the same way as for real roots:

``  x = (-b ± √(b² - 4ac)) / 2a ``

So if your equation is 1x² + 1x + 1 = 0, then a=1, b=1, c=1 and roots are

``  (-b ± √(b² - 4ac)) / 2a = (-1 ± √(1 - 4)) / 2 = (-1 ± √(-3)) / 2``

Since √(-3) = i√3 (because i√3 x i√3 = (i x i) x (√3 x √3) = -1 x 3 = -3), the roots are -1/2 ± (√3/2)i

It is possible to find complex roots your way

You can find the roots the way you calculate things, but be more careful with imaginary part; let's represent x not as 'a + b' as you do but as 'a + bi', where both a and b are real numbers, and i is, well, square root of -1. Then we will get:

``  1(a + bi)² + 1(a + bi) + 1 = 0 =>  a² + 2abi + (bi)² + a + bi + 1 = 0 =>  a² + 2abi - b² + a + bi + 1 = 0 =>``  (a² - b² + a + 1) + (2ab + b)i = 0``

Now look at the number at the left side: it has real part (a² - b² + a + 1) and imaginary part (2ab + b)i. For this number to be zero, both parts should be zero (you cannot make zero out of real number by adding imaginary part to it).

So we got that

``  a² - b² + a + 1 = 0 and (2ab + b)i = 0``

I'm going to look at the imaginary part first.

``  (2ab + b)i = 0 =>  2ab + b = 0 =>``  (2a + 1)b = 0``

Now we have two numbers (2a + 1 and b) such that their product is zero, so one of those numbers is zero. It cannot be b (try to substitute b = 0 -- the equation turns out to a² + a + 1 = 0, which has no real solutions, and a was a real number). Hence

``  2a + 1 = 0 => a = -1/2``

Now, when we know a, let's look at the real part.

``  a² - b² + a + 1 = 0 =>  1/4 - b² - 1/2 + 1 = 0 =>  b² = 3/4 =>``  b = ±√3/2``

We substituted x = a + bi, so we can get our two roots now: -1/2 ± (√3/2)i

General situation

There is a theorem that the number of (complex) roots a polynomial has is equal to its degree. Well, the whole thing is a bit less straightforward as some roots can repeat themselves, like in x² - 2x + 1 = 0 -- there is only one solution, x = 1, but since the same equation can be represented as (x - 1)(x - 1) = 0, the solution x = 1 is, well, counted twice -- once for each "x - 1". I'm not going deeper here, but what's important to know: if you take random polynomial of degree n, almost always it will have exactly n different complex roots.

It is not possible to calculate exact roots for general polynomial of degree over 4 -- not that we don't know how, it's proven theorem that the formula cannot exist.