Teaching Students Nonlinear Programming with Computer Algebra System

  • Włodzimierz Wojas
  • Jan Krupa
Open Access


This paper presents several didactic examples of the nonlinear programming (NLP) problems solved with Mathematica. We solved examples of Karush–Kuhn–Tucker necessary conditions, Lagrange multipliers method, convex optimization, and graphical method. We compared the hand calculation in Karush–Kuhn–Tucker method with Lagrange multipliers method. The paper contains Mathematica symbolic codes used for Karush–Kuhn–Tucker necessary conditions and the Hessian analysis in convex optimization. We present also some didactic graphs for various aspects of NLP problems using plots and dynamic plots. The use of Mathematica during teaching students about NLP by Computer Algebra System (CAS) seems to be very useful both as the calculations support (checking hand calculation) and when creating didactic graphical visualizations using dynamic plots. We did not find in available literature any similar example of NLP problems solved with CAS or the use of dynamic plots.


Higher education Mathematical didactics Nonlinear programming Mathematical programming Application of CAS Mathematica 

Mathematics Subject Classification

97B40 97R20 90C30 97I60 

Supplementary material

11786_2018_374_MOESM1_ESM.pdf (7.2 mb)
Supplementary material 1 (pdf 7417 KB)


  1. 1.
    Bazaraa, S.M., Shetty, C.M.: Nonlinear Programming: Theory and Algorithms, 2nd edn. Wiley, New York (1979)zbMATHGoogle Scholar
  2. 2.
    Griva, I., Nash, S.G., Sofer, A.: Linear and Nonlinear Optimization. SIAM, Philadelphia (2009)CrossRefzbMATHGoogle Scholar
  3. 3.
    Luenberger, D.G.: Linear and Nonlinear Programming, 3rd edn. Springer, Berlin (2010)zbMATHGoogle Scholar
  4. 4.
    Ostaszewski, A.: Advanced Mathematical Methods (London School of Economics), 1st edn. Cambridge University Press, Cambridge (1991)CrossRefGoogle Scholar
  5. 5.
    Peressini, A.L., Sullivan Jr., F.E., Uhl, J.J.: The Mathematics of Nonlinear Programming. Springer, New York (1988)CrossRefzbMATHGoogle Scholar
  6. 6.
    Ruskeepaa, H.: Mathematica Navigator: Graphics and Methods of Applied Mathematics. Academic Press, Boston (2005)zbMATHGoogle Scholar
  7. 7.
    Ruszczyński, A.P.: Nonlinear Optimization. Princeton University Press, Princeton (2006)zbMATHGoogle Scholar
  8. 8.
    Wolfram, S.: The Mathematica Book. Cambridge University Press, Cambridge (1996)zbMATHGoogle Scholar

Copyright information

© The Author(s) 2018

Open AccessThis article is distributed under the terms of the Creative Commons Attribution 4.0 International License (, which permits unrestricted use, distribution, and reproduction in any medium, provided you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made.

Authors and Affiliations

  1. 1.Department of Applied MathematicsWarsaw University of Life Sciences (SGGW)WarsawPoland

Personalised recommendations