Lagrange Question Alice has only $24$ hours to study for an exam, and without preparation she will get $200$ points out of $1000$ points on the exam. It is estimated that her exam score will improve by $x(50−x)$ points if she reads her lecture notes for $x$ hours and $y(48−y)$ points if she solves review problems for y hours, but due to fatigue she will lose $(x+y)^2$ points. What is the maximum exam score she can obtain? Round your answer to the nearest integer.
I got $y=23/2$ and $x=25/2$.
When I plugged those back in I got $468.75$, and then I need to add the $200$ points. So my answer would be $668.75$ which would round to $669$. But this is not correct. What am I doing wrong?
 A: the function you are inserted in is $f(x,y) = 200 +x(50-x) +y(48-y) - (x+y)^2$take the derivative for $x$ and $y$ and set is zero. This will give you the condition for a local extremum. The answer should be $x = 26/3,\ y = 23/3$. Then you still have to explain why that this is a local maximum and not a minimum. And at last you should check the global points.
The maximum test score is: $1802/3 \approx 600$
A: A few things:
First of all (and most importantly), you call this a Lagrange problem (and your solution does satisfy x + y = 24), but is it really?  Seems improbable that the optimal strategy would involve no sleep.  I'd look in the interior, $x + y < 24$.
Second, I don't get the same numbers you get.  I get the same x and y values (using Lagrange, though these are not optimal), but not the same test score.  Are we using the same score function?  Mine is:
$$ 200+ x(50-x)+y(48-y)-(x+y)^2$$ Using the values you get from Lagrange, I see that as 512.5 .  Am I missing something?
A: fx = 50-4x-2y and fy = 48-4y-2x
50-4x-2y=48-4y-2x
y=x-1
x+y=24 hours,
x+(x-1)=24
SO, x= 25/2
y= 24-25/2 = 23/2
...
f(25/2,23/2)= 200+(25/2)*(50−(25/2))+(23/2)(48−(23/2))−((25/2)+(23/2))^2
=512.5
IS IT CORRECT?
