\(MATH\ 257\ Calculus\ III				Week\ of\ April\ 14, \ 
        2003\)
Lab 3 :  Power Series
Name 1
Name 2
Section:

I.  Laboratory Objectives
	Use Mathematica to explore
		Power Series
		Using the Ratio Test in Mathematica
		Graphing Power Series partial sums

II.  Formatting and Syntax Information

InequalitySolve[f[x] < 1,  x] This solves inequalities.  It's nifty.
					
PlotStyle->RGBColor[1,0,0]	Use this in any Plot[ ] command.
					Makes graphs in different colors.

Power Series

The general form for a Power Series about the point x = a:

 \(TraditionalForm\`∑\+\(n = 0\)\%∞\(\( c\_n\)(x - a)\)\^n\)
 
 This is an infinite polynomial written in terms of powers of (x - a).

Given a function, expanding it into a power series can be hard to do.  This lab will explore several tricks for doing this.

Trick 1: Use geometric series.
If the power series is in the form of a geometric series a + ar  +  (ar^2) +  (ar^3) +  ...  then we can just use the formula for a convergent geometric series:  (a/(1 - r)).

In other words, we know that
1  +  x  +  (x^2)  +  (x^3)  +  
            (x^4) +   ...   =  (1/(1 - x)) for  \(TraditionalForm\`\(\(|\)\(x\)\(|\)\(\(≤\)\(\ \)\(1\)\)\)\).  
Example:   what is the power series expansion of (2/(1 + (x/4)))?  Well, write it as (2/(1 - (-(x/4))))and then we can see that a = 2 and r = -(x/4).  So...

Simplify[
        (2/(1 + (x/4)))] == (∑_(n = 0)^∞) 
          2 (((-(x/4)))^n)

Evaluate the above expression.  The double equal sign "==" is a command that asks Mathematica, "Is this true?"  Mathematica will respond "True" or "False".  So this can be a great way to check if your power series expansion is correct. (It's a good idea to put the Simplify[] command in there to make sure the Left-Hand-Side is as simple as possible.)

Trick 2: Finding the radius and interval of convergence:
You can find the radius of convergence of power series by hand, but you can also make Mathematica do it for you using the Ratio Test.  Here's how:  we'll find the interval of convergence for the series (∑_(n = 0)^∞) 2 (((-x/4))^n)that we saw above. 

In preparation for using the Ratio Test, let's define the nth term of the series (Subscript[a, n])

a[n_, x_] = 2 (-(x/4))^n

Now we can form the ratio of ((Subscript[a, n + 1])/(Subscript[a, n ]))giving it the name "ratio."

ratio = a[n + 1, x]/a[n, x]

Next take the limit of this ratio as n-> ∞.

Limit[ratio, 
      n -> ∞]

By the Ratio Test, the series will converge when the Absolute Value of this answer is less than 1.  To solve the inequality Abs[((-x)/4)] < 1, we must load the package "Inequality Solve" in the Algebra package.  This is done below.

<< Algebra`InequalitySolve`

To solve the inequality we use the syntax below:

InequalitySolve[Abs[-(x/4)] < 1, 
      x]

So now we know that (2/(1 + (x/4))) =  (∑_(n = 0)^∞) 
            2 (((-(x/4)))^n) is a convergent power series expansion on the interval -4 < x < 4.  We DON"T know what is happening at the end points, at x = -4 and at x = 4.  You would have to check these separately by hand.

We can also check our work by making a plot of our original function with a partial sum of our power series.  I like to use the command PlotStyle->{RGBColor[0,0,0], RGBColor[1,0,0] ...} to make the graphs on the same axis in different colors.  [0,0,0] is black, [1,0,0] is red, and you can experiment with others.  So, to check out power series and interval of convergence for (2/(1 + (x/4))) we can try graphing it with, say, the 6th partial sum:

Plot[{(2/(1 + (x/4))),  (∑_(n = 0)^6) 2 (((-(x/4)))^n)},  {x, -5, 
        5}, 
PlotStyle -> {RGBColor[0, 0, 0],  
          RGBColor[1, 0, 0]}]

If the graphs look like they line up inside -4 < x < 4, then we're lookin' good! (Try a higher partial sum, like the forst 10 terms, to make it even more accurate.)

Question 1:  Consider the function (5/(3 - x)).
(a) Find the values of a and r in the geometric series representation of this ((a/(1 - r))=(∑_(n = 0)^∞)((ar)^n)) and write the power series representation.  (Hint: factor out a 1/3.)  Use Mathematica to check your work.

(b) Use the Ratio Test in Mathematica to find the interval of convergence of this power series.

(c) Make a pretty plot (with color!) of the original function together with the 8th partial sum.

Trick 3: Use derivatives!

Question 2:  (a) Find a power series expansion for (1/(((1 - x))^2)). Write your answer in summation notation and use Mathematica to check if it's true.  Hint:  Use Mathematica to remind yourself what the derivative of (1/(1 - x))is.  (Recall that D[f[x],x]  will give you the derivative of f[x] with respect to x.)  And remember that \(TraditionalForm\`1\/\(1 - x\) = ∑\+\(n = 0\)\%∞ x\^n\)for |x|< 1.

(b) Find the radius of convergence of this power series.

Trick 4:  Use antiderivatives!

Question 3:  (a) Find a power series expansion of ln(1+x), writing your answer in summation notation.  Hint:  What's the derivative of Log[1+x]?  Look kinda familiar? You can write this in summation notation (only do the first 5 terms or so) and then find the antiderivative (using the Integrate[f[x],x] command) to get the power series of the original.

(b) Make a pretty plot (using colors) of Log[1+x] together with some of the partial sums of its power series using the range {x, -1, 2}.  Be sure to indicate which colors correspond to which functions!

Question 4:  Name that Power Series:
Consider the power series (∑_(n = 0)^∞) ((x^n)/(n!)).
(a) Use Mathematica and the Ratio Test to compute the interval of convergence of this power series. WARNING:  you may need to use the FullSimplify[ ] command to make the factorials cancel.

(b) Make a nice plot of some high-termed partial sums of this power series.  What function does it look like the series is converging to?

Now that you're done, 
	(1) 	Clean up your work by deleting everything that's not needed.  
		There should only be the title, your names, section number, and the questions and your answers
		(with any needed explanations, graphs, etc.).
	(2) 	Save this to your disk.
	(3)	Go back to Blackboard and upload your final lab report to the Digital Drop Box, located
		in the User Tools area.  Remember that you have to first ADD your file to your digital drop box and 
		then SEND it to me!