Muller's method

From testwiki
Jump to navigation Jump to search

Template:Short description Template:More footnotes Muller's method is a root-finding algorithm, a numerical method for solving equations of the form Template:Math. It was first presented by David E. Muller in 1956.

Animation illustrating Muller's method applied to the function Template:Math. At each iteration, a parabola interpolating three points is constructed, and one of its roots is used to generate the next approximation.

Muller's method proceeds according to a third-order recurrence relation similar to the second-order recurrence relation of the secant method. Whereas the secant method proceeds by constructing a line through two points on the graph of Template:Mvar corresponding to the last two iterative approximations and then uses the line's root as the next approximation at every iteration, by contrast, Muller's method uses three points corresponding to the last three iterative approximations, constructs a parabola through these three points, and then uses a root of the parabola as the next approximation at every iteration.

Derivation

Muller's method uses three initial approximations of the root, x0,x1 and Template:Tmath, and determines the next approximation x3 by considering the intersection of the x-axis with the parabola through Template:Tmath, (x1,f(x1)) and Template:Tmath.

Consider the quadratic polynomial P(x)=a(x−x2)2+b(x−x2)+c,

that passes through Template:Tmath, (x1,f(x1)) and Template:Tmath. To simplify notation, define the differences

h0=x1−x0,h1=x2−x1

and δ0=f(x1)−f(x0)h0,δ1=f(x2)−f(x1)h1.

Substituting each of the three points Template:Tmath, (x1,f(x1)) and (x2,f(x2)) into P(x) and solving simultaneously for a,b and c gives

a=δ1−δ0h1+h0,b=ah1+δ1,c=f(x2).

The quadratic formula is then applied to P(x) to determine x3 as

x3−x2=−2cb±b2−4ac.

The sign preceding the radical term is chosen to match the sign of b to ensure the next iterate is closest to Template:Tmath, giving

x3=x2−2cb+sign⁡(b)b2−4ac.

Once x3 is determined, the process is repeated. Note that due to the radical expression in the denominator, iterates can be complex even when the previous iterates are all real. This is in contrast with other root-finding algorithms like the secant method, Sidi's generalized secant method or Newton's method, whose iterates will remain real if one starts with real numbers. Having complex iterates can be an advantage (if one is looking for complex roots) or a disadvantage (if it is known that all roots are real), depending on the problem.

The method can easily be adopted for scenarios, such as collision detection, where not the closest root is of interest, but the smaller one by replacing sign⁡(b) with sign⁡(−a): x3=x2−2cb−sign⁡(a)b2−4ac.

Algorithm

The following pseudocode describes Muller's method for approximating a root of the equation Template:Math. It returns an estimate x3 that satisfies Template:Tmath, where ε is a user-specified tolerance.

input: function Template:Mvar, initial approximations Template:Math, Template:Math, Template:Math, tolerance Template:Mvar, maximum iterations Template:Math
for n = 0 to Nmax do
   h0 ← x1 − x0
   h1 ← x2 − x1
   δ0 ← (f(x1) − f(x0)) / h0
   δ1 ← (f(x2) − f(x1)) / h1
   a ← (δ1 − δ0) / (h1 + h0)
   b ← a·h1 + δ1
   c ← f(x2)
   if b ≥ 0 then
       denominator ← b + sqrt(b² − 4·a·c)
   else
       denominator ← b − sqrt(b² − 4·a·c)
   end if
   x3 ← x2 − 2·c / denominator
   if |x3 − x2| < ε then
       return x3
   end if
   x0 ← x1
   x1 ← x2
   x2 ← x3
end for
return x3

Example

Suppose we seek a solution of the polynomial f(x)=−x3−x+7.

Applying Muller's method with initial guesses Template:Tmath, x1=2 and x2=3 and a tolerance of 10−9 gives the following approximations:

Iteration a b c Denominator xn f(xn)
3 −6.0 −26.0 −23 −37.13552 1.7612940604716703 −2.2510×10−1
4 −6.76129 −10.01078 −0.22510 −19.71273 1.7384555878656442 7.53555×10−3
5 −6.49974 −10.03787 7.53555×10−3 −20.08549 1.7392059353750402 −2.08961×10−5
6 −5.23895 −10.07452 −2.08961×10−5 −20.14903 1.7392038612200968 −3.42854×10−11

To the required tolerance, Muller's method generates the solution 1.7392038612200968 on the sixth iteration.

By modifying the initial guesses, Muller's method can also generate complex solutions. Applying Muller's method again but with initial guesses Template:Tmath, x1=−2 and x2=−3 and a tolerance of 10−9 gives the following approximations:

