Checking work Taylor Series

55 Views Asked by At

I want to check my work, I am constructing a taylor series formula for $$f(x)=\cos(x) + \sin(x)$$

So I know

$$\cos(x) = \sum_{n=0}^{\infty} (-1)^{n} \frac{x^{2n}}{2n!} $$

then $$\cos(x) + \sin(x) = \sum_{n=0}^{\infty} (-1)^{n} \frac{x^{2n}}{(2n)!} + (-1)^{n} \frac{x^{2n+1}}{(2n+1)!}$$

If im wrong could I get some guidance? I haven't done calculus in years.

1

There are 1 best solutions below

0
On BEST ANSWER

It is better to have a single term.

Use $$\cos(x)=\frac{1}{2} \left(e^{i x}+e^{-i x}\right)\qquad \text{and} \qquad \sin(x)=-\frac{i}{2} \left(e^{i x}-e^{-i x}\right)$$ Now, use the series expansion of the exponentials to get $$\cos(x)+\sin(x)=\sum_{n=0}^\infty \frac{\left(\frac{1}{2}+\frac{i}{2}\right) \left((-i)^n-i i^n\right)}{n!}x^n=\sum_{n=0}^\infty \frac{\sin \left(\frac{\pi n}{2}\right)+\cos \left(\frac{\pi n}{2}\right)}{n!} x^n$$

You could prefer $$\cos(x)+\sin(x)=\sum_{n=0}^\infty \frac{i^{(n-1) n}}{n!}x^n$$