Finding consumption function which maximizes utility I can across this question in my applied real analysis textbook that I'm having trouble with. It asks us to consider the utility function $U(C) = \sqrt{e^{-rt}C}$. I'm supposed to find the consumption function which maximizes the utility over time interval [0,T]:
$$\int^T_0 U(C(t))dt$$
I would really appreciate if someone could explain how to do this as the textbook does not do a very good job of explaining questions such as this. We are currently working on the calculus of variations.
 A: Here is a sketch of what you could do given a constraint. Consider the constraint $\int_0^T C dt = C_0.$ Let $C$ be a function satisfying the constraint. Then pick an arbitrary perturbation $f$ that respects the constraint, i.e. $\int C+\epsilon f dt = C_0$, which implies $\int_0^T f dt = 0.$
Then one can show that
$$ \int_0^T U(C+\epsilon f) dt - \int_0^T U(C) dt = \epsilon \int_0^T \sqrt{e^{-rt}} f C^{-1/2} dt + O(\epsilon^2). $$
So the derivative of the objective function at $C$ in the direction $f$ is
$$ \int_0^T \sqrt{e^{-rt}} f C^{-1/2} dt.$$
For us to have a local minimum or maximum, we want the derivative to be zero for all $f$ that respect the constraint. For this to happen, we need to have $C =  k e^{-rt}$ for some constant $k$. We can find the value of $k$ by making sure that the constraint is satisfied.
The above is not rigorous, but it is the correct outline of how a rigorous argument could go. I'm happy to elaborate on details and why this is the correct approach if needed.
