I'm doing some stuff with Taylor Polynomials on Maple. In particular, I'm trying to find the second order Taylor Polynomial of e^x cos x. I'm using the "taylor" command.
This is what I have so far:
> f := proc (x) options operator, arrow; exp(x)*cos*x end proc;
x -> exp(x) cos x
> s2 := taylor(f(x), x = (1/3)*Pi, 2);
> p2 := convert(s2, polynom);
1 /1 \
- exp|- Pi| cos Pi
3 \3 /
/ /1 \ 1 /1 \ \ / 1 \
+ |exp|- Pi| cos + - exp|- Pi| cos Pi| |x - - Pi|
\ \3 / 3 \3 / / \ 3 /
> y1 := evalf(subs(x = .5, f(x)));
> y2 := evalf(subs(x = .5, p2));
Everything looks fine until the last two lines.
How do I interpret ".8243606355*cos" ? Cosine should have an argument. Am I messing up something with my code, or is this standard in Maple language?