There are two different ways to write a Taylor series function according to Wikipedia and other websites (https://www.uni-muenster.de/Physik.TP/archive/fileadmin/lehre/part2_hypebolic/node6.html):
(1):$$ f(x + \Delta x) = f(x) + \Delta x \frac{\partial f}{\partial x} + \frac{\Delta x^2}{2} \frac{\partial ^2f}{\partial x^2} \;\;...$$
(2):$$ f(x) = f(a) + (x-a)f'(a) + \frac{(x-a)^2}{2}f''(a) \;\;...$$
I am confused on how these two are the same. If you let $\Delta x = x-a$ shouldn't the formula for (1) be the following:
(1):$$ f(x) = f(\Delta x + a) + \Delta x \frac{\partial f}{\partial x} + \frac{\Delta x^2}{2} \frac{\partial ^2f}{\partial x^2} \;\;...$$
A descriptive answer would be extremely helpful.
Thanks!
The two equations are describing the same thing, but are using the variable $x$ differently. In the first form, the "centre" of the Taylor expansion is at $x$, and the expansion is in terms of the distance $\Delta x$ away from it. In the second form, the centre is at $a$, and the expansion is in terms of the distance $x - a$ away from it. So in other words we can translate between the two with the mapping:
$$\begin{pmatrix} x \\ \Delta x \end{pmatrix} \longleftrightarrow \begin{pmatrix} a \\ x - a \end{pmatrix} $$
It might be a bit easier to see if we rename the first $x$ to $x_0$, so we can just explicitly state that $x_0 = a$ and $x - x_0 = \Delta x$, so we have:
$$\begin{eqnarray} f(x_0 + \Delta x) & = & f(x_0) + \Delta x f'(x_0) + \frac{\Delta x^2}{2} f''(x_0) + \ldots \\ & = & f(x_0) + (x - x_0) f'(x_0) + \frac{(x - x_0)^2}{2} f''(x_0) + \ldots \\ & = & f(a) + (x - a) f'(x_0) + \frac{(x - a)^2}{2} f''(x_0) + \ldots \\ & = & f(x) \end{eqnarray}$$
Your first example is maybe being a little obtuse in its notation because (a) it's using partial derivatives $\frac{\partial}{\partial x}$ even though the function in question is univariate, and (b) it's not making it very clear that $\frac{df}{dx}$ is the derivative of $f$, with respect to the variable $x$, evaluated at the value $x$.