Taylor Polynomials/Series

f[x]=Exp[x]

McLaurin Polynomials of f[x]=Exp[x]

Below, we list the first 10 derivatives of  f[x]=Exp[x] = (e^x) evaluated  at x = 0

(derivs=Table[D[Exp[x], {x, k}],{k,0,10}]//Simplify)//TableForm;
derivsAt0=derivs/.x->0

Below, we list the first 10
 McLaurin Polynomials for f[x]=Exp[x] = (e^x)
Note that the denomiantors are factorials and the n th McLaurin Polynomial is given by 
(Subscript[T, n])[x]     =    (∑_(k=0)^n)(((f^k)(0)(x^k))/(k!))=1 + x + ((x^2)/(2!)) + ((x^3)/(3!)) + ..... + ((x^n)/(n!))

Table[Series[Exp[x],{x,0,k}]//Normal,{k,0,10}]//TableForm

Below we show the graph of y = Exp[x] in blue and the graphs of the McLaurin Polynomials of degree n, where n ranges from 0 to 80. We see that as the degree of the polynomial increases, we get better approximations to the values of the function Exp[x] for values of x further from 0.  Not that for all of these polynomials (Subscript[T, n])[0]     =    Exp[0] = 1

taylorpolys[fn_,{x_,a_,b_}, PlotRange->{c_,d_}]:=Manipulate[Plot[Evaluate[{fn,Normal[Series[fn,{x,0,degree}]]}],{x,a,b},PlotRange->{c,d}],{degree,0,80,1,Appearance->"Labeled"}];
taylorpolys[Exp[x],{x,-35,10},PlotRange->{-20,100}]

Taylor Polynomials of f[x] = Exp[x] at x = 1

Below, we list the first 10 derivatives of  f[x]=Exp[x] = (e^x) evaluated  at x = 1

(derivs=Table[D[Exp[x], {x, k}],{k,0,10}]//Simplify)//TableForm;
derivsAt0=derivs/.x->1

Below, we list the first 10
 Taylor  Polynomials for f[x]=Exp[x] = (e^x) at x = 1
Note that the denomiantors are factorials and the n th Taylor  Polynomial is given by 
(Subscript[T, n])[x]     =    (∑_(k=0)^n)(((f^k)(1)(x^k))/(k!))=e + e(x-1) + (((e(x-1))^2)/(2!)) + (((e(x-1))^3)/(3!)) + ..... + (((e(x-1))^n)/(n!))

Table[Series[Exp[x],{x,1,k}]//Normal,{k,0,10}]//TableForm

Below we show the graph of y = Exp[x] in blue and the graphs of the Taylor Polynomials of degree n at x = 1, where n ranges from 0 to 80. We see that as the degree of the polynomial increases, we get better approximations to the values of the function Exp[x] for values of x further from 1.  Not that for all of these polynomials (Subscript[T, n])[1]     =    Exp[1] = e

taylorpolyse[fn_,e_,{x_,a_,b_}, PlotRange->{c_,d_}]:=Manipulate[Plot[Evaluate[{fn,Normal[Series[fn,{x,e,degree}]]}],{x,a,b},PlotRange->{c,d}],{degree,0,80,1,Appearance->"Labeled"}];
taylorpolyse[Exp[x],1,{x, -20,20},PlotRange->{-1,100}]

Below we show the graphs of the remainders (Subscript[R, n])[x]     =    Exp[x]-(Subscript[T, n])[x]    where (Subscript[T, n])[x]     =    (∑_(k=0)^n)(((f^k)(0)(x^k))/(k!))=1+x+((x^2)/(2!))+((x^3)/(3!))+.....+((x^n)/(n!))

remainders[fn_,{x_,a_,b_}, PlotRange->{c_,d_}]:=Manipulate[Plot[Evaluate[{fn-Normal[Series[fn,{x,0,degree}]]}],{x,a,b},PlotRange->{c,d}],{degree,0,80,1,Appearance->"Labeled"}];
remainders[Exp[x],{x,-4,4},PlotRange->{-100,100}]

remainders[fn_,{x_,a_,b_}, PlotRange->{c_,d_}]:=Manipulate[Plot[Evaluate[{fn-Normal[Series[fn,{x,0,degree}]]}],{x,a,b},PlotRange->{c,d}],{degree,0,80,1,Appearance->"Labeled"}];
remainders[Exp[x],{x,-.7,.7},PlotRange->{-.001,.001}]

Below, we show the graphs of the Taylor Polynomials at a = 2.

taylorpolyse[fn_,e_,{x_,a_,b_}, PlotRange->{c_,d_}]:=Manipulate[Plot[Evaluate[{fn,Normal[Series[fn,{x,e,degree}]]}],{x,a,b},PlotRange->{c,d}],{degree,0,80,1,Appearance->"Labeled"}];
taylorpolyse[Exp[x],2,{x, -2,4},PlotRange->{-1,60}]

Below, we show the remainders 
(Subscript[R, n])[x]     =    Exp[x]-(Subscript[T, n])[x]    where (Subscript[T, n])[x]     =    (∑_(k=0)^n)(((f^k)(2)(((x- 2))^k))/(k!))=1+(x-2)+((((x-2))^2)/(2!))+((((x-2))^3)/(3!))+.....+((((x-2))^n)/(n!))

remainders[fn_,{x_,a_,b_}, PlotRange->{c_,d_}]:=Manipulate[Plot[Evaluate[{fn-Normal[Series[fn,{x,2,degree}]]}],{x,a,b},PlotRange->{c,d}],{degree,0,10,1,Appearance->"Labeled"}];
remainders[Exp[x],{x,-2,4},PlotRange->{-1,1}]

f[x]=Cos[x]

McLaurin Polynomials of f[x]=Cos[x]

Below, we list the first 10 derivatives of  f[x]=Cos[x]

(derivs=Table[D[Cos[x], {x, k}],{k,0,10}]//Simplify)//TableForm

Below, we list the first 10 derivatives of  f[x]=Cos[x]  evaluated  at x = 0

(derivs=Table[D[Cos[x], {x, k}],{k,0,10}]//Simplify)//TableForm;derivsAt0=derivs/.x->0

Below, we list the first 10
 McLaurin Polynomials for f[x]=Cos[x] 
Note that the denomiantors are factorials and the n th McLaurin Polynomial is given by 
(Subscript[T, 2n])[x]     = (∑_(k=0)^(2n))(((f^k)( 0)(((x))^k))/(k!)) =   (∑_(k=0)^n)(((((-1))^k)(x^(2k)))/((2k)!))=1 - ((x^2)/(2!)) + ((x^4)/(4!)) + ..... + (((((-1))^k)(x^(2n)))/((2n)!))
Note also that (Subscript[T, 2n])[x] = (Subscript[T, 2n+1])[x]

Table[Series[Cos[x],{x,0,k}]//Normal,{k,0,10}]//TableForm

Below we show the graph of y = Cos[x] in blue and the graphs of the McLaurin Polynomials of degree n, where n ranges from 0 to 80. We see that as the degree of the polynomial increases, we get better approximations to the values of the function Cos[x] for values of x further from 0.  Not that for all of these polynomials (Subscript[T, n])[0]     =    Cos[0] = 1

taylorpolys[fn_,{x_,a_,b_}, PlotRange->{c_,d_}]:=Manipulate[Plot[Evaluate[{fn,Normal[Series[fn,{x,0,degree}]]}],{x,a,b},PlotRange->{c,d}],{degree,0,80,1,Appearance->"Labeled"}];
taylorpolys[Cos[x],{x,-35,35},PlotRange->{-3,3}]

Taylor Polynomials of f[x] = Cos[x] at x = (π/2)

Below, we list the first 10 derivatives of  f[x]=Cos[x]  evaluated  at x =  (π/2)

(derivs=Table[D[Cos[x], {x, k}],{k,0,10}]//Simplify)//TableForm;
derivsAt0=derivs/.x->Pi/2

Below, we list the first 10
 Taylor  Polynomials for f[x]=Cos[x]  at x =  (π/2)
Note that the denomiantors are factorials and the n th Taylor  Polynomial is given by 
(Subscript[T, (2n+1)])[x]     =    (∑_(k=0)^(2n+1))(((f^k)( (π/2))(((x- (π/2)))^k))/(k!))=  - (x- (π/2)) + ((((x- (π/2)))^3)/(3!)) -  ((((x- (π/2)))^5)/(5!)) + ..... + (((((-1))^(n + 1))(((x- (π/2)))^((2n+1))))/((2n+1)!))
Note also that (Subscript[T, (2n+1)])[x]     =    (Subscript[T, (2n)])[x]

Table[Series[Cos[x],{x,Pi/2,k}]//Normal,{k,0,10}]//TableForm

Below we show the graph of y = Cos[x] in blue and the graphs of the Taylor Polynomials of degree n at x = (π/2), where n ranges from 0 to 80. We see that as the degree of the polynomial increases, we get better approximations to the values of the function Cos[x] for values of x further from (π/2).  Not that for all of these polynomials (Subscript[T, n])[(π/2)]     =    Cos[(π/2)] = 0

taylorpolyse[fn_,e_,{x_,a_,b_}, PlotRange->{c_,d_}]:=Manipulate[Plot[Evaluate[{fn,Normal[Series[fn,{x,e,degree}]]}],{x,a,b},PlotRange->{c,d}],{degree,0,80,1,Appearance->"Labeled"}];
taylorpolyse[Cos[x],Pi/2,{x, -20,20},PlotRange->{-3,3}]

Below we show the remainder functions (Subscript[R, n])[x]   = Cos[x] - (Subscript[T, n])[x]   at a = 0

remainders[fn_,{x_,a_,b_}, PlotRange->{c_,d_}]:=Manipulate[Plot[Evaluate[{fn-Normal[Series[fn,{x,0,degree}]]}],{x,a,b},PlotRange->{c,d}],{degree,0,80,1,Appearance->"Labeled"}];
remainders[Cos[x],{x,-50,50},PlotRange->{-2,2}]

Below we show the remainder functions (Subscript[R, n])[x]   = Cos[x] - (Subscript[T, n])[x]   at a =   (π/2)

remainder[fn_,e_,{x_,a_,b_}, PlotRange->{c_,d_}]:=Manipulate[Plot[Evaluate[{fn-Normal[Series[fn,{x,e,degree}]]}],{x,a,b},PlotRange->{c,d}],{degree,0,20,1,Appearance->"Labeled"}];
remainder[Cos[x],Pi/2,{x, Pi/4,(3*Pi)/4},PlotRange->{-.01,.01}]

f[x]=ln[1+x]

McLaurin Polynomials of f[x]=ln[x]

Below, we list the first 10 derivatives of  f[x]=ln[1+x]  , note that (f^k)(x) = (((((-1))^((k-1)))(k-1)!)/(((1+x))^k)) if k > 0

(derivs=Table[D[Log[1+x], {x, k}],{k,0,10}]//Simplify)//TableForm

Below, we list the first 10 derivatives of  f[x]=ln[1+x]  evaluated  at x = 0

(derivs=Table[D[Log[1+x], {x, k}],{k,0,10}]//Simplify)//TableForm;derivsAt0=derivs/.x->0

Below, we list the first 10
 McLaurin Polynomials for f[x]=ln[1+x] 
We get 
(Subscript[T, n])[x]     = (∑_(k=0)^n)(((f^k)( 0)(((x))^k))/(k!))  =f(0) +  (∑_(k=1)^n)(((((-1))^((k-1)))(k-1)!(x^k))/(k!))=  (∑_(k=1)^n)(((((-1))^((k-1)))(x^k))/k) =x - ((x^2)/2) + ((x^3)/3) + ..... + (((-1))^((n-1)))((x^n)/n)
if n > 0

Table[Series[Log[1+x],{x,0,k}]//Normal,{k,0,10}]//TableForm

Below we show the graph of y = Log[1+x] in blue and the graphs of the McLaurin Polynomials of degree n, where n ranges from 0 to 80. We see that as the degree of the polynomial increases, we get better approximations to the values of the function Log[x] for values of x further from 0. 
Note that the radius of convergence of the Taylor series here is 1, so the approximations fail to converge to the values of the function ln(1+x) outside of the interval (-1,1).
 Not that for all of these polynomials (Subscript[T, n])[0]     =    Log[1+0] = 0

taylorpolys[fn_,{x_,a_,b_}, PlotRange->{c_,d_}]:=Manipulate[Plot[Evaluate[{fn,Normal[Series[fn,{x,0,degree}]]}],{x,a,b},PlotRange->{c,d}],{degree,0,80,1,Appearance->"Labeled"}];
taylorpolys[Log[1+x],{x,-10,10},PlotRange->{-10,10}]

Taylor Polynomials of f[x] = Cos[x] at x = (π/2)

Below, we list the first 10 derivatives of  f[x]=Cos[x]  evaluated  at x =  (π/2)

(derivs=Table[D[Cos[x], {x, k}],{k,0,10}]//Simplify)//TableForm;
derivsAt0=derivs/.x->Pi/2

Below, we list the first 10
 Taylor  Polynomials for f[x]=Cos[x]  at x =  (π/2)
Note that the denomiantors are factorials and the n th Taylor  Polynomial is given by 
(Subscript[T, (2n+1)])[x]     =    (∑_(k=0)^n)(((f^k)( (π/2))(((x- (π/2)))^k))/(k!))=  - (x- (π/2)) + ((((x- (π/2)))^3)/(3!)) -  ((((x- (π/2)))^5)/(5!)) + ..... + (((((-1))^(n + 1))(((x- (π/2)))^((2n+1))))/((2n+1)!))
Note also that (Subscript[T, (2n+1)])[x]     =    (Subscript[T, (2n)])[x]

Table[Series[Cos[x],{x,Pi/2,k}]//Normal,{k,0,10}]//TableForm

Below we show the graph of y = Cos[x] in blue and the graphs of the Taylor Polynomials of degree n at x = (π/2), where n ranges from 0 to 80. We see that as the degree of the polynomial increases, we get better approximations to the values of the function Cos[x] for values of x further from (π/2).  Not that for all of these polynomials (Subscript[T, n])[(π/2)]     =    Cos[(π/2)] = 0

taylorpolyse[fn_,e_,{x_,a_,b_}, PlotRange->{c_,d_}]:=Manipulate[Plot[Evaluate[{fn,Normal[Series[fn,{x,e,degree}]]}],{x,a,b},PlotRange->{c,d}],{degree,0,80,1,Appearance->"Labeled"}];
taylorpolyse[Cos[x],Pi/2,{x, -20,20},PlotRange->{-3,3}]