Iteration Denominator xn f(xn)
3 −26−14.56021i −0.8333333333333335−1.2133516482134197i 4.73148+1.95484i
4 6.38915−24.72107i −0.777821059050328−1.6104880890500035i 2.19616+0.356473i
5 9.46045−19.15717i −0.8389286926696546−1.8095901140685215i −.187858−0.295347i
6 13.02224−18.42210i −0.8699227902463772−1.8080759128505213i −3.44378×10−3+2.09461×10−3i
7 13.08065−18.85860i −0.8696017710815587−1.8079333552255168i −1.67055×10−7−2.34332×10−6i
8 13.07447−18.86619i −0.8696019306084998−1.8079332269621338i −2.10054×10−12+6.79900×10−13i

To the required tolerance, Muller's method generates the complex solution −0.8696019306084998−1.8079332269621338i on the eighth iteration.

Speed of convergence

Suppose the real-valued function f(x) has a root at Template:Tmath. Let en=xn−α denote the error at the nth iteration of Muller's method. By definition, we have en+1=Kenp where p is the order of convergence. Therefore, en=Ken−1p and en−1=Ken−2p which gives en−1∼en1/p and en−2∼en1/p2. Near the root Template:Tmath, Taylor's theorem gives f(x)=f′(α)(x−α)+f″(α)2(x−α)2+R(x) where R(x) is the remainder term, defined as R(x)=f‴(ξ)6(x−α)3 for some ξ between x and Template:Tmath. Using the three consecutive iterates of Mullers method, Template:Tmath, x=xn−1 and x=xn−2 evaluated at the root gives

R(α)=O(enen−1en−2) or en+1=O(enen−1en−2) since the next iterate is obtained by setting the interpolating quadratic to zero. Asymptotically, en+1=Kenen−1en−2. Using en−1∼en1/p and en−2∼en1/p2 gives en+1=Ken1+1p+1p2.

By definition, en+1=Kenp so equating exponents gives p=1+1p+1p2 which can be rearranged to give

p3−p2−p−1=0.

Solving this equation gives Template:Tmath, so the order of convergence of Muller's method is exactly the tribonacci constant. This can be compared with approximately 1.618, exactly the golden ratio, for the secant method and with exactly 2 for Newton's method. So, the secant method makes less progress per iteration than Muller's method and Newton's method makes more progress.

More precisely, if α denotes a single root of f(x) and f′(α)≠0 and f(x) is three times continuously differentiable, if the initial guesses Template:Tmath, x1 and x2 are taken sufficiently close to Template:Tmath, then the iterates satisfy limk→∞|xk−α||xk−1−α|μ=|f‴(α)6f′(α)|(μ−1)/2

where μ≈1.84 is the positive solution of Template:Tmath, the defining equation for the tribonacci constant.

Muller's method fits a parabola, i.e. a second-order polynomial, to the last three obtained points Template:Math, Template:Math and Template:Math in each iteration. One can generalize this and fit a polynomial Template:Math of degree Template:Mvar to the last Template:Math points in the Template:Mvar-th iteration. Our parabola Template:Math is written as Template:Math in this notation. The degree Template:Mvar must be 1 or larger. The next approximation Template:Math is now one of the roots of the Template:Math, i.e. one of the solutions of Template:Math. Taking Template:Math we obtain the secant method whereas Template:Math gives Muller's method.

Muller calculated that the sequence Template:Math generated this way converges to the root ξ with an order Template:Math where Template:Math is the positive solution of Template:Tmath.

As Template:Mvar approaches infinity the positive solution for the equation approaches 2. The method is much more difficult though for Template:Math than it is for Template:Math or Template:Math because it is much harder to determine the roots of a polynomial of degree 3 or higher. Another problem is that there seems no prescription of which of the roots of Template:Math to pick as the next approximation Template:Math for Template:Math.

These difficulties are overcome by Sidi's generalized secant method which also employs the polynomial Template:Math. Instead of trying to solve Template:Math, the next approximation Template:Math is calculated with the aid of the derivative of Template:Math at Template:Math in this method.

See also

References

Template:Reflist

  • Atkinson, Kendall E. (1989). An Introduction to Numerical Analysis, 2nd edition, Section 2.4. John Wiley & Sons, New York. Template:ISBN.
  • Burden, R. L. and Faires, J. D. Numerical Analysis, 4th edition, pages 77ff.
  • Template:Cite book

Further reading

Template:Root-finding algorithms