Power Series Expansion - 2 Examples

f(x)=sin(x)

Manipulate[
Show[
Plot[
{Sin[θ],Evaluate[Normal[Series[Sin[θ],{θ,θ0,n}]]]},{θ,-π,π},
PlotRange->{{-π,π},{-1.1,1.1}},
PlotStyle->{{RGBColor[0, 0.501961, 1],Thickness[0.010]},{Thick,Orange}},
ImageSize->600,
AspectRatio->0.8,
LabelStyle->(FontSize->12)
],
ListPlot[
{{θ0,Sin[θ0]}},
PlotStyle->{Black,PointSize[0.015]}
]
],
{{n,1,"n"},1,41,1, Appearance->"Labeled"},
{{θ0,0,"(Subscript[θ, 0])"},-π,π,(π/12), Appearance->"Labeled"}
]

f(x)=(e^x)cos(x), (Boas example 1-13-G)

Manipulate[
Show[
Plot[
{(E^x)Cos[x],Evaluate[Normal[Series[(E^x)Cos[x],{x,x0,n}]]]},{x,-3,3},
PlotRange->{{-3,3},{-10,3}},
PlotStyle->{{RGBColor[0, 0.501961, 1],Thickness[0.010]},{Thick,Orange}},
ImageSize->600,
AspectRatio->0.8,
LabelStyle->(FontSize->12)
],
ListPlot[
{{x0,(E^x0)Cos[x0]}},
PlotStyle->{Black,PointSize[0.015]}
]
],
{{n,0,"n"},0,26,1, Appearance->"Labeled"},
{{x0,0,"(Subscript[x, 0])"},-2.9,2.5,0.1, Appearance->"Labeled"}
]