Session 04
Infinite series, power series, tests for convergence
Recall that a power series is an expression of the form
> ps:=sum(a[k]*x^k,k=0..infinity);
Here are some specific examples.
> ex1:=subs(a[k]=1/k!,ps);
> value(%); # note that Maple knows this power series explicitly
> ex2:=subs({x^k=x^(2*k),a[k]=(-1)^k/(2*k)!},ps);
> value(ex2);
Given a power series it is important to determine for what values of x the series converges. There are several tests that can be applied to determine the answer.
For a fixed x define the numbers :
ratio test
or
root test
1) The series converges for all x for which r < 1.
2) The series diverges for all x for which r > 1.
3) When r = 1 the test fails (i.e., the series may converge of diverge)
These tests are referred to as the ratio test and the root test respectively.
> f:=n->n^2*x^n;
> g:=expand(abs(f(n))^(1/n));
> limit(g,n=infinity);
So the series converges for .
A version of these tests is often used for regular series. Let

or

1) The series converges if r < 1.
2) The series diverges if r > 1.
3) When r = 1 the test fails.
The integral test for a series:
If the terms and the terms are given by a decreasing function f(x) ie, , then the series converges or diverges if and only if the improper integral converges or diverges.
A comparison test:
Given two series with positive terms and ,
a) if the series for converges and then the series with converges.
b) if the series for diverges and then the series with diverges.
> a:='a';n='n'; # clear the variable a and n
> a:=n->1/(n^2);
> limit(a(n+1)/a(n),n=infinity); # ratio test
> limit(a(n)^(1/n), n=infinity); # root test
Thus the ratio and root test fail. Try the integral test.
> int(a(x),x=1..infinity);
The series converges.
> a:=n->n!/n^n;
> limit(a(n+1)/a(n),n=infinity);
The next example shows that the root test is “stronger” than the ratio test. Let when n is odd and when n is even.
> ao:=n->(n-1)^(2-n);
> ae:=n->n^(-n);
> limit(ao(n)^(1/n), n=infinity);
> limit(ae(n)^(1/n), n=infinity);
So the series converges.
> limit(ao(n+1)/ae(n), n=infinity);
> limit(ae(n+1)/ao(n), n=infinity);
Thus the ratio of fails to exist and so the ratio test would not apply.
Taylor polynomials
The command taylor (or series in this case) computes the first six terms of the Taylor series of the function. For more terms an additional option n can be supplied. (Check Maple’s Dictionary for definition of Taylor series and Laurent series).
> f:='f' # clear the function f(x) from previous definition
> taylor(f(x),x=a);
> t3:=taylor(sin(x),x,4); # first 4 terms

This object can not be plotted because of the big O symbol.
> plot(t3,x=-1..1);
To convert it to an actual polynomial we use convert.
> tp3:=convert(t3,polynom);
> plot({sin(x),tp3},x=-4..4);

Observe how the Taylor polynomial converge to the function they are approximating.
> tp9:=convert(taylor(sin(x),x,10),polynom);
> plot({tp3,tp9,sin(x)}, x=-5..5);

Exercises
1) Given a series with the given nth term determine whether the series converges or diverges
1. a:=n-> (n/(3*n+1))^n;
2. b:=n-> sqrt(n)/(n^2+1);
3. c:=n->2^n/n!;
4. d:=n->log(n)/(n*sqrt(n^2+1));
5. e:=n->n^3/2^n;
6. f:=n-> 2^n*n!/n^n;
7. g:=n->(n!)^2/2^(n^2);
2) Determine the radius of convergence of the power series. Also check the endpoints of the interval of convergence.
1. sum(((-1)^n*2^(2*n)/(2*n))*x^(2*n),n=1..infinity); 
2. sum( (1-(-2)^n)*x^n,n=1..infinity); 
3. sum( (1+1/n)^(n^2)*x^n,n=1..infinity); 
4. sum( (n!)^2/(2*n)! *x^n, n=1..infinity); 
5. sum( 3^(sqrt(n))/sqrt(n^2+1) *x^n,n=1..infinity); 
3) Compute the nth Taylor polynomial of a function f(x) about x=0 on the interval (-c,c). Plot the function and the first few Taylor polynomials.
1. f(x)=sin(x)^2 with c=2*Pi
2. f(x)=log(sqrt((1-x)/(1+x))) with c= 3/4
<< Back - Next >>
|