How do I find the real zeros of a function?

2 Answers
Feb 19, 2016

Answer:

It depends...

Explanation:

Here are some cases...

Polynomial with coefficients with zero sum

If the sum of the coefficients of a polynomial is zero then #1# is a zero. If the sum of the coefficients with signs inverted on the terms of odd degree is zero then #-1# is a zero.

Any polynomial with rational roots

Any rational zeros of a polynomial with integer coefficients of the form #a_n x^n + a_(n-1) x^(n-1) +...+ a_0# are expressible in the form #p/q# where #p, q# are integers, #p# a divisor of #a_0# and #q# a divisor of #a_n#.

Polynomials with degree <= 4

#ax+b = 0 => x = -b/a#

#ax^2+bx+c = 0 => x = (-b+-sqrt(b^2-4ac))/(2a)#

There are formulas for the general solution to a cubic, but depending on what form you want the solution in and whether the cubic has #1# or #3# Real roots, you may find some methods preferable to others.

In the case of one Real root and two Complex ones, my preferred method is Cardano's method. The symmetry of this method gives neater result formulations than Vieta's substitution.

In the case of three Real roots, it may be preferable to use the trigonometric substitution that squeezes a cubic into the identity #cos 3 theta = 4 cos^3 theta - 3 cos theta#, thereby finding zeros in terms of #cos# and #arccos#.

There are general formulas for the solution of quartic equations, but it's generally easier to work with the individual cases.

In the worst cases, you can transform #ax^4+bx^3+cx^2+dx+e# into a monic quartic by dividing by #a#, get into the form #t^4+pt^2+qt+r# using the substitution #t = x+b/(4a)#, then look at factorisations of the form:

#t^4+pt^2+qt+r = (t^2+At+B)(t^2-At+C)#

multiplying out and equating coefficients to get 3 simultaneous equations in #A#, #B# and #C#. Then use #(B+C)^2 = (C-B)^2+4BC# to derive a cubic equation in #A^2#. By now you hopefully know how to solve cubics, so you can find #A#, hence #B# and #C#, etc.

Feb 20, 2016

Answer:

If algebraic solutions are not usable, try Newton's method or similar to find numeric approximations.

Explanation:

Quintics and other more complicated functions

If #f(x)# is a well behaved continuous, differentiable function - e.g. a polynomial, then you can find its zeros using Newton's method.

Starting with an approximation #a_0#, iterate using the formula:

#a_(i+1) = a_i - f(a_i)/(f'(a_i))#

For example, if #f(x) = x^5+x+3#, then #f'(x) = 5x^4+1# and you would iterate using the formula:

#a_(i+1) = a_i - (a_i^5+a_i+3)/(5a_i^4+1)#

Putting this into a spreadsheet with #a_0 = -1#, I got the values:

#a_0=-1#

#a_1 = -1.166666666666667#

#a_2 = -1.134701651504899#

#a_3 = -1.133002126375077#

#a_4 = -1.132997565917805#

#a_5 = -1.132997565885065#

#a_6 = -1.132997565885065#

If #f(x)# has several Real zeros, then you may find them by choosing different values of #a_0#.

Newton's method can also be used to find Complex zeros in a similar way, but you may prefer to use methods like Durand-Kerner to find all zeros at once.