Local extrema of $f(x,y) = \log(2 + \sin(xy))$

492 Views Asked by At

The problem is asking to find the critical points of this function and determine if they are local extrema or saddle points

I found that $$\frac{df}{dx} = \frac{y\cos(xy)}{2+\sin(xy)}$$ and by symmetry $df/dy$ is the same with an x at the top instead of $y$

This gives me that the critical points occur when $(x,y) = (0,0)$ or when $xy$ is an odd multiple of $\pi/2.$

For the second case, I have no idea how to approach this problem. I started by breaking it up into the cases where $\sin(xy)< 0$ and the cases where $\sin(xy) < 0$ and see how that affects the sign of the determinant, but the problem is there are too many working pieces here for me to tell with certainty what the value of the determinant will be.

Any ideas on how to approach this?

2

There are 2 best solutions below

2
On

Hessian

Taking it from where you stopped i computed the Hessian, and i got \begin{equation} H(x,y) = \begin{bmatrix} \frac{\partial^2}{\partial^2 x} f(x,y) & \frac{\partial^2}{\partial x\partial y } f(x,y) \\ \frac{\partial^2}{\partial y\partial x } f(x,y) & \frac{\partial^2}{\partial^2 y} f(x,y) \end{bmatrix} \end{equation} where after some calculations, i get \begin{align} \frac{\partial^2}{\partial^2 x} f(x,y) &= -\dfrac{y^2\left(1+2\sin\left(yx\right)\right)}{\left(\sin\left(yx\right)+2\right)^2}\\ \frac{\partial^2}{\partial x\partial y }f(x,y) &=-\dfrac{xy\sin\left(xy\right)}{\sin\left(xy\right)+2}+\dfrac{\cos\left(xy\right)}{\sin\left(xy\right)+2}-\dfrac{xy\cos^2\left(xy\right)}{\left(\sin\left(xy\right)+2\right)^2} \\ \frac{\partial^2}{\partial^2 y} f(x,y) &= -\dfrac{x^2\left(1+2\sin\left(yx\right)\right)}{\left(\sin\left(yx\right)+2\right)^2} \end{align}


Hessian at $x=y=0$

The Hessian at $(0,0)$ is \begin{equation} H(0,0) = \begin{bmatrix} 0 & \frac{1}{2} \\ \frac{1}{2} & 0 \end{bmatrix} \end{equation} The determinant is negative, clearly \begin{equation} \det H(0,0) < 0 \end{equation} So, we have a saddle point at $(0,0)$


Hessian at $xy = (2k+1)\frac{\pi}{2}$

Now, on the other points where \begin{equation} xy = (2k+1) \frac{\pi}{2} \end{equation} we get \begin{equation} H(x,y) \Bigg\vert_{ xy = (2k+1) \frac{\pi}{2}}= \begin{bmatrix} - y^2 (\frac{1+2(-1)^k}{((-1)^k + 2)^2}) & - \frac{(2k+1) \frac{\pi}{2} (-1)^k}{(-1)^k + 2} \\ - \frac{(2k+1) \frac{\pi}{2} (-1)^k}{(-1)^k + 2} & - x^2 (\frac{1+2(-1)^k}{((-1)^k + 2)^2}) \end{bmatrix} \end{equation}

The determinant is \begin{equation} \det H(x,y) \Big\vert_{ xy = (2k+1) \frac{\pi}{2}} = x^2y^2 (\frac{1+2(-1)^k}{((-1)^k + 2)^2})^2 - \big( \frac{(2k+1) \frac{\pi}{2} (-1)^k}{(-1)^k + 2} \big)^2 \end{equation} And $$f_{xx}=\frac{\partial^2}{\partial^2 x} f(x,y)\Big\vert_{ xy = (2k+1) \frac{\pi}{2}} = - y^2 \frac{1+2(-1)^k}{((-1)^k + 2)^2}$$ But $xy = (2k+1) \frac{\pi}{2}$ so \begin{equation} \det H(x,y) \Big\vert_{ xy = (2k+1) \frac{\pi}{2}} = \big((2k+1) \frac{\pi}{2} \frac{1+2(-1)^k}{((-1)^k + 2)^2} \big)^2 - \big( \frac{(2k+1) \frac{\pi}{2} (-1)^k}{(-1)^k + 2} \big)^2 \end{equation} When $k$ is odd, the determinant is zero. (Higher order tests may be used).

When $k$ is even, the determinant is positive and $f_{xx} < 0$ (Local Maximum)

0
On

This example is not your typical function of two variables! The given $f$ is a $\circ$-composition of three functions, namely the "true" two-variable function $p(x,y):= xy$, the one-variable function $\sin$ with its own critical points, and the one-variable function $g(u):=\log(2+u)$ $(u>-2)$, in other words $$f=g\circ\sin\circ\, p\ .$$ Since the outermost function $g$ is strictly increasing with nonzero derivative all local extrema or saddle points $f$ might have are already present in the simpler function $$\psi(x,y):=\sin(x\, y)\qquad\bigl((x,y)\in{\mathbb R}^2\bigr).\tag{1}$$ The level lines of $p(x,y):= xy$ are the hyperbolas $xy={\rm const}$, including the two axes. These hyperbolas are then also level lines of $\psi$. It follows that on the hyperbolas $xy=\bigl(2n+{1\over2}\bigl)\pi$ the function $\psi$ assumes its maximum $1$, and on the hyperbolas $xy=\bigl(2n-{1\over2}\bigl)\pi$ the function $\psi$ assumes its minimum $-1$. Since all these local extremal points come in level curves of such points they are degenerate critical points, meaning that $\nabla\psi=(0,0)$ in these points, and at the same time the Hessian has zero determinant there.

Looking at $(1)$ we see that in addition the point $(0,0)$ is special as well since the field of level lines has a singularity there. In order to obtain a qualitative analysis of what's happening at $(0,0)$ I'm writing $\psi$ in the form $$\psi(x,y)={\rm sinc}(xy)\cdot xy\ .$$ The function $t\mapsto{\rm sinc}(t)$ is smooth with value $1$ at the origin. Since $xy$ assumes values of both signs in the neighborhood of the origin, and furthermore $\nabla\psi(0,0)=(0,0)$ (see below) we can say that $\psi$ has a saddle point at $(0,0)$.

Of course we still may do some of this analysis using calculus: One obtains $$\nabla\psi(x,y)=\cos(xy)(y,x)\ ,$$ and this is $=(0,0)$ if either $(x,y)=(0,0)$ or $xy=\bigl(k+{1\over2}\bigr)\pi$. The Hessian computes to $$H_\psi(x,y)=\left[\matrix{-y^2\sin(xy)&-xy\sin(xy)+\cos(xy)\cr -xy\sin(xy)+\cos(xy)&-x^2\sin(xy)\cr}\right]\ .$$ At $(0,0)$ this gives $$H_\psi(0,0)=\left[\matrix{0&1\cr 1&0\cr}\right]$$ with determinant $-1$, signalling a saddle point. In the points $(x,y)$ where $\cos(xy)=0$ we get $$H_\psi(x,y)=-\sin(xy)\left[\matrix{-y^2&-xy\cr -xy&-x^2\cr}\right]$$ with zero determinant, signalling a degenerate critical point. The above analysis has already shown us what is happening there.