# How do you find the taylor series series at a=-3 of f(x) = x - x^3?

May 21, 2015

There's three ways it can be done:

1) Use the definition of the Taylor series at $x = a$:
f(a)+f'(a)(x-a)+\frac{f''(a)}{2!}(x-a)^2+\frac{f'''(a)}{3!}(x-a)^3+\cdots.

In the present example, $f ' \left(x\right) = 1 - 3 {x}^{2}$, $f ' ' \left(x\right) = - 6 x$, $f ' ' ' \left(x\right) = - 6$, and all higher-order derivatives are zero. Since $f \left(- 3\right) = 24$, $f ' \left(- 3\right) = - 26$, $f ' ' \left(- 3\right) = 18$, $f ' ' ' \left(- 3\right) = - 6$, and all higher derivatives are zero, the answer is:

$24 - 26 \left(x + 3\right) + 9 {\left(x + 3\right)}^{2} - {\left(x + 3\right)}^{3}$, and this does indeed equal $f \left(x\right) = x - {x}^{3}$ for all $x$.

2) You could do a change-of-variables that has the effect of translating the origin to the left by 3 units: $u = x + 3$ so that $x = u - 3$. The coefficients of $f \left(u - 3\right)$ as a Taylor series centered at $u = 0$ would be the same coefficients of $f \left(x\right)$ as a Taylor series centered at $x = - 3$. Here's the expansion calculation:

$f \left(u - 3\right) = \left(u - 3\right) - {\left(u - 3\right)}^{3} = u - 3 - \left({u}^{3} - 9 {u}^{2} + 27 u - 27\right) = 24 - 26 u + 9 {u}^{2} - {u}^{3}$

Hence, $f \left(x\right) = 24 - 26 \left(x + 3\right) + 9 {\left(x + 3\right)}^{2} - {\left(x + 3\right)}^{3}$.

3) You could realize that since $f \left(x\right) = x - {x}^{3}$ is cubic, its Taylor series about any point will be cubic as well. In particular, about $x = - 3$ it will be of the form $a + b \left(x + 3\right) + c {\left(x + 3\right)}^{2} + d {\left(x + 3\right)}^{3}$. You can then expand this out:

a+bx+3b+cx^2+6cx+9c+dx^3+9dx^2+27dx+27d= (a+3b+9c+27d)+(b+6c+27d)x+(c+9d)x^2+dx^3

Set these coefficients equal to the corresponding coefficients of $x - {x}^{3}$ to get a system of 4 equations and 4 unknowns: $d = - 1$, $c + 9 d = 0$, $b + 6 c + 27 d = 1$, and $a + 3 b + 9 c + 27 d = 0$. This system is already in "triangular form" (if your form the corresponding matrix ) and is easily solved by "back substitution": $d = - 1$, $c = - 9 d = 9$, $b = 1 - 6 c - 27 d = 1 - 54 + 27 = - 26$, and $a = - 3 b - 9 c - 27 d = 78 - 81 + 27 = 24$ to get the same answer: $24 - 26 \left(x + 3\right) + 9 {\left(x + 3\right)}^{2} - {\left(x + 3\right)}^{3}$.