?Sum

?Factorial

poltaylor[fun_,x0_,n_]:=fun[x0]+Sum[
(D[fun[x],{x,k}]/.x->x0)*(x-x0)^k/Factorial[k],
{k,1,n}]

f[x_]:=2x^3-3x+1

g[x_]:=x^3-2x+1

poltaylor[f,0,5]

poltaylor[Sin,0,5]

poltaylor[Sin,1,5]

poltaylor[Sin,1.,5]

poltaylor[fun,x0,5]

poltaylor[fun,x0,n]

Expand[poltaylor[Sin,1.,5]]

Expand[poltaylor[Sin,1.,20]]

poltaylor[Sin,x0,5]

Expand[poltaylor[Sin,x0,5]]

Collect[Expand[poltaylor[Sin,x0,5]],x]

Evaluate[poltaylor[Sin,0,3]]

Plot[{Sin[x],poltaylor[Sin,0,3]}//Evaluate,{x,-Pi,Pi}]

Plot[{Sin[x],poltaylor[Sin,0,1]}//Evaluate,{x,-Pi,Pi}]

Manipulate[Plot[{Sin[x],poltaylor[Sin,0,n]}//Evaluate,{x,-Pi,Pi},Epilog->{Line[{{Pi,0},{Pi,poltaylor[Sin,0,n]/.x->Pi}}]}],{{n,1},0,10,1}]

Manipulate[Plot[{Sin[x],poltaylor[Sin,1,n]}//Evaluate,{x,1-Pi,1+Pi}],{{n,1},0,20,1}]

Table[{n,N[Pi^(n+1)/Factorial[n+1],10]},{n,0,20}]//TableForm

Table[{n,N[Pi^(n+1)/Factorial[n+1],10],N[(2Pi)^(n+1)/Factorial[n+1],10]},{n,0,30}]//TableForm

Manipulate[Plot[{Sin[x],poltaylor[Sin,x0,n]}//Evaluate,{x,-2Pi,2Pi},Epilog->{Point[{x0,Sin[x0]}],Line[{{Pi,0},{Pi,poltaylor[Sin,x0,n]/.x->Pi}}],Line[{{2Pi,0},{2Pi,poltaylor[Sin,x0,n]/.x->2Pi}}]},PlotRange->{{-2Pi,2Pi},{-6,6}}],{{n,1},0,20,1},{{x0,0},-2Pi,2Pi}]

Manipulate[Plot[{Sin[x],poltaylor[Sin,0,n]}//Evaluate,{x,-2Pi,2Pi},Epilog->{Line[{{Pi,0},{Pi,poltaylor[Sin,0,n]/.x->Pi}}],Line[{{2Pi,0},{2Pi,poltaylor[Sin,0,n]/.x->2Pi}}]}],{{n,1},0,20,1}]