Lab08: Power Series

Introduction

In this lab we will use Mathematica to explore power series as functions.  We start with the geometric series:

f(x)=(∑_(n=0)^∞)(x^n)=(1/(1-x)).

First let’s graph several of the partial sums.  First define a function with n and x as variables for the n-th partial sum:

s[n_,x_]:=Sum[x^k,{k,0,n}]

If we widhed to see several of these partial sums written out long-hand:

s[1,x]

s[4,x]

Now the graph:

Plot[{1/(1-x),s[1,x],s[2,x],s[3,x]},{x,-1,1}, PlotStyle->{Black,Blue,Red,Green}]

Let’s look at some of the higher order partial sums:

Plot[{1/(1-x),s[10,x],s[12,x],s[13,x]},{x,-1,1}, PlotStyle->{Black,Blue,Red,Green}]

Notice that as n gets larger, then (Subscript[s, n]) gets closer to (1/(1-x)) on the interval [-1, 1]

Exercise

Use the fact that ∫(1/(1+(x^2)))dx=arctan(x) and what we did in class to find a power series representation for arctan(x).  Then graph several of the partial sums and arctan(x) on the same axis.

Let g(x)=(∑_(n=0)^∞)(((((-1))^n)(x^(2n)))/((2n)!)).  Write a function that allows you to easily graph several of the partial sums for this power series.  Display the partial sums that are polynomials of degree 2, 4, 6, and 8.  Then graph the 3-rd, 6-th, 8-th, 10-th, and 20-th partial sums on the same set of axes (on the interval [-12, 12] and an appropriate range).

Write the power series representation for g’(x), the derivative of the power series in the previous exercise.  Write a function that allows you to easily graph several of the partial sums for the series g’(x).  Display the partial sums that are polynomials of degree 1, 3, 5, and 7.  Then graph the 3-rd, 6-th, 8-th, 10-th, and 20-th partial sums on the same set of axes (on the interval [-12, 12] and an appropriate range).

Now repeat the process for g’’(x).  Based on these graphs, what do you think the “common” name is for the function g(x)?