Jump to content

Muller's method

From Wikipedia, the free encyclopedia

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.

File:Muller's method animation.gif
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.

It converges with order Template:Tmath, faster than the secant method but slower than Newton's method.

Derivation

Muller's method uses three initial approximations of the root, <math>x_{0}, x_{1}</math> and Template:Tmath, and determines the next approximation <math>x_{3}</math> by considering the intersection of the x-axis with the parabola through Template:Tmath, <math>(x_{1}, f(x_{1}))</math> and Template:Tmath.

Consider the quadratic polynomial <math display="block"> P(x) = a(x - x_{2})^2 + b(x - x_{2}) + c,</math>

that passes through Template:Tmath, <math>(x_{1}, f(x_{1}))</math> and Template:Tmath. To simplify notation, define the differences

<math display="block"> h_{0} = x_{1} - x_{0}, \quad h_{1} = x_{2} - x_{1} </math>

and <math display="block"> \delta_{0} = \frac{f(x_{1}) - f(x_{0})}{h_{0}}, \quad \delta_{1} = \frac{f(x_{2}) - f(x_{1})}{h_{1}}. </math>

Substituting each of the three points Template:Tmath, <math>(x_{1}, f(x_{1}))</math> and <math>(x_{2}, f(x_{2}))</math> into <math>P(x)</math> and solving simultaneously for <math>a, b</math> and <math>c</math> gives

<math display="block"> a = \frac{\delta_{1} - \delta_{0}}{h_{1} + h_{0}}, \quad b = ah_{1} + \delta_{1}, \quad c = f(x_{2}). </math>

The quadratic formula is then applied to <math>P(x)</math> to determine <math>x_{3}</math> as

<math display="block"> x_{3} - x_{2} = \frac{-2c}{b + \operatorname{sign}(b) \sqrt{b^2 - 4ac}} = \frac{-2c}{b (1 + \sqrt{1 - 4ac/b^2})}, </math> where the sign preceding the radical term is chosen to match the sign of <math>b</math> to ensure the next iterate is closest to Template:Tmath. Thus,

<math display="block"> x_{3} = x_{2} - \frac{2c}{b(1 + \sqrt{1 - 4ac/b^2})}. </math>

Once <math>x_{3}</math> 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 <math>\operatorname{sign}(b)</math> with <math>\operatorname{sign}(-a)</math>: <math display="block"> x_{3} = x_{2} - \frac{2c}{b - \operatorname{sign}(a)\sqrt{b^2 - 4ac}}. </math>

Algorithm

The following pseudocode describes Muller's method for approximating a root of the equation Template:Math. It returns an estimate <math>x_{3}</math> that satisfies Template:Tmath, where <math>\varepsilon</math> 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 <math display="block">f(x) = -x^3 - x + 7 \,.</math>

Applying Muller's method with initial guesses Template:Tmath, <math>x_{1}=2</math> and <math>x_{2}=3</math> and a tolerance of <math>10^{-9}</math> gives the following approximations:

Iteration <math>a</math> <math>b</math> <math>c</math> Denominator <math>x_n</math> <math>f(x_n)</math>
<math>3</math> <math>-6.0</math> <math>-26.0</math> <math>-23</math> <math>-37.13552</math> <math>1.7612940604716703</math> <math>-2.2510 \times 10^{-1}</math>
<math>4</math> <math>-6.76129</math> <math>-10.01078</math> <math>-0.22510</math> <math>-19.71273</math> <math>1.7384555878656442</math> <math>7.53555 \times 10^{-3}</math>
<math>5</math> <math>-6.49974</math> <math>-10.03787</math> <math>7.53555 \times 10^{-3}</math> <math>-20.08549</math> <math>1.7392059353750402</math> <math>-2.08961 \times 10^{-5}</math>
<math>6</math> <math>-5.23895</math> <math>-10.07452</math> <math>-2.08961 \times 10^{-5}</math> <math>-20.14903</math> <math>1.7392038612200968</math> <math>-3.42854 \times 10^{-11}</math>

To the required tolerance, Muller's method generates the solution <math>1.7392038612200968</math> 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, <math>x_{1}=-2</math> and <math>x_{2}=-3</math> and a tolerance of <math>10^{-9}</math> gives the following approximations:

