Nice Proof of Taylor Expansion

2 minute read

Published:

Consider writing a sufficiently smooth function $f(x)$ ($k$-times differentiable) as a polynomial.

By fundamental theorem of calculus:

\[f(x) = f(a) + \int_a^x f'(x_1) \, dx_1.\]

Apply again:

\[f'(x_1) = f'(a) + \int_a^{x_1} f''(x_2) \, dx_2.\] \[f''(x_2) = f''(a) + \int_a^{x_2} f'''(x_3) \, dx_3.\]

So

\[f(x) = f(a) + \int_a^x \left(f'(a) + \int_a^{x_1} \left(f''(a) + \int_a^{x_2} f'''(x_3) \, dx_3 \right) \, dx_2\right)\,dx_1.\]

Expanding the terms we get \(f(x) = f(a) + \int_{x_1\in (a,x)} f'(a) \, d x_1 + \int_{x_1\in (a,x), x_2 \in (a,x_1)} f''(a) \, d x_2 d x_1 + \int_{x_1\in (a,x), x_2 \in (a,x_1), x_3 \in (a,x_2)} f'''(x_3) \, dx_3 dx_2 dx_1.\)

Notice two things:

  1. The limit of integral covers coordinates in a cube with length $(x-a)$. For example, in the first term $\int_{x_1\in (a,x)} f’(a)$, we are integrating over any $x_1$ that are in a 1D cube (or as normal people call them, a line or open interval $(a,x)$ ). In the second term $\int_{x_1\in (a,x), x_2 \in (a,x_1)} f’‘(a) \, d x_2 d x_1$, we are integrating over any point $x_1,x_2$ that are in a 2D cube (or colloquially, a square). This is because any $x_1,x_2$ that satisfies $a < x_2 < x_1 < x$ are taken into account.
  2. We can calculate concrete values for every integral except the last term. This is because the integrand are derivative of different orders evaluated at $a$, except the last term (which still contains variable $x$). Specifically the concrete value would be related to the cube’s volumn and the number of combinations of $a < x_1 < … < x_k < x$ (which would give us the power term and the factorial term in taylor series).

So let’s write a general form of the additive terms and calculate their concrete values.

We define the $k$-th term as \(T_k = \int_{a < x_1 < ... < x_k < x}f^k(a) \,dx_1,...,dx_k,\)

then we can extract the constant term and get \(T_k = f^k(a) \int_{a < x_1 < ... < x_k < x} 1 \,dx_1,...,dx_k.\)

Note that the volume of a $k$-dimensional cube of length $(x-a)$ is $(x-a)^k$. However, that is an overestimation of our integral because every ordered set $x_1 < … < x_k$ contributes $k!$ times. Therefore, we can divide by the “overcounting factor” (you can also say symmetry) and get

\[T_k(a) = f^k(a) \frac{(x-a)^k}{k!}.\]

Hence \(f(x) = f(a) + \sum^n_{k=1} T_k(a) + \text{remainder} \approx \sum_{k=0}^n f^k(a) \frac{(x-a)^k}{k!}.\)

(reference from Chris Thron)