>   

lab11.mws --- Power Series: Manipulation and Convergence

>    restart;

>   

Auxiliary Procedures (execute, but do not change)

>    GS := proc( r, NN )
  local N;
  if nargs=1 then N:=infinity else N:=NN-1 end if;
  return Sum( simplify(r^k,symbolic), k=0..N )
end proc:

>   

Lab Overview

A common theme in this course, and the labs, has been the construction of new functions from known functions. This theme can be extended to the construction of Taylor series expansions for functions based on known Taylor series expansions. The power of this method is that you only need to remember a small number of fundamental power series:

          geometric series   1/(1-x)  = 1+x+x^2+x^3  + ...
                                               =
Sum(x^k,k = 0 .. infinity)                                                    -1 < x  < 1

          exponential           exp(x)  = 1+x+x^2/2+x^3/3  + ...
                                          =
Sum(x^k/k!,k = 0 .. infinity)  

          binomial               (1+x)^p  = 1 + p*x  + p*(p-1)/2!   x^2  + p*(p-1)*(p-2)/3!   x^3  + ...
                                                   =
Sum(binomial(p,k)*x^k,k = 0 .. infinity)                         -1 < x  < 1

where

                          binomial(p,k) = p*(p-1)*(p-2)*` ... `*(p-(k-1))/k!  .

The example repeats the derivation of the Taylor series for arctan(x)  presented in class. You will then apply similar techniques to determine power series expansions for other functions. The Lab Questions are very similar to the example, and to exercises in the text.

A new feature of this - and all remaining labs this semester - is an integration problem. Each of these problems will be worth at least 2 bonus points towards your lab grade. Note that your answer must contain the correct evaluation of the integral and an explanation of the method(s) used to evaluate the integral. (An example is provided later in this worksheet.) You are encouraged to use the Integration  maplet [ Maplet Viewer][ MapleNet] to help with this problem.

  Deadline for submitting a lab solution is midnight, Thursday, April 3, 2003.  

>   

Example 1: The Power Series for f(x) = arctan(x)  

Define

>    f := arctan(x);

f := arctan(x)

The key observations are that the derivative of the arctangent function is a rational function

>    Df := diff( f, x );

Df := 1/(1+x^2)

This provides a definition of the arctangent function as an integral:

>    F := Int( 1/(1+t^2), t=0..x );

F := Int(1/(1+t^2),t = 0 .. x)

To verify that this is correct,

>    F = value( F );

Int(1/(1+t^2),t = 0 .. x) = arctan(x)

Next, recognize the integrand in this definition as the sum of the geometric series with base r = -t^2 . That is, if the geometric series with base r  is

>    GS( r ) = value( GS(r) );

Sum(r^k,k = 0 .. infinity) = -1/(r-1)

Then, the Maclaurin series for 1/(1+t^2) = 1/(1-(-t^2))  is

>    Df_series := GS( -t^2 );

Df_series := Sum((-1)^k*t^(2*k),k = 0 .. infinity)

To verify this, observe that Maple reports

>    Df_series = value(Df_series);

Sum((-1)^k*t^(2*k),k = 0 .. infinity) = 1/(1+t^2)

The power series for the arctangent function is obtained by term-by-term integration of the terms of the above series.

>    f_series := Int( Df_series, t=0..x );

f_series := Int(Sum((-1)^k*t^(2*k),k = 0 .. infinity),t = 0 .. x)

It is difficult to get Maple to interchange the integral and the sum and evaluate only the integrals in the above formula. It is much simpler to work with the truncated series with a finite number of terms. For example, the first 10 terms of the power series for 1/(1+t^2)  are

>    Df_10 := value( GS( -t^2, 10 ) );

Df_10 := 1-t^2+t^4-t^6+t^8-t^10+t^12-t^14+t^16-t^18

The integration of this polynomial gives the first 10 non-zero terms in the power series for arctangent:

>    F_10 := Int( Df_10, t=0..x );

F_10 := Int(1-t^2+t^4-t^6+t^8-t^10+t^12-t^14+t^16-t^18,t = 0 .. x)

>    value( F_10 );

x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19

>   

