[Math] Finding the Taylor Series Approximation of $\sin(x)$ at $x=\pi/4$

taylor expansion

I'm trying to find a Taylor series approximation for $\sin(x)$ at $\pi/4$.

Simply going through the derivatives, I get:
\begin{align}
f(\pi/4) &= \frac{1}{\sqrt{2}}\\
f'(\pi/4) &= \frac{1}{\sqrt{2}}\\
f''(\pi/4) &= -\frac{1}{\sqrt{2}}\\
f^{(3)}(\pi/4) &= -\frac{1}{\sqrt{2}}\\
f^{(4)}(\pi/4) &= \frac{1}{\sqrt{2}}
\end{align}
Using the Taylor series approximation formula (http://upload.wikimedia.org/math/c/3/a/c3a379aaf2b04999084373279ed2da10.png), do I simply sub in pi/4 wherever I see an a?

WolframAlpha solved it like this: http://i.imgur.com/LN8SW0b.png so I'm probably doing something wrong.

Best Answer

You've calculated the derivatives correctly; so yes, you would just substitute in $\frac{\pi}4$ wherever you see an $a$. This would yield, as the start of the sum: $$\sin(x)=\frac{1}{\sqrt{2}}+\frac{x-a}{\sqrt{2}}-\frac{(x-a)^2}{\sqrt{2}\cdot 2!}-\frac{(x-a)^3}{\sqrt{2}\cdot 3!}+\frac{(x-a)^4}{\sqrt{2}\cdot 4!}+\ldots$$ What Wolfram|Alpha is doing is, to get the proper alternation of signs in the terms (i.e. +, +, -, -, +, +, -, -, ...) is using the term $\sqrt{2}\sin(\frac{1}4(\pi+2n\pi))$ (though it cancelled the $\sqrt{2}$ with the one in the denominator of your expansion) which, as $n$ increases yields the sequence $1$, $1$, $-1$, $-1$, $1$, $1$, \ldots

Related Question