How do you find all the real and complex roots of #f (x) = x^5 – x^4 + 3x^3 + 9x^2 – x + 5#?
1 Answer
Use the Durand-Kerner method to find numerical approximations for the zeros.
Explanation:
Given:
#f(x) = x^5-x^4+3x^3+9x^2-x+5#
By the rational root theorem, any rational zeros of
So the only possible rational zeros are:
#+-1# ,#+-5#
None of these work, so the zeros of
To find numeric approximations for the zeros, you can use the Durand-Kerner method:
Suppose the
Choose initial approximations for these zeros as follows:
#p_0 = (0.4+0.9i)^0#
#q_0 = (0.4+0.9i)^1#
#r_0 = (0.4+0.9i)^2#
#s_0 = (0.4+0.9i)^3#
#t_0 = (0.4+0.9i)^4#
Then iterate using the formulas:
#p_(i+1) = p_i-(f(p_i))/((p_i-q_i)(p_i-r_i)(p_i-s_i)(p_i-t_i))#
#q_(i+1) = q_i-(f(q_i))/((q_i-p_(i+1))(q_i-r_i)(q_i-s_i)(q_i-t_i))#
#r_(i+1) = r_i-(f(r_i))/((r_i-p_(i+1))(r_i-q_(i+1))(r_i-s_i)(r_i-t_i))#
#s_(i+1) = s_i-(f(s_i))/((s_i-p_(i+1))(s_i-q_(i+1))(s_i-r_(i+1))(s_i-t_i))#
#t_(i+1) = t_i-(f(t_i))/((t_i-p_(i+1))(t_i-q_(i+1))(t_i-r_(i+1))(t_i-s_(i+1))#
Keep iterating until the values are stable to the desired accuracy.
The zeros you will find will be approximately:
#-1.6073#
#0.109713+0.702004i#
#0.109713-0.702004i#
#1.19394+2.17633i#
#1.19394-2.17633i#
Here's a C++ program which does the calculation:
This is what its (slightly primitive) output looks like: