How do I sketch the level curves of $f(x,y) = x^2 - y^2$.

110 Views Asked by At

I get that the critical point of the function $f(x,y)$ is $(0,0)$ which is a saddle point. I know how the level curves are supposed to look in general for saddle points, but I wanted to know if it's possible to determine which areas surrounding the saddle point would be highest or lowest without resorting to computational methods?

1

There are 1 best solutions below

4
On

If you specifically want to know what the level curves look like in general, you can do no better than solving for $f(x,y)=f(x_*,y_*)+C$ for different constants $C$.

If you just want particular directions which are maximally upwards or downwards, something similar to the second derivative test works.

Consider the matrix of second partial derivatives such that the $i$th row $j$th column entry is the derivative wrt $j$th dimension then the $i$th dimension $$\mathbf{H}f=\begin{bmatrix} \frac{\partial^2 f}{\partial x^2} & \frac{\partial^2 f}{\partial x\partial y}\\ \frac{\partial^2 f}{\partial y\partial x} & \frac{\partial^2 f}{\partial y^2} \end{bmatrix}$$ known as the Hessian.

The same way we can write a second order Taylor approximation as $$f(x)\approx f(x_0)+f'(x_0)(x-x_0)+\frac{1}{2}f''(x_0)(x-x_0)^2$$ we can write one for a multidimensional function as $$f(\vec{x})\approx f(\vec{x_0})+\nabla f(\vec{x_0})\cdot(\vec{x}-\vec{x_0})+\frac{1}{2}(\vec{x}-\vec{x_0})^T\left(\mathbf{H}f(\vec{x_0})\right)(\vec{x}-\vec{x_0})$$ where $\nabla f$ is the gradient, the vector of first partial derivatives.

When $\vec{x_0}$ is a critical point, the gradient vanishes, so locally this looks like a multidimensional quadratic form. To figure out which directions are maximal or minimal, find the eigenvalues and eigenvectors of the Hessian.

Along the direction of an unit eigenvector $\vec{v}$ of eigenvalue $\lambda$, the function looks like $$f(x_0+r\vec{v})\approx f(x_0)+\frac{1}{2}r\vec{v}^T\left(\mathbf{H}f(\vec{x_0})\right)r\vec{v}=f(x_0)+\frac{\lambda}{2}r^2$$ which is a parabola, upwards if $\lambda>0$.

For your case, since $$\mathbf{H}f(0,0)=\begin{bmatrix}2&0\\0&-2\end{bmatrix}$$ this immediately says that $f(x,y)$ locally curves maximally upwards in the $x$ direction, and maximally downwards in the $y$ direction.