Anda di halaman 1dari 1

Math 340, Project 1: Iterative Methods for Nonlinear Equations

Newton’s method is as follows:


f (xn )
xn+1 = xn − .
f 0 (xn )

Write a function newton.m that is the fixed point iteration for Newton’s method where f.m and
df.m contain the functions f (x) and f 0 (x) respectively. (Just program the derivative you do
not have to use Matlab to find the derivative.) Solve the following using Newton’s method:
1
x3 − 2x = 56, 4x − 28 = 100 sin(x) =
2

Note that Newton’s method is generally seen as “superior” to other methods because Newton’s
method converges quadratically, whereas the other methods converge linearly.
The experimental rate of convergence for an iterative method may be found by finding
ln(|pn+1 − p|)
α≈ .
ln(|pn − p|)

NOTE: In Matlab, log(x) is the natural logarithm, and exp(x) is the natural exponential.
Find the experimental rate of convergence for each example above, using 1-4 iterations only.
For each example, produce a table that looks like the following table:

n xn en rn
1 0.735759 4.261170e-1 2.67
2 0.694042 8.951194e-4 2.22
3 0.693148 4.004998e-7 2.10
4 0.693147 8.015810e-14 2.05

Table 1: Iterations and convergence rates for Newton’s approximation to ex = 2, x0 = 1.

Now, consider the problem, ex − x = 1 this is a root of multiplicity 2. This is because x = 0


solves the equation, and if we differentiate the equation ex − 1 = 0, x = 0 solves that equation
as well. In the case of roots of multiplicity greater than one, Newton’s method only converges
linearly, not quadratically.
Finally, solve the problem sin(x)/x = 1 here x = 0 is not really a zero (why?) but Newton’s
method will give x = 0 as an answer. Note that the “zero” also has a multiplicity of 2.
We can fix this problem by modifying Newton’s method. For a zero of multiplicity m, the
modified Newton’s method is given by
f (xn )
xn+1 = xn − m .
f 0 (xn )
The multiplicity of the root, m must be known ahead of time.
NOTE: Your hand in should include five tables like Table 1–one for each example.

Anda mungkin juga menyukai