0% found this document useful (0 votes)
25 views

CH 2

This document provides an overview of sequences and series in mathematics for computer science. It defines what a sequence is and discusses finding patterns in sequences and determining whether a sequence converges or diverges. It then introduces infinite series and discusses techniques for determining whether a series converges, such as using partial sums and limiting behavior. Specific types of series covered include geometric series and those that can be used to represent repeating decimals. Tests for convergence like the integral test are also summarized.

Uploaded by

fai
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

CH 2

This document provides an overview of sequences and series in mathematics for computer science. It defines what a sequence is and discusses finding patterns in sequences and determining whether a sequence converges or diverges. It then introduces infinite series and discusses techniques for determining whether a series converges, such as using partial sums and limiting behavior. Specific types of series covered include geometric series and those that can be used to represent repeating decimals. Tests for convergence like the integral test are also summarized.

Uploaded by

fai
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 64

Math for Computer Science:

Chapter II:
Sequences & Series
Sequences
Sequences
A sequence is…
(a) An ordered list of objects.
1 1 1 1
1, , , , ...
2 4 8 16
(b) A function whose domain is a set of integers.

Domain: 1, 2, 3, 4, …,n…

Range a1, a2, a3, a4, … an…

{(1, 1), (2, ½), (3, ¼), (4, 1/8) ….}


Sequences
Finding patterns
Describe a pattern for each sequence. Write a formula
for the nth term
1 1 1 1 1
1, , , , ... n1
2 4 8 16 2
1 1 1 1 1
1, , , , ...
2 6 24 120 n!
1 4 9 16 25
, , , , ... n2
4 9 16 25 36 ( n  1) 2
Sequences n 1
Write the first 5 terms for an 
n
1 2 3 4 n 1
0, , , , ... ...
2 3 4 5 n
On a number line As a function

The terms in this sequence get closer and closer


to 1. The sequence CONVERGES to 1.
Sequences (1)n 1  n  1
Write the first 5 terms an 
n

1 2 3 4 n 1
0,  , ,  , .    ... ...
2 3 4 5 n

The terms in this sequence do not get close to


any single value. The sequence Diverges
Sequences
Write the terms for an = 3

The terms are 3, 3, 3, …3

The sequence converges to 3.


Sequences
y= L is a horizontal asymptote when
sequence converges to L.
A sequence that diverges

(1)n 1  n  1
an 
n
Sequences

Write the first 5 terms of the sequence.


Does the sequence converge? If so, find the value.
( 1) n 1 1 1 1 1 (1) n 1
an  1,  , ,  , lim n  0
2n  1 3 5 7 9 2n  1
The sequence converges to 0.

n 1  1 1 2 3 4 n 1
an  (1)  1   0,  ,  ,  , limn (1) 1   does not exist
 n  2 3 4 5  n
The sequence diverges.
Series
Infinite Series

1 1 1 1 1
 2n  2  4  8  16  ...
n 1
Represents the sum of the terms in a sequence.
We want to know if the series converges to
a single value i.e. there is a finite sum.

1 1  1  1  1  ...
n 1

The series diverges because sn = n. Note that the


Sequence {1} converges.

1
 n(n  1)
n 1


1 1 1 1 1 1
 n(n  1)  2  6  12  20  30  ...
n 1

Partial sums of 1 1 1 1 1 1
 n(n  1)  2  6  12  20  30  ...
1 1 n 1
s1  
1 2 2
1 1 2
s2   
1 2 2  3 3
1 1 1 3
s3    
1 2 2  3 3  4 4
and
1 1 1 1 n
sn     ... 
1 2 2  3 3  4 n(n  1) n  1

If the sequence of partial sums converges,


the series converges
1 2 3 4 5 n
, , , , ... ... Converges to 1 so series converges.
2 3 4 5 6 n 1

Finding sums 1
 n(n  1)
n 1
Can use partial fractions to rewrite

1
 n(n  1) 
n 1

1 1  1 1 1 1 1 1 1
  n  n  1   (1  2 )  ( 2  3)  ( 3  4 )  ... n  n  1  ...
n 1


1 1
 n(n  1)  limn (1  n  1)  1
n 1

T
. he partial sums of the series 1
 n(n  1)
Limit n 1
Geometric Series

1 1 1 1 1
 2n    
2 4 8 16
 ...
n 1

Each term is obtained from the preceding


number by multiplying by the same number r.
Find r (the common ratio)
1 1 1 1
    ...
5 25 125 625
2 4 8 16
    ...
3 3 3 3

Is a Geometric Series
 ar n 1
Where a = first term and r=common ratio
n 1

