To solve, first we must find the marginal utility of coffee and of a bag of snacks. Taking the first derivative of U(X) with respect to x1 yields (½)x1(-1/2) * x21/2. Doing the same for x2 yields (½)x2(-1/2) * x11/2.
Then, the ratio of marginal utilities becomes [(½)x1(-1/2) * x21/2] / [(½)x2(-1/2) * x11/2]. The ½ in the numerator and denominator cancel, and the resulting expression can be simplified to yield: x2 / x1.
Next, we must set the price ratio equal to the ratio of marginal utilities, which gives us:
2 / 0.5 = x2 / x1.
Simplifying this equation yields 4x1 = x2. At this point, we have the optimal product mix, so now we need to figure out how much the consumer can afford. We know that the budget constraint is $40. To solve, we insert the optimal product mix into the budget constraint.
The budget constraint is $40 = $2x1 + $0.50x2. Inserting the fact that at the optimal point, x2 = 4x1, we can put the budget constraint into terms of only x1 and solve:
40 = 2x1 + 0.5(4x1) = 4x1. Then, x1 = 10, and so x2 = 40.
The consumer chooses to buy 10 cups of coffee and 40 bags of snacks.