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$?$