06.09.2021 Views

First Semester in Numerical Analysis with Julia, 2020a

First Semester in Numerical Analysis with Julia, 2020a

First Semester in Numerical Analysis with Julia, 2020a

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 2. SOLUTIONS OF EQUATIONS: ROOT-FINDING 74<br />

to get<br />

c = f(p 2 )<br />

b = (p 0 − p 2 )(f(p 1 ) − f(p 2 ))<br />

(p 1 − p 2 )(p 0 − p 1 )<br />

− (p 1 − p 2 )(f(p 0 ) − f(p 2 ))<br />

(p 0 − p 2 )(p 0 − p 1 )<br />

a = f(p 0) − f(p 2 )<br />

(p 0 − p 2 )(p 0 − p 1 ) − f(p 1) − f(p 2 )<br />

(p 1 − p 2 )(p 0 − p 1 ) .<br />

(2.14)<br />

Now that we have determ<strong>in</strong>ed P (x), the next step is to solve P (x) =0, and set the next<br />

iterate p 3 to its solution. To this end, put w = x − p 2 <strong>in</strong> (2.13) to rewrite the quadratic<br />

equation as<br />

aw 2 + bw + c =0.<br />

From the quadratic formula, we obta<strong>in</strong> the roots<br />

ŵ =ˆx − p 2 =<br />

−2c<br />

b ± √ b 2 − 4ac . (2.15)<br />

Let Δ=b 2 − 4ac. We have two roots (which could be complex numbers), −2c/(b + √ Δ)<br />

and −2c/(b − √ Δ), and we need to pick one of them. We will pick the root that is closer to<br />

p 2 , <strong>in</strong> other words, the root that makes |ˆx − p 2 | the smallest. (If the numbers are complex,<br />

the absolute value means the norm of the complex number.) Therefore we have<br />

⎧<br />

⎨ −2c<br />

b+<br />

ˆx − p 2 =<br />

√ if |b + √ Δ| > |b − √ Δ|<br />

Δ<br />

⎩ −2c<br />

b− √ if |b + √ Δ|≤|b − √ . (2.16)<br />

Δ|<br />

Δ<br />

The next iterate of Muller’s method, p 3 , is set to the value of ˆx obta<strong>in</strong>ed from the above<br />

calculation, that is,<br />

⎧<br />

⎨p 2 −<br />

p 3 =ˆx =<br />

⎩p 2 −<br />

2c<br />

b+ √ if |b + √ Δ| > |b − √ Δ|<br />

Δ<br />

2c<br />

b− √ if |b + √ Δ|≤|b − √ Δ|<br />

Δ<br />

.<br />

Remark 36.<br />

1. Muller’s method can f<strong>in</strong>d real as well as complex roots.<br />

2. The convergence of Muller’s method is superl<strong>in</strong>ear, that is,<br />

∣<br />

|p − p n+1 | ∣∣∣<br />

lim<br />

n→∞ |p − p n | = f (3) (p)<br />

α 6f ′ (p)<br />

where α ≈ 1.84, provided f ∈ C 3 [a, b],p∈ (a, b), andf ′ (p) ≠0.<br />

∣<br />

α−1<br />

2

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!