Expressing the sign pattern $+--++--+\cdots$ in a series

93 Views Asked by At

I had to find the Taylor series for the function $f(x)=\cos(x)$ centred at $a=\frac{\pi}{4}$.

I found the pattern but the only part I'm missing is the sign. Since the series is centred at $\frac{\pi}{4}$, no value of $f^{\{n\}}(a)$ is equal to zero, and the pattern is $+, -, -, +, +, -, -, +$.

I have checked the answer that my teacher put in the document, but he just wrote

$$f(x) = \sum_{n=0}^{\infty}{\text{sign} \frac{\sqrt{2}}{2(n!)}}\left(x-\frac{\pi}{4}\right)^n$$ here $\text{sign} =+--++--++--+ \cdots$

which I find rather disappointing...

Is there a mathematical way to insert the sign pattern into the series, similarly to $(-1)^n$ for a normal alternating series?

2

There are 2 best solutions below

2
On

What about $$\frac{\cos(\pi/4+n\pi/2)}{\cos(\pi/4)}$$

1
On

One simple method that clearly shows your intentions is: $$(-1)^{\left\lfloor\frac{n+1}{2}\right\rfloor}$$ Mathematically cleaner, but not so transparent: $$(-1)^{\frac12n(n+1)}$$ Having said that, your teacher's method is easier to read than either of these solutions.