To confirm this, note that Maple computes the first 10 non-zero terms of the Maclaurin series for the arctangent function to be:

>    series( arctan(x), x=0, 20 );

series(1*x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+O(x^20),x,20)

>   

The general form of this power series can be deduced from the above result or by manual integration of the general term in the formula obtained previously:

>    f_series;

Int(Sum((-1)^k*t^(2*k),k = 0 .. infinity),t = 0 .. x)

>    f_termK := Int( (-1)^k*t^(2*k), t=0..x ):
f_termK2 := value(f_termK) assuming k::posint:
f_termK =  f_termK2;

Int((-1)^k*t^(2*k),t = 0 .. x) = (-1)^k*x^(2*k+1)/(2*k+1)

>    f_series2 := Sum( f_termK2, k=0..infinity );

f_series2 := Sum((-1)^k*x^(2*k+1)/(2*k+1),k = 0 .. infinity)

To verify this formula, note that the first 10 nonzero terms of this series are

>    series(value(%),x=0,20);

series(1*x-1/3*x^3+1/5*x^5-1/7*x^7+1/9*x^9-1/11*x^11+1/13*x^13-1/15*x^15+1/17*x^17-1/19*x^19+O(x^20),x,20)

These are in complete agreement with the result found earlier.

>   

To address the radius of convergence for the power series for f(x) = arctan(x) , begin with the fact that the geometric series converges for -1 < r  < 1. With r = -t^2 , this yields:

   -1 < -t^2  < 1

   -1 < t^2  < 1

   -1 <= t  < 1

Term-by-term integration preserves this radius of convergence:

   -1 <= x  < 1

All that remains is to check the endpoints x = 1  and x = -1 . For x = 1 :

>    eval( f_series2, x=1 );

Sum((-1)^k/(2*k+1),k = 0 .. infinity)

Note that the terms of this series alternate sign and abs((-1)^k/(2*k+1))  is a decreasing sequence as k  -> infinity . Thus, the Alternating Series Test states that this series converges.

For x = -1 :

>    simplify(eval( f_series2, x=-1 ));

Sum(-(-1)^(3*k)/(2*k+1),k = 0 .. infinity)

the series is the negative of the series for x = 1  and so is convergent. Thus, the interval of convergence for the power series for the arctangent function is [-1,1].

>   

Example 2: Integration Example

Question: Evaluate Int(r^5*ln(r),r) .

Answer: To evaluate this integral, integration by parts with u = f(r)  = ln(r)  and dv = r^5*dr  (so v = g(r)  = r^6/6 ) leads to

  Int(r^5*ln(r),r) = r^6/6*ln(r)-Int(r^6/6*1/r,r)  

  `                  ` = r^6/6*ln(r)-r^6/30+C .

>   

Lab Questions

1. [ 2 points ]

a. Use the result of Example 1 to find the power series for g(x) = arctan( x/3 ).

b. What is the interval of convergence for g?

2. [ 2 points ]

a. Use the fact that   f(x) = 1/(1-x^2)  = Sum((x^2)^k,k = 0 .. infinity)  for -1 < x  < 1 to find the power series representation for g(x) = x/(1-x^2) .

b. Use the result in a. to find the power series representation for G(x) = -1/2   ln(1-x^2) . If you cannot find the general term in the series, find the first 10 non-zero terms in the power series.

3. [ 3 points ]

a. Use the fact that   f(x) = ln(1+x)  = Sum((-1)^k*x^(k+1)/(k+1),k = 0 .. infinity)  for -1 < x  <= 1 to find the power series representation for g(x) = ln(1-x) .

b. [Essay Question] Explain how you can use the result in a. to find the power series for F(x) = ln((1+x)/(1-x)) .
   Hint: Use a property of the natural logarithm.

c. Find the first six non-zero terms in the power series representation for F(x) = ln((1+x)/(1-x)) .

4. [3 bonus points] Integration Problem

Evaluate Int(arctan(x),x = 0 .. 1) .  Be sure to explain the major steps leading to your answer (as in Example 2).
Hint: Your answer should include both
Pi  and the natural logarithm of a small integer.

Note: For an additional point, use the result of Example 1 to evaluate this integral using power series.

>   

>