Solution (source code)

= Solution

Constant <relative risk aversion coefficient> means that $\alpha=-WU''(W)/U'(W)$ does not depend on wealth, for $W>0$ and $U'(W)>0$. The defining differential equation integrates as
$$
\frac{d}{dW}\log U'(W)=-\frac{\alpha}{W},\qquad U'(W)=cW^{-\alpha},\quad c>0.
$$
A second integration therefore gives
$$
\boxed{U(W)=\begin{cases}\displaystyle\frac{cW^{1-\alpha}}{1-\alpha}+d,&\alpha\ne1,\\ c\log W+d,&\alpha=1.\end{cases}}
$$
The additive constant and positive scale do not affect <expected utility> preferences. Since $U''(W)=-\alpha cW^{-\alpha-1}$, positive $\alpha$ gives <risk aversion>, zero gives <risk neutrality>, and negative $\alpha$ gives <risk seeking>. These are respectively concave, affine and convex <utility functions>. The usual <CRRA utility> class is the positive-$\alpha$ case.