§ 1-1 Functions
Download
Report
Transcript § 1-1 Functions
§3.6 Newton’s Method.
The student will learn about
Newton’s method of
approximating
roots and tangent
line approximations.
1
Introduction to Newton’s Method
Sometimes we are presented with a problem which
cannot be solved by simple algebraic means.
For instance, if we needed to find the roots of the
polynomial , x 3 x 1 0
we would find that the tried and true techniques just
wouldn't work.
However, we will see that calculus through Newton’s
Method gives us a way of finding approximate
solutions.
2
An Easier Example to Start
Let’s start by computing the √5. This is of course easy
with your calculator but stay with me for this.
First we rewrite the problem as an equation
f (x) = x 2 – 5 = 0
Newton’s method is an iterative method. That means
that you must first pick an initial value for the
solution and then the method will yield a better value.
The method may be repeated as often as necessary to
get the accuracy needed.
What would be a good initial value for √5?
OK we will use 2.
3
An Easier Example to Start
Before we continue let’s look at the method.
Consider the drawing. If x Is the root
and x n is an approximation then x n + 1
is a better approximation.
Using the tangent line slope
yn
dy y y n y n 1
f '(xn )
dx x xn xn 1 xn xn 1
And solving for x n + 1 yields
x n1 x n
f (x n )
f '(x n )
4
Back to our Example
x n1 x n
f (x n )
f '(x n )
We were trying to find √5 using
f (x) = x 2 – 5 = 0
and
x n = x 0 = 2 and f ′ (x) = 2x.
x n1
1
2.25
or x 1 x 0
and x 1 2
xn
4
f '(x 0 )
f '(x n )
f (x n )
f (x 0 )
Probably not too impressed! Let’s find x 2.
x 2 x1
f (x 1 )
f '(x 1 )
and
0.0625
x 2 2.25
2.23611111...
4.5
With just two iterations we have accuracy to
0.000043134.
FACT: Newton described this method in a book he wrote in 1669!
5
Example 2
x n1 x n
f (x n )
f '(x n )
Approximate the solution to cos x = x in the interval [0, 2].
First we rewrite the problem as f (x) = cos x – x = 0
We will let x 0 = 1 (midpoint of the interval) and we
know f ′(x) = - sin x - 1
cos(1) 1
0.5403023059 1
x1 x0
1
1
0.7503668679
f '(x 0 )
sin (1) 1
0.8414709848 1
f (x 0 )
If we were to repeat the process we would get
x 2 = 0.7391128909
x 3 = 0.7390851334 - accuracy to 9 places!
A bit tedious BUT if you know a little programming your
calculator or computer can do this easily.
6
Example 3
Approximate f (x)
3
x n1 x n
f (x n )
f '(x n )
x 0 using x 0 = 1
OK it’s a silly example (Do you know the solution?) but
stay with me while I make a point.
xn 1 xn
x
1
3
n
2
3
n
1
x
3
xn 3 xn 2 xn
The computation is easy with x 0 = 1, x 1 = - 2, x 2 = 4,
x 3 = - 8, x 4 = 16, etc.
So the method fails. But, it fails spectacularly!
7
Failure
Newton's method makes no guarantee on convergence.
Indeed, convergence depends on the starting point and
on the shape of the function.
8
Your Calculator
x n1 x n
f (x n )
f '(x n )
Calculators basically only know how to add and multiply.
So, how does it find
a ? Let’s use Newton.
f (x) x2 a 0 and then f '(x) 2x
xn a
2
xn 1 xn
2x n
1
a
xn
2
x n
Notice that the operations involved in the iteration are
addition and multiplication and you computer can do that!
Use x 0 = 2 and approximate √5 with two iterations.
9
Your Calculator
xn 1 xn
x n2 a
2x n
x n1 x n
f (x n )
f '(x n )
1
a
xn
2
xn
Use x 0 = 2 and approximate √5 with two iterations.
1
5 9
x 1 2 2.25
2
2 4
1
5
x 2 2.25
2.23611... 2.236067977.
2
2.25
10
Tangent Line Approximations
From our definition of derivative we know that
f(x h) f (x) f(x h) f (x)
f '(x) lim
h0
h
h
When h is small.
If we multiply both sides of the above by h, we get
dy h f '(x) f(x h) f (x) y
Δy is the exact change in y
dy = h · f ′ (x) is an approximation of Δy and is called
the differential.
11
Tangent Line Approximations
Summary
dy h f '(x) f(x h) f (x) y
Approximate change
exact change
Another useful form:
f(x h) f (x) h f '(x)
12
Tangent Line Approximations
f(x h) f (x) h f '(x)
Let’s use this form for a practical problem.
Approximate √5 using the differential above.
5 41
With x = 4, h = 1,
f (x) x
f(x h) f (x) h f '(x)
1
2
1 21
and f '(x) x
2
f(4 1) f (4) 1 f '(4)
1
1
4 1 4 1
2 2.25
4
2 4
Does this look familiar?
13
Summary.
• We learned how to use Newton’s Method to solve
equations.
• We developed the approximation formula using the
differential dy,
f (x + h) – f (x) ≈ h · f ′ (x) = dy
14
ASSIGNMENT
§3.6; Page 66; 1 - 9, odd.
15