Iteration Denominator <math>x_n</math> <math>f(x_n)</math>
<math>3</math> <math>-26-14.56021i</math> <math>-0.8333333333333335-1.2133516482134197i</math> <math>4.73148 + 1.95484i</math>
<math>4</math> <math>6.38915 - 24.72107i</math> <math>-0.777821059050328-1.6104880890500035i</math> <math>2.19616 + 0.356473i</math>
<math>5</math> <math>9.46045 - 19.15717i</math> <math>-0.8389286926696546-1.8095901140685215i</math> <math>-.187858 - 0.295347i</math>
<math>6</math> <math>13.02224 - 18.42210i</math> <math>-0.8699227902463772-1.8080759128505213i</math> <math>-3.44378 \times 10^{-3} + 2.09461 \times 10^{-3}i</math>
<math>7</math> <math>13.08065-18.85860i</math> <math>-0.8696017710815587-1.8079333552255168i</math> <math>-1.67055 \times 10^{-7}-2.34332 \times 10^{-6}i</math>
<math>8</math> <math>13.07447-18.86619i</math> <math>-0.8696019306084998-1.8079332269621338i</math> <math>-2.10054 \times 10^{-12} + 6.79900 \times 10^{-13}i</math>

To the required tolerance, Muller's method generates the complex solution <math>-0.8696019306084998-1.8079332269621338i</math> on the eighth iteration.

Speed of convergence

Suppose the real-valued function <math>f(x)</math> has a root at Template:Tmath. Let <math display="block"> e_{n} = x_{n} - \alpha </math> denote the error at the Template:Tmath-th iteration of Muller's method. By definition, we have <math display="block"> e_{n+1} = K e_{n}^{p} </math> where <math>p</math> is the order of convergence and <math>K</math> is an asymptotic constant. Therefore, <math display="block"> e_{n} = K e_{n-1}^{p} </math> and <math display="block"> e_{n-1} = K e_{n-2}^{p} </math> which gives <math display="block"> e_{n-1} \sim e_{n}^{1/p} </math> and <math display="block"> e_{n-2} \sim e_{n}^{1/p^2}. </math> Near the root Template:Tmath, Taylor's theorem gives <math display="block"> f(x) = f'(\alpha)(x - \alpha) + \frac{f(\alpha)}{2}(x - \alpha)^{2} + R(x) </math> where <math>R(x)</math> is the remainder term, defined as <math display="block"> R(x) = \frac{f(\xi)}{6}(x - \alpha)^{3} </math> for some <math>\xi</math> between <math>x</math> and Template:Tmath. Using the three consecutive iterates of Mullers method, Template:Tmath, <math>x=x_{n-1}</math> and <math>x=x_{n-2}</math> evaluated at the root gives

<math display="block"> R(\alpha) = O(e_{n}e_{n-1}e_{n-2}) </math> or <math display="block"> e_{n+1} = O(e_{n}e_{n-1}e_{n-2}) </math> since the next iterate is obtained by setting the interpolating quadratic to zero. Asymptotically, <math display="block"> e_{n+1} = Ke_{n}e_{n-1}e_{n-2}. </math> Using <math display="block"> e_{n-1} \sim e_{n}^{1/p} </math> and <math display="block"> e_{n-2} \sim e_{n}^{1/p^2} </math> gives <math display="block"> e_{n+1} = K e_{n}^{1 + \frac{1}{p} + \frac{1}{p^2}}. </math>

By definition, <math display="block"> e_{n+1} = K e_{n}^{p} </math> so equating exponents gives <math display="block"> p = 1 + \frac{1}{p} + \frac{1}{p^2} </math> which can be rearranged to give

<math display="block"> p^{3} - p^{2} - p - 1 = 0. </math>

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 <math>\alpha</math> denotes a single root of <math>f(x)</math> and <math>f'(\alpha) \neq 0</math> and <math>f(x)</math> is three times continuously differentiable, if the initial guesses Template:Tmath, <math>x_{1}</math> and <math>x_{2}</math> are taken sufficiently close to Template:Tmath, then the iterates satisfy <math display="block"> \lim_{k\to\infty} \frac{|x_k-\alpha|}{|x_{k-1}-\alpha|^\mu} = \left| \frac{f(\alpha)}{6f'(\alpha)} \right|^{(\mu-1)/2} </math>

where <math>\mu \approx 1.84</math> 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