In this study, we have minimized a production costs under different constraints. The analysis was conducted using the Lagrange theorem and its generalization with the Karush-Kuhn-Tucker (KKT) conditions. The graphical modeling of the studied cost function has been done in Python with a Jupyter notebook.