In the present work, two optimal control systems with economic applications are investigated, concerning the minimum cost of production and storage. The framework of distributional systems is used in the study of controllability, applying Lie geometric methods. In both cases of holonomic and nonholonomic distributions, Pontryagin's Maximum Principle leads to optimal solutions. In the case of a non-linear equation, a numerical solution is used. Finally, some numerical examples with graphical representations are given.