Write using series notation


 n 1
11
1 1 1
  
1
 ...  2  2 
2 4 8 16 n 1

 n 1
3 12 48 192 3 4 
  
5 25 125 625
 ...  5   5 
n 1


2 4 8 16 2 n 1
  
3 3 3 3
 ...  3  2
n 1
The sum of a geometric series
2 3 n 1
sn  a  ar  ar  ar  ...ar Sum of n terms
2 3 n
rsn  ar  ar  ar  ...ar Multiply each term by r
n
sn  rsn  a  ar subtract
n n
a  ar a(1  r )
sn   ,r 1
1 r 1 r
n
if | r | 1, r  0 as n  .
a
Geometric series converges to sn  1  r , | r | 1
If r>1 the geometric series diverges.
Find the sum of a Geometric Series
Where a = first term and r=common ratio

a
 ar n 1

1 r
, | r | 1
n 1
 n 1 1
11
 2  2  2 1
1
n 1 1 3
 n 1 2
3 4  5 31
 5   5  1
4 9 3
n 1 5

2 n 1
 3  2 The series diverges.
n 1
Repeating decimals-Geometric Series
8 8 8 8
0.080808  2
 4
 6
 8
 ...
10 10 10 10

8 1
a and r 
102 102
  n 1
8  1 
 ar n 1
 2  2 
n 1 n 110  10 

8

a 2 8
 ar n 1
  10
1 r 1 1

99
n 1
102

The repeating decimal is equivalent to 8/99.


Series known to converge or diverge
1. A geometric series with | r | <1 converges
2. A repeating decimal converges
3. Telescoping series converge
A necessary condition for convergence:
Limit as n goes to infinity for nth term
in sequence is 0.
nth term test for divergence:
If the limit as n goes to infinity for the nth
term is not 0, the series DIVERGES!
Convergence or Divergence?
 
n  10 1 1
 10n  1 n  n2
n 1 n 1


 4
 1.075 
n
 2n
n 1 n 1
A sequence in which each term is less than or
equal to the one before it is called a monotonic
non-increasing sequence. If each term is greater
than or equal to the one before it, it is called
monotonic non-decreasing.

A monotonic sequence that is bounded


Is convergent.
A series of non-negative terms converges
If its partial sums are bounded from above.
The Integral Test
Let {an} be a sequence of positive terms.
Suppose that an = f(n) where f is a continuous
positive, decreasing function of x for all xN.
Then the series and the corresponding integral
shown both converge or both diverge.

f(n) f(x)
 
 an  f ( x)dx
n N
N
The series and the integral both converge or both diverge
Area in rectangle corresponds to term in sequence

Exact area under curve is between


If area under curve is finite, so is area in rectangles

If area under curve is infinite, so is area in rectangles


Using the Integral test

n
 n2  1 an  f ( n) 
n f ( x) 
x
n 1 2
n 1 x2  1

 b
x 1 2x  
b
 x2  1 b   2
2
dx  lim dx  lim b   ln( x  1)
2 x  1 1
1 1
2
limb (ln(b  1)  ln 2)  
The improper integral diverges

Thus the series diverges


Using the Integral test

1 1
 n2  1 an  f ( n)  2
1 f ( x) 
x2  1
n 1 n 1

 b
1 1
 x2  1 dx  limb  x2  1 dx  limb arctan x
b
1
1 1
  
limb (arctan b  arctan1)   
2 4 4

The improper integral converges

Thus the series converges


Harmonic series and p-series

1
 n p Is called a p-series
n 1

A p-series converges if p > 1 and diverges


If p < 1 or p = 1.

1 1 1 1 1 1
n  1    
2 3 4 5
 ....
n
 ....
n 1

is called the harmonic series and it


diverges since p =1.
Identify which series converge and which diverge.

 
1 1
 1
n
n 1 3 n 1
n

 
1 100
 n
 n2
n 1 n 1

  n 1
1 3 4 
   5   5 
n 1 n 1
n3
Direct Comparison test

Let  an be a series with no negative terms
n 1
 
 an Converges if there is a series  cn
n 1 n 1

Where the terms of an are less than or equal to


the terms of cn for all n>N.
 
 an Diverges if there is a series  dn
n 1 n 1

Where the terms of an are greater than or equal


to the terms of dn for all n>N.
Limit Comparison test
Limit Comparison test
an
lim x   c, 0c
bn  

Then the following series  an and n1bn


n 1
both converge or both diverge:

an  
lim x 
bn
0 and Amd bn Converges then  an Converges
n 1 n 1

an  
lim x 
bn

