How do Taylor polynomials work to approximate functions?

I (sort of) understand what Taylor series do, they approximate a function that is infinitely differentiable. Well, first of all, what does infinitely differentiable mean? Does it mean that the function has no point where the derivative is constant? Can someone intuitively explain that to me?

Anyway, so the function is infinitely differentiable, and the Taylor polynomial keeps adding terms which make the polynomial = to the function at some point, and then the derivative of the polynomial = to the derivative of the function at some point, and the second derivative, and so on.

Why does making the derivative, second derivative ... infinite derivative, of a polynomial and a function equal at some point ensure that the polynomial will match the function exactly?


Solution 1:

Say I want to approximate the function $f(x)$ at a point. Let's make it $0$ for simplicity. Since the function is continuous, I can just take the constant function $y=f(0)$ as a start. But of course, this is an awful example. A better one would not only take the same value, but have the same rate of change as well! So we do that:

$$y'=f'(0)$$ $$y=f'(0)x+C$$

Since $x=0$, $C=f(0)$ and our new approximation is

$$y=f'(0)x+f(0)$$

But wait! An even better one would have the same second derivative as well! That way it can even start to curve like the function!

$$y''=f''(0)$$ $$y'=f''(0)x+f'(0)$$ $$y=\frac{f''(0)x^2} 2+f'(0)x+f(0)$$

An even better one would be starting from the third derivative, so it can wiggle around zero if need be, and we get:

$$y=\frac{f'''(0)x^3} 6 + \frac{f''(0)x^2} 2+f'(0)x+f(0)$$

The general pattern is easy to see: our better and better approximations are adding the term: $$\frac{f^{(n)}(0)x^n}{n!}$$

onto our previous guess. So we then say that the best infinite polynomial approximation is just taking all of these together, which is going to be:

$$\sum_{n=0}^{\infty} \frac{f^{(n)}(0)x^n}{n!}$$

Which is the Taylor series at $x=0$. As others have pointed out it doesn't always work, but if you're going to start your approximation by requiring all derivatives to be equal, this is what you come up with.

Solution 2:

As the other answerers have said, you do need to strengthen the condition on your function from smooth to analytic. Once you've done that, here's a stab at the intuition behind Taylor polynomials as successive approximations.

The zeroth Taylor polynomial for $f$ at $x_0$ is simply the constant function $f(x_0)$. Of course it's a very bad approximation for interesting functions, but it does happen to approximate a one-parameter class of functions perfectly-the constant functions $y=a_0$. The next best thing is to take a derivative, which we know gives the best linear approximation to $f$ near $x_0$. Notice we don't lose anything, since if $f$ was originally constant, then our linear approximation is $y=a_1x+a_0$ with $a_1=0$ and the "approximation" is still perfect, while for everything else, with a nonzero derivative, we've gotten closer to the actual function near $x_0$. Taking higher polynomials is a direct generalization of this process. With the second derivative I can find the very closest quadratic to $f$ near $x_0,$ and since everything linear is a special case of a quadratic, I can certainly only get to a better approximation.

By taking this process to the limit of "infinite-degree polynomials," i.e. power series, we might expect that some nice functions actually equal the limit of their expansion in this way. Proving this direction requires some fiddling with difference quotients, but in fact for the most important analytic function there's nothing to prove: $e^t$ is defined, at least in one version, as its power series expansion. We can even get $\sin$ and $\cos$ and thus all trig functions in this way if we start out over $\mathbb{C}$, though this would be pretty perverse.