PowerSeries illustrates power series and partial sums of power series. The power series itself is defined in the P input box and should look similar to sum(n,0,nmax,(x-c)^n), where the last expression is the term being summed. It should be based on (x-c) so that the user can change c and move the center point for the series. For a Taylor polynomial version of the applet, use the ShowF parameter and set the P expression to sum(n,0,nmax,Deriv(t,c,f(t),n)*(x-c)^n/n!). You can then just change the definition of f(x) to get a new Taylor polynomial. Be careful of setting nmax too large when illustrating a Taylor polynomial for a function whose successive derivatives get more complex, as the program run time to redraw the graph can become very long.
The applet tag that creates the applet is as follows:<applet code="net.sourceforge.webcompmath.calculus.PowerSeries" codebase="../../assets"
archive="webcompmath.jar,calculus.jar" height="400" width="500">
<param name="UseLoadButton" value="no" />
<param name="Example1" value="1. Geomeric Power Series;sum(n,0,nmax,(x-c)^n);1;10;0;0;10;-5,5,-1,6.3" />
<param name="Example2" value="2. Another Geomeric Power Series;sum(n,0,nmax,(1/3)^n*(x-c)^n);1;10;0;0;10;-5,5,-1,6.3" />
<param name="Example3" value="3. A More Complex Series;sum(n,0,nmax,(-1)^n*(x-c)^(2n)/(2n)!);1;10;0;0;10;-8,8,-2,2" />
<param name="Example4" value="4. Very Limited Convergence;sum(n,0,nmax,n!(x-c)^n);1;10;0;0;10;-2,2,-0.3,2.65" />
This applet takes the following parameters:
Param Name Type Default Description Example1, ... String N/A Each example is a list of strings separated by semicolons. The strings, in order, are:
1. The name of the example, displayed in the example menu.
2. The expression for P, the power series. Should like like sum(n,0,nmax,(x-c)^n), with the last expression define as appropriate to the example.
3. The f(x) function definition. Must be set even if not used (i.e., just set it to "0" or "1").
4. The value for nmax.
5. The value for c.
6. The value for x.
7. The maximum value for the nmax slider. Helps reduce the chance that the user makes nmax too big on Taylor polynomials where the successive derivatives get more complex, resulting in very long redraw times.
8. The xmin, xmax, ymin, and ymax for the graph, as a comma-separated list of numbers.
ShowF yes/no no If "yes", then a function input box will be displayed to enter the definition of a function. The function is also graphed, and its value displayed in a text string on the graph. Useful for creating a Taylor polynomial applet where you define the power series using the standard Taylor formula, and then define f as the function being approximated.