60 likes | 144 Views
Solving Equations numerically. Finding roots by iteration. Iterating to a solution. Any equation can be rewritten in the form: x = F(x) (1)
E N D
Solving Equations numerically Finding roots by iteration
Iterating to a solution Any equation can be rewritten in the form: x = F(x) (1) Then with a starting values x1 substituted in the Right Hand Side (RHS) of (1) an new estimate x2 can be found. Substituting x2 in (1) gives x3, then x4, x5, … If the sequence x1, x2, x3, x4, … converges to a limit l then l is a root of x = F(x)
Example To solve x5 + x – 19 =0 rearrange as Then with a starting values x1 = 2 subsequent values are 1.6198, 1.8781, 1.6932, …etc Finally converging to 1.7671…
Iterations going wrong However, it does not always work. For instance, x5 + x – 19 =0 can be rearranged as x = 19 – x5 Iterations are then 2, -13, 371312, -7.1x1027 etc This series diverges, rather than converging. So some rearrangements work and some do not.
Why iterations go wrong The solution works if the gradient of y = F(x) is small (between +1 and -1). The smaller the (modulus of the) gradient the better the iteration works. If the gradient is positive terms approach the solution from one side. If gradient is negative then they cycle larger/smaller than root.
How iterations work y = x y y=F(x) x1 x x2 x3