Presentation is loading. Please wait.

Presentation is loading. Please wait.

Roots of equations Class VII.

Similar presentations


Presentation on theme: "Roots of equations Class VII."β€” Presentation transcript:

1 Roots of equations Class VII

2 Last time We started new topic: Roots of Equation
Definition of root or zero of function f(x). Examples. Bisection method of finding roots at the interval [a,b]. After n steps the estimate of a root is π‘Ÿ=( π‘Ž 𝑛 + 𝑏 𝑛 )/2 i.e. root is trapped in the interval [ π‘Ž 𝑛 , 𝑏 𝑛 ] Error in Bisection method πœ€β‰€(bβˆ’a)/ 2 𝑛+1 We started to study Newton’s method of finding roots.

3 Convergence analysis in Bisection method
Suppose error tolerance 𝛿 has been prescribed in advance. How to determine number of steps n required in the Bisection method that error in root estimate πœ€<𝛿 ? Recall that πœ€β‰€(bβˆ’a)/ 2 𝑛+1 leading to (bβˆ’a)/ 2 𝑛+1 < 𝛿 Taking logarithms: log(b-a) – n log 2 < log (2𝛿) We have inequality: n > [ log(b-a) - log (2𝛿) ] / log 2

4 Newton’s Method Function f(x) is differentiable
Let point π‘₯ 0 be a starting point and some initial approximation to the root

5

6 Newton’s Method This method gives as a sequence:
π‘₯ 0 , π‘₯ 1 , π‘₯ 2 , …, π‘₯ 𝑛 , π‘₯ 𝑛+1 where the n-th approximation to the root is π‘Ÿ=π‘₯ 𝑛

7 Example 𝑓 π‘₯ = π‘₯ 3 βˆ’2 π‘₯ 2 +π‘₯βˆ’3 Let us start finding root from π‘₯ 0 =3, 𝑓 (π‘₯ 0 )= 9 𝑓′ π‘₯ = 3 π‘₯ 2 βˆ’4π‘₯+1 In five steps (n=5) we will have π‘₯ 5 = and 𝑓 (π‘₯ 5 )=1.97Γ— 10 βˆ’12 Rather fast convergence of the sequence of π‘₯ 𝑛 to the root.

8 Convergence analysis in Newton’s method
Function f(x): f(r)=0, derivatives f’. Assume that f’(r) β‰  0 Newton’s method, if started sufficiently close to root r, converge quadratically: | π‘Ÿβˆ’π‘₯ 𝑛+1 | ≀𝑐 | π‘Ÿβˆ’π‘₯ 𝑛 | 2 π‘₯ 𝑛+1 has approximately twice as many correct digits as π‘₯ 𝑛 Suppose c=1 and | π‘Ÿβˆ’π‘₯ 𝑛 | ≀ 10 βˆ’π‘˜  | π‘Ÿβˆ’π‘₯ 𝑛+1 | ≀ 10 βˆ’2π‘˜ If k=2, error decreases from 0.01 to

9 Pitfalls of Newton’s method
a) Runaway Each successive point π‘₯ 𝑛 in Newton’s iteration recedes from r instead of converging to r. Pure choice of the initial point π‘₯ 0 .

10 Pitfalls of Newton’s method
b) Flat spot The tangent to the curve is parallel to the x-axis resulting in π‘₯ 1 =±∞.

11 Pitfalls of Newton’s method
c) Cycle The iteration values cycle because π‘₯ 2 =π‘₯ 0 .


Download ppt "Roots of equations Class VII."

Similar presentations


Ads by Google