I am reading a paper with a stochastic optimal control problem. At one point the author faces the following Hamilton-Jacobi-Bellman (HJB) equation:
$$\rho V(A)=\max_{c,w}\left\{ u(c)+V'(A)\left[(r(1-w)+\mu w)A+y-c\right]+\frac{1}{2}w^{2}\sigma^{2}A^{2}V''(A)\right\}$$
He writes that: If $u''(\cdot)<0$ then the optimal policy function for $c$ may be written as: $c^{*}=C(A)=(u')^{-1}(V'(A))$. Substituting into the HJB equation, we get the differential equation over $V(A)$:
$$\rho V(A)= u(C(A))+V'(A)(y+rA-C(A))+\frac{1}{2}\left(\frac{r-\mu}{\sigma}\right)^{2}\frac{(V'(A))^{2}}{V''(A)}$$
I can easily see the replacement in the first part of the latter equation but do not understand how the last term $\frac{1}{2}\left(\frac{r-\mu}{\sigma}\right)^{2}\frac{(V'(A))^{2}}{V''(A)}$ is obtained. If i try to do some algebra the most i can get is:
$$\rho V(A)= u(C(A))+V'(A)(y+rA-C(A))+WA\left[(\mu-r)V'(A)+\frac{1}{2}WA\sigma^{2}V''(A)\right]$$
Is there anyone who can help me understand what the correct procedure is to obtain the result of the paper$?$
Are you sure the last term is not with a minus sign? What I got is the following.
Taking derivatives wrt both $c$ and $w$ we obtain
$$ c^{\star}=(u')^{-1}(V'(A)) \\ w^{\star} = \frac{r-\mu}{A \sigma^2} \frac{V'(A)}{V''(A)} $$
Inseriting both in the first equation we end up with
$$ \rho V(A) = u(c(A)) + V'(A) \bigg[ rA - \bigg(\frac{r-\mu}{\sigma} \bigg)^2 \frac{V'(A)}{V''(A)} +y -c(A) \bigg] + \frac{1}{2} \bigg(\frac{r-\mu}{\sigma} \bigg)^2 \frac{(V'(A))^2}{V''(A)} $$
which means
$$ \rho V(A) = u(c(A)) + V'(A) \bigg[ rA +y -c(A) \bigg] - \frac{1}{2} \bigg(\frac{r-\mu}{\sigma} \bigg)^2 \frac{(V'(A))^2}{V''(A)} $$