30
$\begingroup$

I have read it a thousand times: "you only need local information to compute derivatives." To be more precise: when you take a derivative, in say point $a$, what you are essentially doing is taking a limit, so you only need to look at the open region $ (a-\delta,a+\delta) $.

Taylor's theorem seems to contradict this: from the derivatives in just one point, you can reconstruct the whole function within its radius of convergence (which can be infinity).

For example, consider the function: $f: \mathbb{R} \rightarrow \mathbb{R}:x\mapsto \left\{ \begin{array}{lr} x+3\pi/2:& x \leq-3\pi/2 \\ \cos(x): & -3\pi/2\leq x \leq3\pi/2\\ x+3\pi/2& : x\leq-3\pi/2 \end{array} \right.\\$

function

Wolfram Alpha tells me that $D^{100}f(0)=\cos(0)$... This should give us more than enough information to get a Taylor expansion that converges beyond the point where $f$ is the $\cos$ function ($R=\infty$ for $\cos$ so eventually we have to get there) ...

Let me put it this way: Look at the limiting case. All you need to have for a Taylor expansion that converges over all the reals is all the derivatives in 0. This would give you the exact same Taylor expansion as you'd get for the cosine function, while the function from which we took the derivatives is clearly not the cosine function over all the reals.

So my question is: Is Wolfram Alpha wrong? If it is right, why does this seem to violate Taylors theorem? If it's wrong, is that because the local region of the domain you need to compute the nth derivative grows with n?

Edit 1: en.m.wikipedia.org/wiki/Taylor%27s_theorem. The most basic version of Taylors theorem for one variable does not mention analyticity, and it's easy to prove that the "remainder" goes to zero as you take more and more derivatives, so that f(x) is determined at any x by the derivatives of f in 0.

$\endgroup$
10
  • 1
    $\begingroup$ I don't quite understand what you find is wrong with WA. Since you want $D^{100}f(0)$, you needn't care about the non-cosine parts at all. And I think you perhaps confuse Taylor expansion with power series: they are not the same thing. $\endgroup$
    – Vim
    Apr 3, 2016 at 10:42
  • 5
    $\begingroup$ can you give a precise statement of Taylor's theorem ? I don't think it says what you think it says. $\endgroup$
    – mercio
    Apr 3, 2016 at 10:49
  • 4
    $\begingroup$ In general, the (formal) Taylor expansion needs not converge, and even if the limit exists, it needs not coincide the original function. You need very specific assumptions on your function for this to hold. It is that your function simply fails to satisfy them outside the interval $[-3\pi/2, 3\pi/2]$. For instance, your function fails to be $C^1$ outside this interval. $\endgroup$ Apr 3, 2016 at 10:56
  • 3
    $\begingroup$ the only thing the theorem says about the error is that it is negligible in front of $x^n$ as $x \to 0$, so it is a local statement too. The theorem takes local information of a function as input and spits out a local property of the function at that point. It says absolutely nothing about the behavior of the error away from $0$. Not without some stronger hypothesis on that function. $\endgroup$
    – mercio
    Apr 3, 2016 at 11:04
  • 1
    $\begingroup$ @fawningflagellum: It's easy to prove that the "remainder" goes to zero as you take more and more derivatives. Oh yeah? Then go ahead and prove it. I think you'll find it's not easy at all. (Because it's false.) $\endgroup$ Apr 4, 2016 at 4:34

2 Answers 2

39
$\begingroup$

The subset of (infinitely many times) differentiable functions that actually coincide with their Taylor series is relatively small. Such a function is called "analytic", and we say that analytic functions are completely determined by local data at a point. Most functions that you encounter that have a name will be analytic, such as $\cos(x), e^x, \sqrt x$ and any polynomial, as well as products, sums and compositions of analytic functions.

There are functions that are infinitely many times continuously differentiable everywhere, and thus have a Taylor series at each point, but the Taylor series at a point $p$ might fail to approximate the function even relatively close to $p$. They are called $C^\infty$. The analytic functions are therefore a particularily nice subset of the $C^\infty$ functions.

$\endgroup$
4
  • 12
    $\begingroup$ Here is a famous example: $$f(x)=\begin{cases} e^{-1/|x|^2},\, x\ne 0 \\ 0,\, x=0\end{cases}$$ in which $f$ is $C^\infty$ at $0$ but fails to be analytic. $\endgroup$
    – Vim
    Apr 3, 2016 at 10:50
  • 3
    $\begingroup$ IIRC, $C^\infty$ is no different from the analytic functions once you include the whole complex plane. $\endgroup$
    – Kevin
    Apr 3, 2016 at 20:57
  • 4
    $\begingroup$ @Kevin, every holomorphic $C^\infty$ function on the complex plane is analytic, but most $C^\infty$ functions on the complex plane are not analytic. The function Vim gave, for example, extends easily to the whole complex plane by taking $x$ to be complex, and it's still not analytic at zero. $\endgroup$
    – Vectornaut
    Apr 4, 2016 at 2:40
  • 2
    $\begingroup$ @Kevin That being said, "complex differentiable" is often used in the meaning "analytic". $\endgroup$
    – Arthur
    Apr 4, 2016 at 4:27
1
$\begingroup$

Taylor's theorem requires a function, $f:\mathbb R \to \mathbb R$ that is "k-times differentiable" To capture a sine wave completely, your function would have to be infinitely differentiable on all of $\mathbb R$. It is not.

$\endgroup$
2
  • $\begingroup$ You are right, there is a problem at $\pm \pi/2$, but the function can easily be adapted to rule out your argument! Just change the slope of the two linear functions to $\pm \sin(\pi/2)$, and then $f \in C^\infty (\mathbb{R})$. $\endgroup$ Apr 6, 2016 at 9:16
  • $\begingroup$ @fawningflagellum No, it wouldn't, because the third derivative would have a discontinuity. You would need more "smoothing out" than that. It is, however, entirely possible to do. if you utilize a small $\delta$-interval around each of $\pm \pi/2$. $\endgroup$
    – Arthur
    Apr 6, 2016 at 21:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .