Maximizing Utility A farmer learns that he will die at the end of the year (day 365, where today is day 0) and that he has a number of sheep. He decides that his utility is given by $ab$ where $a$ is the money he makes by selling his sheep (which always have a fixed price) and $b$ is the number of days he has left to enjoy the profit; i.e., $365-k$ where $k$ is the day. If every day his sheep breed and multiply their numbers by $\frac{103}{101}$ (yes, there are small, fractional sheep), on which day should he sell them all?
 A: Let $s$ be the number of sheep and let $p$ be the selling price per sheep. 
Therefore, $s*\left(\frac{103}{101}\right)^k$ is the current number of sheep per day, where $k$ is the current day.
We can say that $a = s*p = s*p*\left(\frac{103}{101}\right)^k$ and $b = 365 - k$
Therefore, his utility can be represented as:
$$U = ab = \left(sp\left(\frac{103}{101}\right)^k\right)(365-k) = 365sp\left(\frac{103}{101}\right)^k - spk\left(\frac{103}{101}\right)^k$$
Since we are finding the day, differentiating with respect with $k$:
$$U' = 365sp\left(\frac{103}{101}\right)^k\ln\left(\frac{103}{101}\right) - sp\left(\frac{103}{101}\right)^k - 365spk\left(\frac{103}{101}\right)^k\ln\left(\frac{103}{101}\right) =0$$
$$=365sp\ln\left(\frac{103}{101}\right) - sp - 365spk\ln\left(\frac{103}{101}\right) = 0$$
$$365spk\ln\left(\frac{103}{101}\right) = 365sp\ln\left(\frac{103}{101}\right) - sp$$
$$k = \frac{365sp\ln\left(\frac{103}{101}\right) - sp}{365sp\ln\left(\frac{103}{101}\right)} = \frac{365\ln\left(\frac{103}{101}\right) - 1}{365\ln\left(\frac{103}{101}\right)} \approx 0.86$$
