Euhan K. answered 03/23/25
Quant + Software Interview Prep | College Math + CS Tutor
Here, our constraint is that x and y are non-negative and that 5x + 9y <= 9. Thus, our absolute maximum will be achieved when 5x + 9y = 9.
From here, we can plug into f(x, y) and take derivative to find the maximum like such:
5x + 9y = 9
9y = 9 - 5x
y = 1 - 5x/9
f(x, y) = x^2 + y^2
= x^2 + (1 - 5x/9)^2
= x^2 + 25x^2/81 - 10x/9 + 1
=106x^2/81 - 10x/9 + 1
We see that this is a parabola with positive x^2 coefficient so the maximum value must be at the borders, which are 0 and 9/5 (due to both of the constraints). So trying both of these with the equation 5x+9y=9 we get
x= 0, y=1 so f(x, y) = 1
x=9/5, y=0 so f(x, y) = 81/25
Niko Z.
thank you :) i was feeling very confused this makes sense now03/23/25