$$f(x,y) = 2x + y$$ $$g(x,y) = x * y$$ Prove that for all/any $f(x,y)$ (constraints: $x > 0$ and $y > 0$), $g(x,y)$ is maximized (optimized?) when $y = 2x$.
The highest level mathematics course I have taken is Calculus 3 in university, but I forgot a good amount. The explanation doesn't have to be super formal/in-depth. Thanks! This just piqued my interest because the functions come from a video game.
As Andrei pointed out, it's not very clear what you are trying to prove here. If the restriction is only $x,y>0$, then $g$ doesn't have any maximum, since the bigger $x,y$, the bigger $x\cdot{y}$ gets. If you add the restriction that $2x+y=c$ for some constant $c$, then $g(x,y)=g(x,c-2x)=cx-2x^2$ which is a parabola with the maximum at $x=\frac{c}{4}$. So, $y=c-\frac{2c}{4}=\frac{c}{2}$. That is, $(\frac{c}{4},\frac{c}{2})$ maximizes $g$ on the set $\{(x,y):2x+y=c\}$.