Newton's Method for Solving Equations
Calculus I Project
Objective:
To learn Newton's Method for approximating solutions of equations.
Using Maple will help you to quickly compute the successive approximations of the solutions.
Solved Example :
Solve the equation x = 1 + sin(2x).
Solution:
There is no general technique to solve this equation and we must settle for an approximate solution. The method that we will apply is attributed to Newton and uses the idea that the tangent line to a curve closely approximates the curve near the point of tangency.
The Newton's Method
Suppose we have a function f
and we want to solve equation f(x) = 0. To use Newton's method we must make an initial
approximation of the solution,
. The next approximation,
, is
the x-intercept of the tangent line to y = f(x) at the point (
). We
need to find the formula for
.
(In the figure,
is 5
and
is about 4.3)
The slope of the tangent line
is
= f ' (
) =
Solving for
:
=
- f(
)
/ f ' (
)
Now we repeat the process to
obtain
from
,
from
,
etc.
Write a formula of
in
terms of
,
in terms of
.
It follows that
=
- f(
)
/ f ' (
)
We will apply this formula to solve our equation. We first put the equation in the form f(x) = 0
> f:=x->1+sin(2*x)-x;
> plot(f(x),x=-3..3);
To solve the equation amounts to finding the x at which the graph of the function intersects the x-axis.
Let's define function g so that
= g(x)
> df:=x->D(f)(x);
> g:=evalf @ unapply(x-f(x)/df(x),x);
Let's make an initial guess and apply g repeatedly to it.
> x[0]:=2;
> x[1]:=g(x[0]); x[2]:=g(x[1]);
Maple can do more of these commands at the same time:
> for n from 2 to 5 do x[n+1]:=g(x[n])od;
Is 1.377336877 the solution?
> f(x[6]);
Yes, 1.377336877 is the solution.
This was an example of Newton's method working well. If we pick another starting point we might not be so lucky.
> w[0]:=0;
> for n from 0 to 10 do w[n+1]:=g(w[n])od;
The values show no signs of stabilizing. Look at the graph of the function to understand what is going on.
The tangent line at
= 2
is a good approximation of the function not only at the point of tangency but also at the
x-intercept of the function. On the other hand the tangent line for x = 0 bears no
resemblance to the function at the x-intercept of the function.
______________________________________________
ASSIGNMENT
Problem 1.
Using Newton's Method and
Maple, solve the equation
with
= 5
Problem 2.
Go back to the equation in Problem 1.
a) Let
= 2.
What seems to be happening? Sketch the first three iterations on the graph of y =
b) Let
= 0.
What happens?
Problem 3.
Solve x cos(x) = sin(x) + 1
with 0 < x < 2
. Plot the graph to find a good starting point.
_________________________________________________________________________
MSIP Grant #P120A80089-98: "Three Urban Calculus Reform Programs: Adopting the Best" 1998-2001