Pessimist Singularitarian

#11
January 15th, 2017,
10:59
We could use Lagrange Multipliers...consider the objective function:

$ \displaystyle f(x,y)=\sin(x)-\sin(y)$

Subject to the constraint:

$ \displaystyle g(x,y)=x+y-\frac{\pi}{2}=0$

This leads to:

$ \displaystyle \cos(x)=\lambda=-\cos(y)$

$ \displaystyle \cos(x)+\cos(y)=0$

Using a sum to product identity, and dividing through by $2$, we obtain:

$ \displaystyle \cos\left(\frac{x+y}{2}\right)\cos\left(\frac{x-y}{2}\right)=0$

On the given domain, this gives us:

$ \displaystyle x\pm y=\pi\implies x=\pi\pm y$

Putting this into the constraint, we find:

$ \displaystyle \pi\pm y+y=\frac{\pi}{2}\implies y=-\frac{\pi}{4}\implies x=\frac{3\pi}{4}$

Thus, the objective function at this critical point is:

$ \displaystyle f\left(\frac{3\pi}{4},-\frac{\pi}{4}\right)=\sqrt{2}$

At the end-points of the given domain, we find:

$ \displaystyle f\left(\frac{\pi}{2},0\right)=1$

$ \displaystyle f\left(\pi,-\frac{\pi}{2}\right)=1$

And so we conclude that on the given domain, we have:

$ \displaystyle f_{\min}=1$

$ \displaystyle f_{\max}=\sqrt{2}$