https://randall-romero.github.io/CompEcon/notebooks/opt/06 KKT conditions for constrained optimization problems.html