This paper examines an intertemporal optimizing consumer or a representative consumer-firm in a deterministic setting subject to a general (either linear or nonlinear) capital accumulation equation. Duality theory is used to recast the Hamilton–Jacobi equation for dynamic optimization in terms of an instantaneous and an intertemporal profit function. An envelope theorem allows derivation of an explicit solution for the value of the costate variable as a function of the state and other variables. The final model form only requires specification of atemporal functions that are linked into a closed-form solution for the optimal dynamic decision variables through a system of contemporaneous simultaneous equations.