I am having issues with a constrained optimization problem that seems like it should be pretty simple. Here is the problem:
$f(x,y)=x^2-y^2;\hspace{.2 cm} x^2+y^2=25$
When I set up the system of equations, I get
$2x=2\lambda x, \hspace{0.2 cm} -2y=2\lambda y, \hspace{0.2 cm} x^2+y^2=25$
This seems to be a contradiction as equation 1 suggests $\lambda=1$ while the second equation suggests $\lambda=-1$. Am I missing something obvious?
Thanks in advance!
You need to solve the following system $x(\lambda+1)=y(\lambda-1)=0.$
We have no any contradiction here.
I think, it's better to make the following. $$x^2-y^2=x^2+y^2-2y^2=25-2y^2\leq25.$$ The equality occurs for $y=0$ and $x=5$, which says that we got a maximal value.
A minimal value we can get by the similar way: $$x^2-y^2=2x^2-x^2-y^2=2x^2-25\geq-25.$$ Can you end it now?