Solution to Save the Pups

(a) The cost of M gallons of medicine and N gallons of nutrients is 25M+5N. Note that, to save the greatest number of mammals, your team should spend the entire $1,000 on nutrients and medicine since the habitat is too large to overdose, and since your model for how many lives are saved, s = M2+NM+12N is a function which gets bigger if either M or N are increased. Hence, if you spent less than $1,000, this couldn't cause the greatest number of mammals to be saved, since then spending the extra funds you have on either medicine or nutrients would make this function (number of lives saved) bigger. Hence, whatever M and N need to be to save the greatest number of lives, you will have 25M+5N = 1000

(b) To maximize the number of mammals saved, we first use the last equation to eliminate one of the two variables from the formula for s, so that s becomes a function of one variable, which your team knowns how to maximize from the single-variable calculus course you all took. To avoid fractions, you might as well solve for N (rather than M), getting 5N = 1000-25M, or N = 200-5M.

Substituting this into N in your formula for s gives M2 + (200-5M)M + 12(200-5M), an expression s(M) only in M for the total number of lives saved by next year. Expanding, this becomes M2 + 200M - 5M2 + 2400 - 60M, which simplifies to -4M2 + 140M + 2400.

Using calculus, you seek the absolute maximum of this function. Checking first for critical points, you note that the derivative is -8M+140, which is always defined, and which is zero when M = 140/8 = 17.5. Since the second derivative is always negative, this quadratic function is always concave down so 17.5 is either a local or absolute maximum for s(M).

You next need to check the endpoints. From N=200-5M it is clear that M must lie between 0 and 40 gallons. Hence the absolute maximum of s(M) must be either at one of the endpoints, M=0 or M=40, or at the single critical point M=17.5. The correct number of gallons of M to add to the habitat is then whichever of these three makes s(M) greatest, which you calculate next.

(c) When M=0, s(M)=2400, while when M=40, s(M)=1600, and when M=17.5, s(M)=3625. Hence the greatest number of adorable marine mammals will be saved if you add 17.5 gallons of medicine to their habitats, and N=200-5(17.5)=112.5 gallons of nutrients.