# Finding general term

So I was given the following prompt:

"For the following, use the definition to find the Taylor (or Maclaurin) series centered at c for the function. When writing your answers, be sure to list the first 4 non-zero terms and the general term."

$$f(x)=\sin(2x), \ \ \ c=0.$$

I guess I'm confused on how I'd find the general term from this, I worked out the Maclaurin series to look something like the following: $$P_n(x)=2x-\frac{4}{3}x^3+\frac{4}{15}x^5-\frac{8}{315}x^7$$. I understand that I needed to look for the pattern here to find the general term, but I don't know where I'd start for that and I also didn't know if there was an easier way to do this through a formula. Any help would be appreciated!

• If it is hard to guess from the explicit coefficients, use instead the formula for the coefficients in terms of the successive derivatives of $f$ evaluated at $0$. The coefficients have the form $f^{(n)}(0)/n!$. Compute a few of the derivatives (before evaluating at $x=0$) and you will see its form.
– plop
May 11, 2021 at 14:23

Your Maclauren series is correct. If you look at how you got the terms before you canceled the $$2$$s to reduce to lowest terms you can see the general term is $$\pm \frac {2^n}{n!}$$.
That doesn't get you a Taylor series centered at $$c$$. Clearly the constant term is $$\sin 2c$$ and you will have terms of all orders because the sine function is not odd around $$c$$ in general. You can either use the Taylor series formula or write $$\sin(2(c+x))=\sin(2c)\cos (2x) + \cos(2c) \sin (2x)$$
and use the Maclauren series for both sine and cosine modified as above for the factor $$2$$

When you have the problem of $$\lim_{x\to c} \, f(x)$$ or Taylor expansions around $$x=c$$, it makes life easier to let $$x=y-c$$ in order to work around $$y=0$$.

Doing what @Ross Millikan answered, in the most compact form, you should get $$\sin(2x)=\sum_{n=0 }^\infty \frac{2^n \sin \left(2 c+n\frac{\pi }{2}\right)}{n!} (x-c)^n$$

You can make computing the Taylor series somewhat easier by considering the complex exponential,

$$e^{inx}=\cos(nx)+i\sin(nx)$$

where $$i=\sqrt{-1}$$. Let $$n=2$$; then the imaginary parts of $$e^{2ix}$$ and its derivatives make up the Taylor expansion of $$f(x)$$.

Written in this way, the derivatives are a bit more convenient to compute:

$$\frac{\mathrm de^{2ix}}{\mathrm dx}=2ie^{2ix},\frac{\mathrm d^2e^{2ix}}{\mathrm dx}=(2i)^2e^{2ix},\frac{\mathrm d^3e^{2ix}}{\mathrm dx}=(2i)^3e^{2ix},\cdots$$

and the rule for the $$n$$th term for the expansion around $$x=c$$ is clearly $$\frac{(2i)^ne^{2ic}}{n!}x^n$$, which in turn means the $$n$$th term in the Taylor series of $$f(x)$$ is $$\operatorname{Im}\left(\frac{(2i)^ne^{2ic}}{n!}\right)$$.

At $$c=0$$, $$e^{2ic}=1$$. For even $$n$$, you have $$i^n\in\{-1,1\}$$; for odd $$n$$, $$i^n\in\{-i,i\}$$. So you only care about odd-indexed terms in the expansion of $$e^{2ix}$$. Let $$n=2k-1$$ for integers $$k\ge1$$:

$$\operatorname{Im}\left(\frac{(2i)^ne^{2ic}}{n!}\right)=\operatorname{Im}\left(\frac{2^{2k-1}i^{2k-1}}{(2k-1)!}\right)=\operatorname{Im}\left(-i\frac{2^{2k-1}i^{2k}}{(2k-1)!}\right)=\boxed{\frac{(-1)^{k+1}2^{2k-1}}{(2k-1)!}}$$

Taking $$k\in\{1,2,3,4\}$$, you get the same first four non-zero terms of the expansion:

\begin{align} f(x) &\approx \frac{(-1)^{1+1} 2^1}{1!}x + \frac{(-1)^{2+1} 2^3}{3!}x^3 + \frac{(-1)^{3+1} 2^5}{5!}x^5 + \frac{(-1)^{4+1} 2^7}{7!}x^7\\[1ex] &=2x-\frac{4x^3}3+\frac{4x^5}{15}-\frac{8x^7}{315} \end{align}