Here's how the method works, to find a solution of f(x)=0::
You are given two starting values, x0 and x1. You compute x2 by constructing the line that passes through (x0,f(x0)) and (x1,f(x1)), and determining when that line crosses the x-axis. The x-value where that occurs is x2. Then you repeat this process, using x1 and x2 and forming the secant line that passes through (x1,f(x1)) and (x2,f(x2)) to compute x3, and so on, until the x-values converge to a solution, or it's apparent that they will not.
The secant line through the points (x0,f(x0)) and (x1,f(x1)) has the equation
y - f(x1) = (f(x1)-f(x0)) / (x1-x0) * (x-x1).
You want y to be 0, so set y=0 and x=x2 and you get
-f(x1) = (f(x1)-f(x0)) / (x1-x0) * (x2 - x1)
which is then solved for x2:
x2 = x1 - f(x1)*(x1-x0) / (f(x1)-f(x0))
You may also see it written as
x2 = [f(x1)x0 - f(x0)x1] / (f(x1)-f(x0)).
but the two are equivalent.
So, the nth iterate xn is obtained using this formula:
xn = xn-1 - f(xn-1)(xn-1 - xn-2)/[f(xn-1) - f(xn-2)]
= [f(xn-1)xn-2 - f(xn-2)xn-1] / [f(xn-1) - f(xn-2)].
Since you want your final x to satisfy x=2^(5/3), cube both sides and you get x^3 = 2^5. So, use the above formula, with f(x) = x^3 - 2^5 = x^3-32,, until your iterates are less than 0.005 apart.
If you have any questions, please don't hesitate to contact me. I've taught this subject, and numerical methods are my research specialty.
2006-10-07 03:53:57
·
answer #1
·
answered by James L 5
·
1⤊
0⤋