TITLE: Stuck with Taylor expansion of $f(x+x')$
QUESTION [2 upvotes]: I know that the Taylor series of $f(x)$ around $a$ is given by:
$$f(x)=f(a)+f'(a)(x-a)+f''(a)\frac{(x-a)^2}{2}+\dots=\sum_{n=0}^\infty \frac{f^{(n)}(a) }{n!} (x-a)^n$$
In my textbook I see the following formula for 
$f(x+x')$ which I however don't understand:
$$f(x+x')=f(x)+f'(x)x' +\frac{f''(x)}{2}(x')^2+\dots=\sum_{n=0}^\infty \frac{f^{(n)}(x)}{n!} (x')^n $$
I don't understand how they obtained this formula. Can someone explain me that?

REPLY [4 votes]: Rewrite your original formula, using $t$ instead of $x$:
$$
f(t)=f(a)+f'(a)(t-a)+f''(a)\frac{(t-a)^2}{2}+\ldots=\sum_{n=0}^{\infty} \frac{f^{(n)}(a) }{n!} (t-a)^n.
$$
Now, let $t = x + x'$:
$$
f(x + x')=f(a)+f'(a)(x + x'-a)+f''(a)\frac{(x + x'-a)^2}{2}+\ldots=\sum_{n=0}^{\infty} \frac{f^{(n)}(a) }{n!} (x + x'-a)^n
$$
Last, take $a = x$:
\begin{align*}
f(x + x')&=f(x)+f'(x)(x + x'-x)+f''(x)\frac{(x + x'-x)^2}{2}+\ldots\\
&= f(x)+f'(x)x'+f''(x)\frac{x'^2}{2}+\ldots\\
&= \sum_{n=0}^{\infty} \frac{f^{(n)}(x)}{n!} (x')^n.
\end{align*}
{"set_name": "stack_exchange", "score": 2, "question_id": 548078}