Top Banner
Numerical Methods Finding Roots
23

Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)

Mar 17, 2018

Download

Documents

hanga
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)

Numerical Methods

Finding Roots

Page 2: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)

Fixed Point Iteration

�Rewrite f(x) = 0 to x = g(x)�To solve x = g(x), we iteratively calculate

�xi+1 = g(xi)

�The problem is how to choose g(x) so as �The problem is how to choose g(x) so as to ensure convergence

Page 3: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)

y = f(x)

4

6

8

10

12f(

x)

y = g(x) and y = x

1

2

3

4

5

y-6

-4

-2

0

2

-3 -2 -1 0 1 2 3

x

f(x)

-4

-3

-2

-1

0

-3 -2 -1 0 1 2 3

x

y

Page 4: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)

Fixed Point IterationThe The equation f(x) = 0, where f(x) = x3 − 7x + 3, may be re-

arranged to give x = (x3 + 3)/7.

3

4

y = (x3 + 3)/7

Intersection of the graphs of y = x and y = (x3 + 3)/7 represent roots of the original equation x3 − 7x + 3 = 0.

-4

-3

-2

-1

0

1

2

3

-5 -4 -3 -2 -1 0 1 2 3 4 5

x

y

y = x

Page 5: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)

The rearrangement x = (x3 + 3)/7 leads to the iteration

To find the middle root α, let initial approximation x0 = 2.

Fixed Point Iteration

...,3,2,1,0,7

33

1 =+

=+ nx

x nn

57143.17

32

7

3 330

1 =+=+

=x

x

98292.0357143.13 33

1 =+=+

=x

x

The iteration slowly converges to give α = 0.441 (to 3 s.f.)

etc.etc.

98292.07

357143.1

7

312 =+=

+=

xx

56423.07

398292.0

7

3 332

3 =+=+

=x

x

45423.07

356423.0

7

3 333

4 =+=+

=x

x

Page 6: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)

Fixed-point Iteration Example(1)

Page 7: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)

Fixed-point Iteration Example(2)

Page 8: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)
Page 9: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)
Page 10: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)
Page 11: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)
Page 12: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)
Page 13: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)
Page 14: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)
Page 15: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)
Page 16: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)

Convergence of Fixed Point Iteration

� |g’(x)| < 1: (a), (b)� |g’(x)| > 1: (c), (d)

Page 17: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)

Example

�Find a root of x3 - x2 - 1 = 0 with x0 = 1.5

x - 1 - x-2 = 0 x3 = 1 + x2 x2(x - 1) = 1

g(x) 1 + x-2 (1 + x2)1/3 (x - 1)-1/2

g’(x) -2x-3 2x / [3(1+x2)2/3] -1 / [2(x-1)3/2]

Comment|g’(x)| < 1 forx > 1.3

|g’(x)| < 1 for1 ≤ x ≤ 2

|g’(x)| > 1 forx < 1.6

Page 18: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)

The rearrangement x = (x3 + 3)/7 leads to the iteration

For x0 = 2 the iteration will converge on the middle root α, since g’(α) < 1.

1.5

2

Fixed Point Iteration

n x0 21 1.571432 0.98292

...,3,2,1,0,7

33

1 =+

=+ nx

x nn

0

0.5

1

0 0.5 1 1.5 2x

y

2 0.982923 0.564234 0.454235 0.441966 0.44097 0.440828 0.44081

α = 0.441 (to 3 s.f.)

α x0x2 x1x3

y = (x3 + 3)/7

y = x

Page 19: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)
Page 20: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)
Page 21: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)
Page 22: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)
Page 23: Numerical Methods - Weeblynumericalanalysis.weebly.com/uploads/1/3/8/6/13867400/fixed_point.pdf · Numerical Methods Finding Roots. Fixed Point Iteration Rewrite f(x) = 0to x =g(x)