Taylor Series with (x-a) and delta x

125 Views Asked by At

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!

2

There are 2 best solutions below

3
On

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$.

0
On

Comparing (1) and (2) in \begin{align*} f(x + \Delta x) &= \color{blue}{f(x)} + \color{blue}{\Delta x} f^{\prime}(x) + \frac{\left(\Delta x\right)^2}{2} f^{\prime\prime}(x)+\cdots\tag{1}\\ f(x) &= \color{blue}{f(a)} + \color{blue}{(x-a)} f^{\prime}(a) + \frac{(x-a)^2}{2} f^{\prime\prime}(a)+\cdots\tag{2}\\ \end{align*} we have

  • in (1) a Taylor series in $x+\Delta x$ evaluated at $x$,
  • in (2) a Taylor series in $x$ evaluated at $a$.

Your substitution $\Delta x\to x-a$ is fine. But we also have to respect that the center of the Taylor series has been changed from $x$ to $a$. We therefore consider the substitutions \begin{align*} \Delta x&\to x-a\\ x&\to a \end{align*} Putting them into (1) we obtain (2), since \begin{align*} f(x+\Delta x)&\to \color{blue}{f(a+(x-a))}\\ &\qquad\color{blue}{=f(x)} \color{blue}{=f(a)+(x-a)f^{\prime}(a) + \frac{(x-a)^2}{2} f^{\prime\prime}(a)+\cdots} \end{align*}