Stochastic growth in continuous time Literature: See Chang (1988) for theoretical part and Achdou et
  al. (2015) for numerical part respectively.


Model

Consider the following stochastic optimal growth problem in per capita notation.
\begin{align}
&amp;\max_{c}\int^\infty_0 e^{-\rho t}u(c)dt\\
\text{s.t.}~~~&amp;  dk = [f(k) - (n-\sigma^2) k - c]dt - \sigma kdz\\
&amp;c\in[0,f(k)]\\
&amp;k(0) = k_0
\end{align}
everthing is standard except for $dz$ which is the increment of a standard Wiener process, i.e. $z(t)\sim\mathcal{N}(0,t)$. The population growth rate has mean $n$ and variance $\sigma^2$.

Analytical Solution

We presume Cobb-Douglas technology
\begin{align}
f(k) = k^\alpha,\quad \alpha\in(0,1)
\end{align}

and CRRA utility
\begin{align}
u(c) = \frac{c^{1-\gamma}}{1-\gamma},\quad \gamma &gt; 1.
\end{align}
Set up the Hamilton-Jacobi-Bellman equation (HJB-e)
\begin{align}
\rho v(k) = \max_c\left\{\frac{c^{1-\gamma}}{1-\gamma} + v'(k)(k^\alpha - (n - \sigma^2)k - c) + v''(k)\frac{k^2\sigma^2}{2}\right\}
\end{align}

The first order condition (FOC) reads
\begin{align}
c = v'(k)^{-\frac{1}{\gamma}}=:\pi(k)
\end{align}
where $\pi(\cdot)$ denotes the policy function.

Resubstitute FOC into HJB-e
\begin{align}
\rho v(k) = \frac{v'(k)^{\frac{\gamma-1}{\gamma}}}{1-\gamma} + v'(k)k^\alpha - v'(k)(n - \sigma^2)k  -  v'(k)^{\frac{\gamma-1}{\gamma}} + v''(k)\frac{k^2\sigma^2}{2}.
\end{align}

We guess a functional form of $v(k)$ with (Posch (2009, eq. 41))
\begin{align}
v(k) = \Psi \frac{k^{1-\alpha\gamma}}{1-\alpha\gamma}
\end{align}

where $\Psi$ is some constant. The first and second order derivative of $v$ are given by
\begin{align}
v'(k) &amp;= \Psi k^{-\alpha\gamma}\\
v''(k) &amp;= -\alpha\gamma\Psi k^{-1-\alpha\gamma}.
\end{align}

The HJB-e then reads
\begin{align}
&amp;\rho \Psi\frac{k^{1-\alpha\gamma}}{1-\alpha\gamma} = \frac{\Psi^{\frac{\gamma-1}{\gamma}}k^{\alpha(1-\gamma)}}{1-\gamma} + \Psi k^{\alpha(1-\gamma)} - (n-\sigma^2) \Psi k^{1-\alpha\gamma} -  \Psi^{\frac{\gamma-1}{\gamma}} k^{\alpha(1-\gamma)}  - \alpha\gamma\Psi k^{1-\alpha\gamma}\frac{\sigma^2}{2}\\[2mm]
\Longleftrightarrow \quad &amp;
k^{1-\alpha\gamma}\left(\frac{\rho}{1-\alpha\gamma} + n - \sigma^2\left(1 - \frac{\alpha\gamma}{2}\right)\right) = k^{\alpha(1-\gamma)}\left[1+\Psi^{-\frac{1}{\gamma}}\frac{\gamma}{1-\gamma}\right]
\end{align}

The maximized HJB-e is true iff the following conditions hold
\begin{align}
\rho = \left(-n + \sigma^2\left(1 - \frac{\alpha\gamma}{2}\right)\right)(1-\alpha\gamma)\quad \wedge \quad \Psi = \left(\frac{\gamma-1}{\gamma}\right)^{-\gamma}
\end{align}

Resubstitute $\Psi$ into $v$ which finally gives the true value function
\begin{align}
v(k) = \left(\frac{\gamma-1}{\gamma}\right)^{-\gamma} \frac{k^{1-\alpha\gamma}}{1-\alpha\gamma}.
\end{align}


How come that $v$ does not depend on $\sigma$? 


So the deterministic and stochastic value function must be the same. The policy function is then readily given by (use FOC and derivative of value function)

\begin{align}
\pi(k) = \left(1-\frac{1}{\gamma}\right)k^\alpha.
\end{align}

Note that this function does not depend on $\sigma$ either.

Numerical Approximation

I solved the HJB-e by an upwind scheme. Error tolerance $\epsilon=1e-10$. In the figure below I plot the policy function for varying $\sigma$. For $\sigma\to 0$ I arrive at the true solution (purple). But for $\sigma&gt;0$ the approximated policy function deviates from the true one. Which should not be the case, since $\pi(k)$ does not depend on $\sigma$, right?  


Can anyone confirm that the approximated policy functions should be the same for any $\sigma$, since the true one is independent of $\sigma$?
More of a comment:

There should be an expectation operator in the statement of the problem, otherwise problem doesn't make sense.

That "...the deterministic and stochastic value function must be the same..." is not quite right. The value of $\sigma^2$ is crucial in the restriction

\begin{align}
\rho = \left(-n + \sigma^2\left(1 - \frac{\alpha\gamma}{2}\right)\right)(1-\alpha\gamma).
\end{align}

If $\sigma^2 = 0$, then presumably $\rho &lt; 0$ for economically reasonable $\alpha$ and $\gamma$, in which case the deterministic problem may be ill-posed. What is true is that the stochastic value function takes the given form only if the parameter restriction holds.

Factoring out the Ito term $\frac{1}{2} \sigma^2$ from the right hand side

$$
\sigma^2\left(1 - \frac{\alpha\gamma}{2}\right) (1-\alpha\gamma),
$$

the restriction can be written as

$$
\rho + n (1-\alpha\gamma) = \frac{1}{2} \sigma^2 [ (1-\alpha\gamma) - (-\left(1 - \alpha\gamma\right)^2)].
$$

On the right hand side, we have a elasticity of intertemporal substitution term $(1-\alpha\gamma)$ and a risk aversion term $-\left(1 - \alpha\gamma\right)^2$. What the restriction says is that, with a particular choice of $\sigma$, they offset each other, up to time preference $\rho$ and the drift $n(1 - \alpha\gamma)$. Therefore the value function is independent of $\sigma$.

That the value function is independent of $\sigma$ is an artifact of the restriction, and choice of CRRA $u$. Not true in general.