Skip to main content
GameDev.net gamedev.net
🔒 Locked

Imaginary roots.

Started by Brobanx Mar 19, 2003 at 9:43 PM 8 replies 1.5k views
Original Post
Brobanx
Brobanx
I''ve read in many texts that an nth degree polynomial has n solutions... Given x^3 - 8 = 0 as a polynomial, I need to find the solutions of x. since x^3 - 8 = 0, x^3 = 8. Now, I know that ONE of the solutions is x = 2, and the the other two solutions are imaginary. I would like to know not just WHAT the other two solutions are, but what METHOD can be used to find these imaginary roots.
sjelkjd
sjelkjd
Just remember math for polar coordinates:

To multiply two polar numbers, multiply the magnitude and add the angle.

So, let''s find the two roots of 2.
Obviously the magnitude has to be sqrt(2). Now, what angles can we add up to get zero, mod 360
Well, that''s just zero and 180.
Giving us (sqrt(2),0) and (sqrt(2),180), which are sqrt(2), and -sqrt(2).

To do this for higher powers, you want to find
n*angle = 0 (mod 360), where n is the power. That gives you the angle, and the magnitude is trivial to calculate.
yellowjon
yellowjon
look up cyclotomic polynomials and complex roots of unity. You''ll find what you''re looking for.
The Ghost of Euler
The Ghost of Euler
x^3 - 8 is a difference of two cubes and as such, is easily factored, like so:

a^3 - b^3 = (a - b)(a^2 + ab + b^2)

And even if it weren''t, anytime you have a real root r of a cubic polynomial, you can just divide the polynomial by (x - r). That will give you a quadratic polynomial, which you can solve using the quadratic formula to find the other two roots.

For a analytic approach to how to find that first real root, when things like factoring aren''t possible, look up "Cubic Equation" on mathworld.wolfram.com; they''ve got the whole algorithm spelled out.
leblebi
leblebi
Listen to sjelkjd. He presents the general case solution in its practical form.

Oztan
Cedric
Cedric
quote:
Original post by sjelkjd
So, let''s find the two roots of 2.
Obviously the magnitude has to be sqrt(2). Now, what angles can we add up to get zero, mod 360
Well, that''s just zero and 180.
Giving us (sqrt(2),0) and (sqrt(2),180), which are sqrt(2), and -sqrt(2).

I''m confused; what are your final answers? Obviously, sqrt(2) ^ 3 != 8...

I found this link on Google.

Cédric
ga
ga
sjelkjd sought the square roots of 2...
to get the third roots of 8:
the real third root of the absolute value of 8 is 2; so the absolute value of all other third root is also 2.
in polar coordinates (r,phi), 2 can be written as
(2,0) = (2,360°) = (2,720°)
divide the angles of the n representations by n for the n n-th roots.
solution 0: (2,0)
solution 1: (2,120°)
solution 3: (2,240°)

you can convert this to the a + b*i representation:
x0 = 2
x1 = -sqrt(3)/2 + i/2
x2 = -sqrt(3)/2 - i/2


btw: an nth degree polynominal dosn''t necessarily have n solutions, it has got n solutions at most.
the polynominal can be represented by its solutions:
(x - x0)^e0*(x - x1)^e1*...*(x - xm)^em
where the sum e0 + e1 + ... + em = n
Visit our homepage: www.rarebyte.de.stGA
Cedric
Cedric
quote:
Original post by ga
sjelkjd sought the square roots of 2...
to get the third roots of 8:
the real third root of the absolute value of 8 is 2; so the absolute value of all other third root is also 2.
in polar coordinates (r,phi), 2 can be written as
(2,0) = (2,360°) = (2,720°)
divide the angles of the n representations by n for the n n-th roots.
solution 0: (2,0)
solution 1: (2,120°)
solution 3: (2,240°)

you can convert this to the a + b*i representation:
x0 = 2
x1 = -sqrt(3)/2 + i/2
x2 = -sqrt(3)/2 - i/2

Ah, ok... But your x1 and x2 have a problem. Their magnitude is not 2. For anyone interested,

x1 = 2 * cos(120) + 2 * sin(120) * i
x2 = 2 * cos(240) + 2 * sin(240) * i
quote:
btw: an nth degree polynominal dosn''t necessarily have n solutions, it has got n solutions at most.
the polynominal can be represented by its solutions:
(x - x0)^e0*(x - x1)^e1*...*(x - xm)^em
where the sum e0 + e1 + ... + em = n

If the coefficients are real, a nth degree polynomial does have n complex solutions. It''s the fundamental theorem of algebra.

Cédric
sjelkjd
sjelkjd
quote:
Original post by cedricl
x1 = 2 * cos(120) + 2 * sin(120) * i
x2 = 2 * cos(240) + 2 * sin(240) * i


Or:
x1 = 2*e^(i*radians(120))
x2 = 2*e^(i*radians(240))

and in general:
xi = x*e^(i*radians(i*360/n))

Man, polar coordinates/complex numbers are so cool =)
ga
ga
cedricl: sorry I forgot to write 2*...

I'll give you a simple polynominal of grade 2 which has got only 1 complex solution:
(x-1)^2
or x^2 - 2x + 1


in the fundamental theorem of algebra such solutions are called double solutions, i. e. they are counted twice.
the fundamental theorem of algebra further says you can represent the polynomial as
(x-x0)*(x-x1)*...*(x-xn)
but the x0, x1, ... don't need to be different from each other.

[edited by - ga on March 20, 2003 6:13:30 PM]
Visit our homepage: www.rarebyte.de.stGA

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.