Joseph F. answered 03/27/20
Joe's Math, Science and Chess
Hi Devin!
If I was the head of this juice company, I'd figure on making R gallons of regular mix, and T gallons of tropical mix. I'd draw out R and T on a two-dimensional grid, because the constraints will make a space upon that grid.
The constraints you have are as follows:
1) You cannot make a negative amount of regular mix, so R >= 0.
2) You cannot make a negative amount of tropical mix, so T >= 0.
3) You cannot use more orange juice than you have. If you make R gallons of regular mix, and T gallons of tropical mix, this will require a*R + b*T gallons of orange juice, where a and b are both constants that come from the problem. This cannot be more than OJ, the total amount of orange juice you have, so this gives a linear inequality:
aR + bT <= OJ
4) You cannot use more pineapple juice than you have. If we make an argument that is similar to our argument for Constraint #3, with c and d being coefficients and PJ being the total gallons of pineapple juice, both from the problem, this is also a linear inequality:
cR + dT <= PJ
Now, graph all four constraints on the two dimensional (R,T) grid. The last two will make a great "X" across the first quadrant of this grid, where R and T are both nonnegative. Find the point of intersection of these constraints, somewhere with R and T that are both nonzero. Follow the constraints back to the respective axes, and select the axes intercepts that make physical sense: both constraints hit either axis, but only one of the two intercepts on either axis asks for only as much pineapple or orange juice as you have; the other asks for too much and so cannot be reached. On the R axis, T is zero, so all of one or the other type of juice must go into making R. Select the amount of juice of which you have the least, and use that amount to figure out how much R you can make. Use a similar approach for T on the T axis.
You now have a quadrilateral with four points. Your objective function P will be maximized at one of these points. Evaluate it at each point, and pick your highest value.
Cheers,
Joe