MapleTaylor.mws

Power Series and Taylor Graphs

using Maple

>    with(plots):

Warning, the name changecoords has been redefined

Here is the graph for the function in Power Series Example 3.

>    plot(sum((-1)^(n+1)*(x/3)^n/(4*n),n=1..100),x=-2.99..2.99,thickness=3,labels=[x,y]);

[Maple Plot]

>    evalf((2/3)^101/(4*101));

.4058835687e-20

Below we see the construction of some Taylor polynomial approximations for exp(x) .

>    taylor(exp(x),x=0);

series(1+1*x+1/2*x^2+1/6*x^3+1/24*x^4+1/120*x^5+O(x^6),x,6)

If you increase the value of "Order" you will get more terms.

>    Order:=10;

Order := 10

>    taylor(exp(x),x=0);

series(1+1*x+1/2*x^2+1/6*x^3+1/24*x^4+1/120*x^5+1/720*x^6+1/5040*x^7+1/40320*x^8+1/362880*x^9+O(x^10),x,10)

>    t:=taylor(exp(x),x=0);

t := series(1+1*x+1/2*x^2+1/6*x^3+1/24*x^4+1/120*x^5+1/720*x^6+1/5040*x^7+1/40320*x^8+1/362880*x^9+O(x^10),x,10)

>    p:=convert(t,polynom);

p := 1+x+1/2*x^2+1/6*x^3+1/24*x^4+1/120*x^5+1/720*x^6+1/5040*x^7+1/40320*x^8+1/362880*x^9

>    eGraph:=plot(exp(x),x=-7..7,thickness=3):

>    ePolyGraph:=plot(p,x=-7..7,thickness=3,color=blue):

>    display(eGraph,ePolyGraph);

[Maple Plot]

>