Questions about determining local extremum by derivative 
*

*Second derivative test in
Wikipedia says that:
For a real function of one variable:

If the function f is twice
differentiable at a stationary point
x, meaning that $\ f^{\prime}(x) = 0$
, then:
If $ f^{\prime\prime}(x) < 0$ then $f$
has a local maximum at $x$. If $f^{\prime\prime}(x) > 0$ then $f$
has
a local minimum at $x$. If $f^{\prime\prime}(x) = 0$, the
second
derivative test says nothing about the
point $x$, a possible inflection
point.

For a function of more than one
variable:

Assuming that all second order partial
derivatives of $f$ are continuous on a
neighbourhood of a stationary point $x$,
then:
if the eigenvalues of the Hessian at $x$
are all positive, then $x$ is a local
minimum. If the eigenvalues are all
negative, then $x$ is a local maximum,
and if some are positive and some
negative, then the point is a saddle
point. If the Hessian matrix is
singular, then the second derivative
test is inconclusive.

My question is why in the
multivariate case, the test requires
the second order partial derivatives
of $f$ to be continuous on a
neighbourhood of $x$, while in the
single variable case, it does not
need the second derivative to be
continuous around $x$? Do both also
require that the first derivative
and the function itself to be
continuous around $x$?


*Similarly, does first derivative
test for $f$ at $x$ need $f$ to
be continuous and differentiable in
a neighbourhood of $x$?


*For higher order derivative
test, it doesn't mention if $f$
is required to be continuous and
differentiable in a neighbourhood of
some point $c$ up to some order. So
does it only need that $f$ is
differentiable at $c$ up to order $n$?
Thanks for clarification!
 A: For your second question: Yes: you need the derivative of $f$ to be defined in a puncture neighborhood of $x$ for the first derivative test to even make sense: you need to know the sign of $f'$ on $(x-\delta,x)$ and on $(x,x+\delta)$ for some $\delta\gt 0$ to be able to apply the test; this automatically requires continuity as well on those intervals. And of course, if $f$ is not continuous at $x$, then you cannot derive a conclusion about the value of $f$ at $x$. Take
$$f(x) =\left\{\begin{array}{ll}
-x & \mbox{if $x\lt 0$,}\\
\frac{1}{2} & \mbox{if $x=0$,}\\
x+\frac{3}{4} & \mbox{if $x\gt 0$.}
\end{array}\right.$$
Then the derivative is negative on $(-\infty,0)$, and positive on $(0,\infty)$; it is undefined on $x=0$. But $f$ has neither a local maximum nor a local minimum at $0$.
In fact, the First Derivative Test is usually stated for functions that are continuous.
A: Actually, the continuity of the partials is not needed, twice total differentiability at the point is sufficient, so the one and the higher dimensional cases are totally analogous. But the existence of the second order partials is insufficient for twice total differentiability, so the Hessian is not necessarily the second total derivative just because the second partials exist, and you can compute the Hessian. But their continuity is a simple, sufficient condition for twice differentiability.
A: For question (3), the idea is to take the Taylor expansion in order to see which type the critical point is. If the Taylor approximation is
$$ f(x + \epsilon) \approx f(x) + C \epsilon^n, \quad 0 \neq C = \frac{f^{(n)}}{n!} $$ then if $n$ is odd, it's not an optimum at all, whereas if it is even, it's a minimum if $C > 0$ and a maximum if $C < 0$ (it's enough to notice that $x^2$ has a minimum at $0$). In order for the Taylor approximation to work, you need the $n+1$ derivative of $f$ to be continuous, to ensure that the remainder term is continuous in some neighborhood of $x$.
In practice, functions are usually infinitely differentiable, so you shouldn't worry so much about the existence of derivatives.
For question (1), we do the same Taylor business and get an expansion
$$f(\vec{x} + \vec{\epsilon}) \approx f(\vec{x}) + \vec{\epsilon}' \nabla f(\vec{x}) + \frac{1}{2} \vec{\epsilon}' Hf(\vec{x}) \vec{\epsilon}, $$
where $\nabla f$ is the gradient and $Hf$ is the Hessian, the matrix of second derivatives. If $Hf(\vec{x})$ is positive definite with smallest eigenvalue $\lambda > 0$, then $$\vec{\epsilon}' Hf(\vec{x}) \vec{\epsilon} \geq \lambda \|\vec{\epsilon}\|^2, $$ and we get a minimum (since the error is $O(\|\vec{\epsilon}\|^3)$).
Some funky math allows you somehow to deduce all of this even without having the extra derivative required for having a bounded Taylor's remainder term, but I wouldn't worry too much about it.
A: Here's a somewhat handwaving answer to question (1):
To check whether $f(a,b)$ is a local minimum, you want to compare the value $f(a+h,b+k)$ to the value $f(a,b)$.
The $x$-derivatives at $(a,b)$ tell you something about how $f(a+h,b)$ compares to $f(a,b)$,
but, unless you assume continuity, the $y$-derivatives at $(a,b)$ don't tell you anything about how $f(a+h,b+k)$ compares to $f(a+h,b)$ (since that comparison involves the $y$-derivatives at the point $(a+h,b)$ rather than at $(a,b)$).
