Suppose that all you do in a day is work, play and sleep. Let be the number of hours per day you spend playing, is the number of hours you spend sleeping, and is the number of hours you spend working. Suppose that sleeping is free, but playing costs you $15 an hour. Furthermore, you spend all the money you earn working on playing.

The utility you get from sleeping and playing is given by a Cobb-Douglas utility function:
, where

NOTE: By construction, can represent the hours you spend consuming anything that is free, and can be the number of hours consuming goods you have to pay for. This does not change the question, it is just interesting that this set-up can be applied to a more general setting.

Let
If your hourly wage is . Find the number of hours you should work a day in order to maximize your utility as a function of .

If :

The easiest way to solve this question is using Lagrange multipliers.
In general: suppose you want to maximize , subject to , and .
We define the Lagrange function to be:

is maximized when all of the partial derivatives of the Lagrange function are equal to .

(you will lose 50% of your points if you do)

You can earn partial credit on this problem.