Can two functions have identical first and second derivatives, but different higher order derivatives? Consider two functions $f(x)$ and $g(x)$ defined for all $x\in\mathbb{R}$. Assume that $\forall x\in\mathbb{R}$, $f(x)=g(x)$, $f'(x)=g'(x)$, and $f''(x)=g''(x)$. Is it possible that higher order derivatives of $f(x)$ and $g(x)$ are not equal?
 A: Since the higher order derivatives are given simply by iteration of the "simple" derivative the answer is no. That is to say, if $f^{(n)}(x) = g^{(n)}(x)$ then $f^{(n+1)}(x) = \left( \, f^{(n)}(x)\right)' = \left(g^{(n)}(x)\right)' = g^{(n+1)}(x)$. Excuse the abuse of notation.
Unless I'm stupid, which I sometimes am :).
A: This is a little trickier than it seems, and while Tilo Wiklund's answer is actually correct, the reasoning is not quite correct.  Here's why:
If we are on a finite interval, the higher order derivatives need not match between the two functions. Example: let f(x) ≡ 0 and let g(x) ≡ 0 for x ≤ 0 and g(x) =  x2 for x >0.  At x = 0 we have: f(0) = g(0) = 0; f'(0) = g'(0) = 0; and f''(0) = g''(0) = 0.  However, things fall apart at f'''.  We have f'''(0) = 0 and g'''(0) = 6. 
So how does this fit with Wiklund's answer that that the higher order derivatives are computed from the lower order ones?  Well, two functions can match on a finite interval, but not be the same for the entire real line.
Looking at the whole x-axis, if f'(x) ≡ g('x) everywhere, those two derivatives are identical and must have the same higher derivatives (if any).  But note that the whole thing depends on equivalence on the entire x-axis. On a finite interval such as in the example above it wouldn't have worked.  I think Wiklund's answer can be improved by noting specifically that it works only on the entire x-axis.