and  bn Diverges then  an Diverges
n 1 n 1
Convergence or divergence?

1
 2  3n
n 1


1
 3n  2
n 1


n
 n2  1
n 1
Alternating Series
A series in which terms alternate in sign
 
 (1) n
an or  ( 1) n 1
an
n 1 n 1


1 1 1 1 1
 (1) n 1
2 n
   
2 4 8 16
 ...
n 1

1 1 1 1
 (1) n   1  2  3  4  ...
n

n 1
Alternating Series Test

 ( 1) n 1
an  a1  a2  a3  a4  ...
n 1

Converges if:
an is always positive

an an+1 for all n  N for some integer N.

an0
If any one of the conditions is not met, the
Series diverges.
Absolute and Conditional Convergence

• A series  an is absolutely convergent if the
n N

corresponding series of absolute values  an
n N
converges.

• A series that converges but does not converge


absolutely, converges conditionally.

• Every absolutely convergent series converges.


(Converse is false!!!)
Is the given series convergent or divergent? If it is
convergent, its it absolutely convergent or
conditionally convergent?
 n
 n ( n 1) / 2 (1)

( 1)
n
 ln(n  1)
n 1 3 n 1

 n
 n 1 ( 1)

(1) (n  1)  n
n 1 n n 1
a) Is the given series convergent or divergent? If
it is convergent, its it absolutely convergent or
conditionally convergent?
 n ( n 1) / 2
(1) 1 1 1 1
 3 n
   
3 9 27 81
 ...
n 1

This is not an alternating series, but since



(1) n ( n 1) / 2 
1
 3 n
  3n
n 1 n 1

is a convergent geometric series, then the given


Series is absolutely convergent.
b) Is the given series convergent or divergent? If
it is convergent, its it absolutely convergent or
conditionally convergent?
 n
(1) 1 1 1
 ln(n  1)   ln 2  ln 3  ln 4  ......
n 1

Converges by the Alternating series test.


 n
(1) 1 1 1
 ln(n  1)
  
ln 2 ln 3 ln 4
 ......
n 1
Diverges with direct comparison with the harmonic
Series. The given series is conditionally convergent.
c) Is the given series convergent or divergent? If
it is convergent, its it absolutely convergent or
conditionally convergent?
 n 1
(1) (n  1) 2 3 4 5
 n
    
1 2 3 4
n 1

By the nth term test for divergence, the series


Diverges.
d) Is the given series convergent or divergent? If
it is convergent, its it absolutely convergent or
conditionally convergent?
 n
(1) 1 1 1 1
 n 
1

2

3

4
n 1

Converges by the alternating series test.


 n
(1) 1 1 1 1
 n

1

2

3

4
n 1
Diverges since it is a p-series with p <1. The
Given series is conditionally convergent.
The Ratio Test

Let  an be a series with positive terms and
n N
an 1
limn  
an

Then
• The series converges if ρ < 1
• The series diverges if ρ > 1
• The test is inconclusive if ρ = 1.
The Root Test

Let  an be a series with non-zero terms and
n N
limn n | an |  L

Then
• The series converges if L< 1
• The series diverges if L > 1 or is infinite
• The test is inconclusive if L= 1.
Convergence or divergence?
 n
2
 n!
n 1

 n
3
 n2 2n 1
n 1

 2n
e
 n n
n 1
. Procedure for determining Convergence
Power Series (infinite polynomial in x)

 n
c x n
 c0  c1 x  c2 x 2
 .....cn x n
...
n 0
is a power series centered at x = 0.
and

 n
c ( x  a ) n
 c0  c1 ( x  a )  c2 ( x  a ) 2
 .....cn ( x  a ) n
...
n 0

is a power series centered at x = a.


Examples of Power Series

xn x2 x3
 n!
1 x 
2

3!
 ...
n 0

is a power series centered at x = 0.

and

(1) n 1 1 1
 3n
( x  1) n  1 
3
( x  1)  ( x  1) 2  ..... n ( x  1) n ...
9 3
n 0

is a power series centered at x = -1.


Geometric Power Series

x n 2 3 4
 1  x  x  x  x  ...x n

n 0

a  1 and r  x
a 1
S   , x 1
1 r 1 x
P1  1  x
P2  1  x  x 2
P3  1  x  x 2  x 3
. The graph of f(x) = 1/(1-x) and four of its
polynomial approximations
Convergence of a Power Series

There are three possibilities


1)There is a positive number R (Radius of convergence) such
that the series diverges for |x-a|>R but converges for |x-
a|<R. The series may or may not converge at the endpoints,
x = a - R and x = a + R.

