When I learnt the continuous time and discrete time neoclassical model, it’s feels so tempting to try to put them together in a uniform view. It’s not trivially easy though. And here’s one way to do it.
Continuous-Time Neoclassical Growth Model Given $k_0$, $f(\cdot), U(\cdot)$: $$ \begin{align*} & \max_{\lbrace c_t\rbrace_{t\ge 0}} \int_0^\infty e^{-\rho t} U(c_t),\text{d}t\cr & \text{s.t. }\dot k_t = f(k_t) - \delta k_t - c_t \end{align*}\tag{1} $$ Taking (appropriate) derivative of the Hamiltonian function solves this problem — in general, for any continuous-time problem in the following form: $$ \begin{align*} V^\star (x_0) :=& \max_{\lbrace u_t\rbrace_{t\ge 0}} \int_0^\infty e^{-\rho t} h(x_t, u_t),\text{d}t\cr & \text{s.t. }\dot x_t = g(x_t, u_t). \end{align*} $$ then, the following first-order optimality conditions are necessary (under regularity assumptions) and sufficient (under regularity and convexity assumptions) for the path $\lbrace x_t, u_t\rbrace_{t\ge 0}$ to be optimal: $$ \begin{align*} & \text{let } H(x, u, \lambda) = h(x, u) + \lambda^Tg(x, u)\cr & \text{FOCs}:\begin{cases}H_u(x_t, u_t, \lambda_t) = 0\cr \dot \lambda_t = \rho \lambda_t - H_x(x_t, u_t, \lambda_t)\cr \dot x_t = H_\lambda (x_t, u_t, \lambda_t) = g(x_t, u_t). \end{cases} \end{align*} $$ For $(1)$, the first order optimality conditions are $$ (1)’s\text{ FOCs}:\begin{cases} U’(c_t) = \lambda_t\cr \dot \lambda(t) = \rho\lambda_t - \lambda_t(f’(k_t) - \delta)\cr \dot k_t = f(k_t) - \delta k_t - c_t. \end{cases} $$
...