Views
4 months ago

# numerical3j

## {22} • Numerical

{22} • Numerical Methods The third problem shows that all x n can get further and further away from a solution! Example Find an approximate solution to arctan x = 0, using Newton’s method starting at x 1 = 3. Solution Let f (x) = arctan x, so f ′ (x) = 1 1+x 2 . From x 1 = 3 we can compute successively x 2 , x 3 ,.... We write them to 2 decimal places. x 2 = x 1 − f (x 1) f ′ (x 1 ) = 3 − arctan3 = 3 − 10arctan3 ∼ −9.49. 1 1+3 2 x 3 = x 2 − f (x 2) f ′ (x 2 ) ∼ 124.00 x 4 = x 3 − f (x 3) f ′ (x 3 ) ∼ −23,905.94 The “approximations" x n rapidly diverge to infinity.

A guide for teachers – Years 11 and 12 • {23} The above example may seem a little silly, since finding an exact solution to arctan x = 0 is not difficult: the solution is x = 0! But similar problems will happen applying Newton’s method to any curve with a similar shape. The fact that f ′ (x n ) is close to zero means the tangent line is close to horizontal, and so may travel far away to arrive at its x-intercept of x n+1 . Sensitive dependence on initial conditions Sometimes the choice of initial conditions can be ever so slight, yet lead to a radically different outcome in Newton’s method. Consider solving f (x) = 2x − 3x 2 + x 3 = 0. It’s possible to factorise the cubic, f (x) = x(x − 1)(x − 2), so the solutions are just x = 0,1 and 2. If we apply Newton’s method with different starting estimates x 1 , we might end up at any of these three solutions... or somewhere else. As illustrated above, we apply Newton’s method starting from x 1 = 1.4 and x 1 = 1.5. Starting from x 1 = 1.4 = 7 5 we compute, to 6 decimal places, x 1 = 7 5 = 1.4, x 2 ∼ 0.753846, x 3 ∼ 1.036456, x 4 ∼ 0.999903, x 5 ∼ 1.000000. and the x n converge to the solution x = 1. And starting from x 1 = 1.5 we compute x 2 = 0, an exact solution, so all x 3 = x 4 = ··· = 0. We might then ask: where, between the initial estimates x 1 = 1.4 and x 1 = 1.5, does the sequence switch from approaching x = 1, to approaching x = 0? We find that the the initial estimate x 1 = 1.45 behaves similarly to 1.5: the sequence x n approaches the solution x = 0. On the other hand, taking x 1 = 1.44 behaves similarly to