> | taylor(sin(x),x=0,6); |
> | T5:=x->1*x-1/6*x^3+1/120*x^5; |
> | plot({sin(x),T5(x)},x=0..7.5,y=-10..10,thickness=2); |
> | taylor(sin(x),x=0,10); |
> | T10:=x->1*x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9; |
> | plot({sin(x),T10(x)},x=0..7.5,y=-10..10,thickness=2); |
> | taylor(sin(x),x=0,16); |
> | T15:=x->1*x-1/6*x^3+1/120*x^5-1/5040*x^7+1/362880*x^9-1/39916800*x^11+1/6227020800*x^13-1/1307674368000*x^15; |
> | plot({sin(x),T15(x)},x=-3..7.5,y=-3..3,thickness=2); |
> | evalf(sin(6)); |
> | evalf(T15(6)); |
> | evalf(sin(6)-T15(6)); |
> | evalf(T15(6-2*Pi)); |
> | evalf(sin(6)-T15(6-2*Pi)); |
> | evalf(T5(6-2*Pi)); |
> | evalf(sin(6)-T5(6-2*Pi)); |
> | T3:=x->1*x-1/6*x^3; |
> | evalf(T3(6-2*Pi)); |
> | evalf(sin(6)-T3(6-2*Pi)); |
> | evalf(T3(6-2*3.14159)); |
> | evalf(sin(6)-T3(6-2*3.14159)); |
> | plot({sin(x),T3(x),T5(x),T10(x),T15(x)},x=-8..8,y=-10..10,thickness=2); |
> | evalf[2009](sin(6)); |
> |
> |