Calculus for the Natural Sciences

Download Report

Transcript Calculus for the Natural Sciences

Calculus I – Math 104
The end is near!
Series approximations for
functions, integrals etc..
We've been associating series with functions
and using them to evaluate limits, integrals
and such.
We have not thought too much about how
good the approximations are. For serious
applications, it is important to do that.
Questions you can ask-1. If I use only the first three terms of the
series, how big is the error?
2. How many terms do I need to get the error
smaller than 0.0001?
To get error estimates:
Use a generalization of the Mean Value
Theorem for derivatives
Derivative MVT approach:
Recall themean - value theorem:
f (b)  f (a)
f ' (somewherebetween a and b) 
b-a
Set a  0, b  x - - get
f ( x)  f (0)
f ' (somewherebetween 0 and x) 
x
Rearrangethis to get
f(x)  f(0)  f ' (somewhere) x .
If you know...
If you know that the absolute value of the
derivative is always less than M, then you
know that
| f(x) - f(0) | < M |x|
The derivative form of the error estimate for
series is a generalization of this.
Lagrange's form of the
remainder:
Suppose you writ et heapproximation obt ained
n
using t he t ermsup t o x of t heseries for f(x),
and let t he" remainder"be Rn(x):
f ( x)  a0  a1 x  a2 x  a3 x  ... an x  Rn(x)
2
where ak 
f
(k )
( 0)
.
k!
3
n
Lagrange...
Lagrange's form of the remainder looks a lot like
what would be the next term of the series, except
the n+1 st derivative is evaluated at an unknown
point between 0 and x, rather than at 0:
Rn ( x) 
f
( n 1)
( som ewhere) n1
x
(n  1)!
So if we know bounds on the n+1st derivative of f,
we can bound the error in the approximation.
Example: The series for sin(x) was:
sin(x)  x 
x3
3!

x5
5!

x7
7!
 ...
If we use thefirst two(nonzero)terms,we have
sin(x)  x 
x3
3!
4
 R4 ( x)
