Mathematica Tool 1

This notebook is designed to be used with Activity 2 in section 10.2

f[x_]:=Sin[x]
(Subscript[P, 1])[x_]:=x
(Subscript[P, 3])[x_]:=x-((x^3)/6)
(Subscript[P, 5])[x_]:=x-((x^3)/6)+((x^5)/120)
Plot[{f[x],(Subscript[P, 1])[x],(Subscript[P, 3])[x],(Subscript[P, 5])[x]},{x,-2 π,2 π},PlotRange->{{-2 π,2 π},{-3,3}},PlotStyle->{{Red,Thickness[0.02]},{Green,Thickness[0.01]},{Blue,Thickness[0.01]},{Brown,Thickness[0.01]}}]

(Subscript[E, 1])[x_]:=f[x]-(Subscript[P, 1])[x]
(Subscript[E, 3])[x_]:=f[x]-(Subscript[P, 3])[x]
(Subscript[E, 5])[x_]:=f[x]-(Subscript[P, 5])[x]
Plot[{(Subscript[E, 1])[x],(Subscript[E, 3])[x],(Subscript[E, 5])[x]},{x,-(π/2),(π/2)},PlotRange->{{-(π/2),(π/2)},{-0.05,0.05}},PlotStyle->{{Green,Thickness[0.01]},{Blue,Thickness[0.01]},{Brown,Thickness[0.01]}}]