[Math] Third degree Taylor series of $f(x) = e^x \cos{x} $

power seriesreal-analysissequences-and-seriestaylor expansion

Suppose you have the function: $$f(x) = e^x \cos{x} $$
and you need to find the 3rd degree Taylor Series representation. The way I have been taught to do this is to express each separate function as a power series and multiply as necessary for the 3rd degree. For example for
$$ \cos x =\sum_{n=0}^\infty (-1)^n\frac{ x^{2n}}{(2n)!} = 1-\frac{x^2}{2!}+\frac{x^4}{4!}+\cdots \text{ and } e^x =\sum_{n=0}^\infty \frac{x^n}{n!} = 1 + x + \frac{x^2}{2!} + \frac{x^3}{3!}+\cdots $$ multiply the terms on the right of each until you get the 3rd degree.

Logically, I am happy. However, I have not seen a theorem or any rule that says you can just multiply series in this way. Doing it this way, is there a guarantee that I will always get the power series representation of $f(x)$?

Additionally, if instead of multiplying, functions were being added? Would the above hold true – take the series of each function and add up the necessary terms?

Best Answer

Taylor's theorem allows you to use the Big O notation: $$\cos(x)= 1-\frac{x^2}{2!}+O(x^4)\quad\mbox{and}\quad e^x=1 + x + \frac{x^2}{2!} + \frac{x^3}{3!}+O(x^4).$$ Therefore $$e^x\cos(x)=1 + x + \frac{x^2}{2!} + \frac{x^3}{3!}+O(x^4)-\frac{x^2}{2!}(1+x+O(x^2))=1+x-\frac{x^3}{3}+O(x^4).$$

Related Question