because the x termof theseries is zero anyhow.
5th derivative
For f(x) = sin(x), the fifth derivative is f '''''(x) =
cos(x). And we know that |cos(t)| < 1 for all t
between 0 and x. We can conclude from this that:
R4 ( x) 
x
5
5!
So for instance, we can conclude that the
approximation sin(1) = 1 - 1/6 = 5/6 is accurate
to within 1/5! = 1/120 -- i.e., to two decimal
places.
Your turn...
How accurateis theapproximation
2
3
.
5
.
5
.5
e  e  1  .5 

 1.6458333?
2! 3!
Now turn thequest ion around- How many termsof theseries do we need
to add togetherto get e to10 decimalplaces?
Another application...
Another application of Lagrange's form of the
remainder is to prove that the series of a function
actually converges to the function. For example, for
the series for sin(x), we have (since all the
derivatives of sin(x) are always less than or equal to
1 in absolute value):
x n 1
Rn ( x) 
- - and for any valueof x, thisquantit y
(n  1)!
will approachzero as n goes to infinit y.T hus, theerror
becomesarbitrarily small - and zero in thelimit.So we
2 n 1
(1) x
are now justified in writing: sin(x)  
n  0 ( 2n  1)!

n
Shifting the origin -Taylor vs Maclaurin
So far, we've been writing all of our series as
infinite polynomials and using values of the
function f(x) and its derivatives evaluated at
x=0. It is possible to change one's point of
view and use values of the function and
derivatives at other points.
As an example, we’ll return to
the geometric series
1
f ( x) 
 1  x  x 2  x 3  x 4  ...
1 x
If we define a new functiong(x)  f(x  1), then wecould write
1
1
g ( x)  f ( x  1) 

1  ( x  1)
x
 1  ( x  1)  ( x  1) 2  ( x  1) 3  ( x  1) 4  ...
T hisexpansionwould be valid for x bet ween - 2 and 0 (since thef(x)
expansionwas valid only for x bet ween - 1 and1).
Taylor series
By taking derivatives of the function g(x) = -1/x
and evaluating them at x=-1, we will discover
that the expansion of g(x) we have found is the
Taylor series for g(x) expanded around -1:
g(x) = g(-1) + g '(-1) (x+1) + g ''(-1)
( x 1) 2
2!
+ ....
Note:
In general,we have theT aylorexpansionof f(x)around x  a :
xa
( x  a) 2
( x  a)3
f(x)  f(a)  f ' (a)
 f ' ' (a)
 f ' ' ' (a)
 ...
1!
2!
3!
Note that thisspecializes to our old friend(thatis now called the
Maclaurinseries) when a  0.
Maclaurin
Series expansions around points other than
zero are useful when trying to approximate
function values for x far from zero, but
close to a different point where much is
known about the function.
But note that by defining a new function g(x)
= f(x+a), you can use Maclaurin expansions
for g instead of general Taylor expansions
for f.
Binomial series
An importantseries thatarises in manyapplications.
It is a generalization of thebinomialtheorem:
 p k
(1  x)     x
k 0  k 
 p
where   is thebinomialcoefficient
k
 p
p!
  
. T his works and gives
 k  k!( p  k )!
theexpansionof (1  x) p if p is a positiveinteger.
p
p
If p is not a positive integer...
then thesame expansionworks exceptit doesn't st op
(i.e.,it gives a series inst eadof a polynomial
) and we
need a new definitionfor binomial(p, k).
(1  x) p  1  p x 
p ( p 1)
2!
x2 
p ( p 1)( p  2 )
3!
x 3  ...
For inst ance,if p  -1, thisgives thealternat ing harmonic
1
series!
 1  x  x 2  x 3  ...
1-x
Fibonacci numbers
Everyone is probably familiar with the famous sequence of
Fibonacci numbers. The idea is that you start with 1 (pair of)
rabbit(s) the zeroth month. The first month you still have 1 pair.
But then in the second month you have 1+1 = 2 pairs, the third you
have 1 + 2 = 3 pairs, the fourth, 2 + 3 = 5 pairs, etc... The pattern is
that if you have an pairs in the nth month, and an+1 pairs in the
n+1st month, then you will have a n + a n+1 pairs in the n+2nd
month.
The first several terms of the sequence are thus:
1, 1, 2, 3, 5, 8, 13, 21, 34, 55, etc...
Is there a general formula for a n?
Generating functions
This is a common problem in many parts of
mathematics and science. And a powerful
method for solving such problems involves
series -- which in this case are called
generating functions for their sequences.
For the Fibonacci numbers, we will simply
define a function f(x) via the series:
f ( x)  a0  a1 x  a2 x 2  a3 x3  ... 1  x  2 x 2  3x 3  5x 4  ...
Now we have to get therecurrencerelationan 2  an  an1
into thegame.
Recurrence relation
To do this, we'll use the fact that multiplication
by x "shifts" the series for f(x) as follows:
f ( x)  a0  a1 x  a2 x 2  a3 x 3  a4 x 4  ...
xf ( x)  a0 x  a1 x 2  a2 x 3  a3 x 4  ...
x 2 f ( x)  a0 x 2  a1 x 3  a2 x 4  ...
Now, subtract the second two from the first -almost everything will cancel because of the
recurrence relation!
The result is...
(1  x  x )f ( x)  a0  (a1  a0 ) x
2
But recall thata0  a1  1. So we havededuced that
1
f ( x) 
!
2
1 x  x
Whatgood does thisdo?
Further...
If we can figure out theseries for 1 x1 x 2 then wewill
havea formulafor theFibonaccinumbers,since they
are thecoefficients of theseries.
Partialfractionsto therescue! Factor thedenominator
1  x  x  (  x)(  x), where 
2
(we' ll put thevaluesin later).
5 1
2
and  
5 1
2
Then use partial fractions to write:
1
(  x )(   x )

1
(   )(  x )

1
(   )(   x )
So if we can get theseries for
1
 x
and  1 x we will be done (almost)!
Work it out...
First
1
 x

1

And
1
 x
1
 1 x 

x
2
 (1   
x

1


x3
3
1


x
2
1


x3
3
x 3

 ...) 
 ...
    (1  
1
 1 x
  
x 2

x

 ...
      ...) 
x 2

x 3

Now, recall that...

5 1
2
and  
about  and  are
1.     5
and
2.  
1

5 1
2
. T wo importantfacts
Our series for f(x) becomes:
f ( x) 
1
5
(     (  2   2 ) x  (  3   3 ) x 2  (  4   4 ) x 3  ...)
T his tellus that
an 
 ( n1)  ( 1) n  ( n1)
5
If we put in theknown values of  and  we will obtain a formula
for thenth Fibonaccinumber