2)The series converges for every x. (R = ∞.)

3)The series converges at x = a and diverges elsewhere. (R=0)


What is the interval of convergence?

x n 2 3
 1  x  x  x  x  ...x4 n

n 0
Since r = x, the series converges |x| <1, or
-1 < x < 1. In interval notation (-1,1).
Test endpoints of –1 and 1.

 (1) n Series diverges
n 0

 (1) n
Series diverges
n0
Geometric Power Series
Find the function

(1) n 1 1 1
 3n
( x  1)  1  ( x  1)  ( x  1)  ..... n ( x  1) n ...
n
3 9
2
3
n 0

1
a  1 and r   ( x  1)
3
a 1 3 3
S    
1  r 1  1 ( x  1) 3  ( x  1) 4 x
3
Find the radius of convergence
1
r   ( x  1)
3
1 2  x  4
 ( x  1)  1
3
Geometric Power Series 
(1) n
Find the interval of convergence 
Find the radius of convergence n 0 3n
( x  1) n

For x = -2,
  
(1) n (1) n (1) n 1
 3n
(2  1) n   3n
  3n
n 0 n 0 n 0

Geometric series with r < 1, converges


For x = 4
   
(1) n (1) n (3) n 3n
 3n
n
(4  1)   3n
  3n  1
n 0 n 0 n 0 n 0

By nth term test, the series diverges.


Interval of convergence 2  x  4
 n
x
Finding interval of convergence
 n
n 0
Use the ratio test:
xn x n 1
un  and un 1 
n n 1
n 1
un 1 x n
lim n   lim n  n
 x
un n 1 x
x 1 R=1 (-1, 1)
Interval of convergence
For x = 1 For x = -1


(1) n [-1, 1)
n
1  n
n 0
n0
Harmonic series Alternating Harmonic series
diverges converges
Differentiation and Integration of Power Series
If the function is given by the series

 n
c ( x  a ) n
 c0  c1 ( x  a )  c2 ( x  a ) 2
 .....cn ( x  a ) n
...
n 0

has a radius of convergence R>0, on the


interval (c-R, c+R) the function is continuous,
Differentiable and integrable where:

f ( x )   n
nc ( x  a ) n 1

n 0

( x  a)n
 f ( x)dx  C   cn
n 0 n 1

The radius of convergence is the same but the


interval of convergence may differ at the endpoints.
Constructing Power Series
If a power series exists has a radius of convergence = R
It can be differentiated
f ( x)  c0  c1( x  a)  c2 ( x  a)2  .....cn ( x  a)n ...

f ( x)  c1  2c2 ( x  a)  3c3 ( x  a)2.....ncn ( x  a)n 1...

f ( x)  2c2  2 *3c3 ( x  a)  3* 4( x  a) 2....


f ( x)  1* 2 *3c3  2 *3* 4c4 ( x  a)  3* 4 *5( x  a) 2  ...

So the nth derivative is


( n)
f ( x)  n!cn  terms with factor of ( x  a)
Finding the coefficients for a Power Series
f ( n) ( x)  n!cn  terms with factor of ( x  a)
All derivatives for f(x) must equal the series
Derivatives at x = a.
f ( a )  c1
f ( a )  1* 2c2
f ( a )  1* 2 * 3c3

( n)
f (a)  n!cn
(n)
f (a)
 cn
n!
If f has a series representation centered at x=a, the
series must be
 (k )
f (a) f ( a ) f ( a )
 k!
 f ( a )  f ( x  a ) 
2!
( x  a)2 
3!
( x  a )3...
k 0
(n)
f (a ) n
 x  ...
n!

If f has a series representation centered at x=0, the


series must be
 (k )
f (0) f (0) f (0)
 k!
 f ( a )  f (0) 
2!
( x  a)2 
3!
( x  a )3...
k 0
(n)
f (0) n
 x  ...
n!
Form a Taylor Polynomial of order 3 for

sin x at a = 4
n f(n)(x) f(n)(a) f(n)(a)/n!

0 sin x 2
2
2
2

1 cos x 2 2
2 2

2 -sin x 
2 
2
2 2 * 2!

3 -cos x 
2

2
2 2 * 3!
The graph of f(x) = ex and its Taylor
polynomials
Find the derivative and the integral
 n 2 3 4
x x x x
 n!
1 x 
2

3!

4!
 ...
n 0


 1x
n 2 n 1
x3 x5 x7
 (2n  1)!
 x
3!

5!

7!
...
n 0
Taylor polynomials for f(x) = cos (x)
Converges only at x = 0
Determine if the following series converges or diverges

You might also like