# The maximum of a function of a single variable where all derivatives $f^{(n)}=0$ for $n\le 2$?

I was recently reading about classifying the extrema of a continuous function of a single variable. I came across the information that if the second derivative is zero then we can examine the higher derivatives such as $f^{\prime\prime\prime}$,$f^{(4)}$ and so on. Suppose $f^{(n)}$ is the first non-zero derivative. If n is odd, then the point is an inflection point and if n is even then a positive nth derivative means a minimum and a negative nth derivative means a maximum.

Now, my question is, can anyone come up with an example of a function $f(x)$ where this information about the nth derivative can be applied? I wanted to add one to my notes. Further, can anyone come up with an example of both a inflection point and a maximum or minimum?

-
Take $f(x) = x^n$ for $n$ a positive integer. Then the origin is a critical point for every $n$. Further, $f^{(n)}(x) = n!$ is the first non-zero derivative. If $n$ is even, then it is a minimum, and if $n$ is odd then it is an inflection point. For minimums take $f(x) = -x^n$. –  Glen Wheeler Mar 2 '11 at 20:34
Sigh, of course I mean $n\ge 2$. –  Glen Wheeler Mar 2 '11 at 23:33

Do the mononomials $x^n$ and $-x^n$ work? Any power series expansion which starts at the $n$-th term generalizes this idea. Another interesting function to study in this context is $x^k \sin(1/x)$, though it is a bit more subtle