I am asked to give a sharp upper bound on the remainder term $R_2(x)$ on the interval $[0,1]$ for the Taylor polynomial about $x=0 $ of the function $f(x)=e^x \cos(x)$.
So far I have worked through the problem but I am unsure of my final steps, I feel that I can improve on my estimation, but do not know a good method.
I will first determine the derivatives and the Taylor polynomial about $x=0$, denote it by $P_2 (x)$:
We are asked to give the second-order Taylor polynomial about $x=0$ of the function $f(x)= e^x \cos(x)$ we first determine the constant term: $$f(0)= e^0 \cos(0)= 1 \cdot 1=1$$ Using the product rule we find: $$ f'(x)= e^x \cos(x) - e^x \sin(x)= e^x(\cos(x)-\sin(x))$$ Hence: $$ f' (0)= e^0 (\cos(0) - \sin(0))= 1 \cdot(1-0) =1$$ We move to the next step of differentiation: $$ f '' (x)= e^x (\cos(x)-\sin(x))+ e^x (-\sin(x)-\cos(x))= -2 \cdot e^x( \sin(x))$$ $$ f'' (0)= -2 \cdot 1 \cdot 0 =0$$ We find that: $$ P_2 (x)=1 + x $$
The remainder term for some $\xi \in [0, x]$ and $x \in \mathbb R$ is now given by: $$ R_2 (x) = \frac{(x-0)^3}{(3!)} f'''(\xi)$$ We first determine $f'''(x)$, recall that: $$ f'' (x) = -2e^x \sin(x)$$ We again employ the product rule and collect the exponential: $$ f'''(x)= -2 e^x \sin(x) -2e^x \cos(x) =-2 e^x(\sin(x) + \cos(x))$$ Such that we find: $$ R_2 (x) = - \frac{2}{6} x^3 e^\xi (\sin \xi + \cos \xi )= - \frac{1}{6} x^3 e^\xi (\sin \xi + \cos \xi )$$ We will now determine an upper bound for $x \in [0,1]$. Recall that from high school we can combine trigonometric functions as: $$\cos \xi + \sin \xi = \sqrt2 \sin(\xi + \frac{\pi}{4}) $$ We will now use this, so observe: $$ |R_2 (x)| = |- \frac{1}{3} x^3 e^\xi (\sin \xi + \cos \xi )|= \frac{\sqrt{2}}{3}|x|^3 e^{\xi} |\sin(\xi + \pi / 4)|$$ Since the exponent is a a strictly positive function and since the absolute value of a product is the product of absolute values. Observe the $\sin$ function is bounded by $1$ and that $\xi \in [0,x]$ hence $ 0 \leq \xi \leq 1$, we use this to write: $$\boxed{ |R_2|\leq \frac{\sqrt 2}{3} 1^3 e^1 \cdot 1 = \frac{\sqrt 2 e}{3} \approx 1.28}$$
**This is my final bound, but of course, the $\sin (x + \pi /4)$ is maximal whenever $x= \pi/4 \neq 1$. I need some better argument to make this bound sharper. At least, I think so. **
Actually, we know that in the interval $[0, 1]$, we have the value $\frac{\pi}{4}$ and the cosine is maximal here. If we do not get rid of the $x$ we get a polynomial upper bound. In this case we get: $$ \boxed{ |R_2|\leq \frac{\sqrt 2}{3} e^{\pi/4} \cdot x^3\approx 1.033922 x^3} $$ this was the desired approach to the question, as it turned out.
The mistake I made earlier in this question was using both $x=\pi/4$ and $x=1$ to get an extremal value for $\sin(x)+\cos(x)$ and $e^x$ respectively. Instead, picking one is enough. This gives a sharper upper bound, as desired.