Nonlinear Programming

Decision Sciences
Introduced by
Jorge Nocedal & Stephen Wright
Year
2006
Type
Continuous mathematical optimization
Family
Mathematical programming

What does it do?

Nonlinear programming (NLP) is the branch of mathematical optimization concerned with problems in which the objective function or at least one constraint is nonlinear.

Its gradient-based algorithms, including sequential quadratic programming (SQP), interior-point methods and quasi-Newton approaches, generally find locally optimal solutions to continuous decision problems arising in engineering, economics and the physical sciences. Global optimality can be guaranteed only in special cases, such as convex problems. Nocedal and Wright's textbook Numerical Optimization (2nd ed., 2006) is a standard reference for these methods.

The intuition behind the method

Imagine descending a hilly, fog-covered landscape while staying inside a fenced region. You cannot see the entire terrain, so you feel the slope beneath your feet (gradient), adjust your step direction to go downhill, and check at each move that you have not crossed the fence (constraints). If the fence bends or the hills overlap, simple straight-line paths will not work — you must curve your path. Nonlinear programming formalizes exactly this process, replacing intuitive hill-walking with mathematically rigorous step-size and direction rules.

History

The Karush-Kuhn-Tucker conditions at the core of nonlinear programming were developed by Karush, and by Kuhn and Tucker, earlier than the textbook by Nocedal and Wright. Practical algorithms, including SQP methods, augmented Lagrangian approaches and quasi-Newton updates such as BFGS, were developed in the decades that followed. Nocedal and Wright's second edition of Numerical Optimization (2006) is a widely used reference for these methods.

When to use it

Use nonlinear programming when the objective or constraints cannot be linearized without material loss of accuracy and the decision variables are continuous. Typical settings include engineering design with physical law constraints, portfolio optimization with nonlinear risk measures, and regression with nonlinear model forms. Gradient-based solvers require that f and the constraint functions be differentiable at the iterates, and Newton-type methods additionally require second derivatives or approximations of them. Constraint qualifications should be checked at the candidate solution. A standard example is the linear independence constraint qualification (LICQ), which requires the gradients of the active constraints at that point to be linearly independent; weaker qualifications also exist. Without a constraint qualification, the KKT conditions may not be necessary at a local minimizer. When variables are integer-valued, mixed-integer nonlinear programming (MINLP) extensions apply. If the problem is convex, any local optimum is a global optimum, so a local solver's output is globally optimal; for non-convex problems, a local solver gives only local guarantees.

Limitations and considerations

  • Non-convex problems offer only local optimality guarantees; global solutions require additional global search strategies.
  • Requires objective and constraints to be smooth (at least differentiable); non-smooth problems need specialized subdifferential methods.
  • Computational cost grows substantially with problem size when exact Hessian evaluation is required.
  • Constraint qualifications may fail (e.g., at degenerate feasible points), causing KKT conditions to lose their theoretical grounding.

Source conditions do not replace independent scientific review or validation by an analysis engine.

Strengths

  • Handles a wide class of real-world problems where linear or quadratic approximations are insufficient.
  • Mature algorithmic theory with well-studied convergence guarantees for convex instances.
  • Efficient gradient-based solvers (SQP, interior-point) can handle large problems when first derivatives are supplied.
  • Unified Lagrangian framework accommodates mixed equality and inequality constraints naturally.

Applications

  • Structural and aerospace engineering: minimizing weight subject to stress and deflection constraints.
  • Portfolio management: maximizing expected return subject to a nonlinear variance (risk) budget.
  • Chemical process design: optimizing reactor yield subject to thermodynamic and safety constraints.
  • Machine learning: training neural networks and kernel models via unconstrained or constrained NLP solvers.
  • Energy systems: optimal power flow problems in electricity grid dispatch with nonlinear physical constraints.

How it works

How it works

1

The analyst defines a scalar objective f(x) to minimize or maximize over decision variables x in R^n, together with equality constraints c_i(x) = 0 and inequality constraints c_j(x) >= 0. Identifying which constraints are active at a candidate solution and whether regularity conditions (constraint qualifications) hold is critical at this stage and determines what optimality theory applies.

Formula
\min_{x \in \mathbb{R}^n} f(x) \quad \text{s.t.} \quad c_i(x) = 0,\; i \in \mathcal{E};\quad c_j(x) \ge 0,\; j \in \mathcal{I}
2

The Karush-Kuhn-Tucker (KKT) conditions provide first-order necessary conditions for a local optimum. They require stationarity of the Lagrangian, complementary slackness for inequality multipliers (lambda_j c_j = 0), dual feasibility (lambda_j >= 0), and primal feasibility. Algorithms iteratively construct iterates that satisfy these conditions progressively more tightly, with second-order sufficiency conditions confirming that a stationary point is indeed a local minimum.

Formula
\nabla f(x^*) - \sum_{i \in \mathcal{E} \cup \mathcal{I}} \lambda_i \nabla c_i(x^*) = 0, \quad \lambda_j c_j(x^*) = 0, \quad \lambda_j \ge 0 \; \forall j \in \mathcal{I}
3

At each iteration k an algorithm computes a search direction p_k and a step length alpha_k satisfying Wolfe or Armijo conditions. The update p_k = -B_k^{-1} grad f(x_k) shown in the step formula is the unconstrained quasi-Newton step, where B_k is a quasi-Newton approximation of the Hessian (e.g., BFGS) or an exact second-derivative matrix. For constrained problems the direction is instead computed from a subproblem that includes the constraints: SQP methods solve a quadratic subproblem for p_k, while interior-point methods add barrier terms to handle inequality constraints and drive iterates toward the feasible interior.

Formula
x_{k+1} = x_k + \alpha_k p_k, \quad p_k = -B_k^{-1} \nabla f(x_k)
4

The stopping test checks that the stationarity measure is at most epsilon and that the constraint violation is at most delta. For a constrained problem the stationarity measure is the gradient of the Lagrangian, L(x, lambda) = f(x) - sum_i lambda_i c_i(x), evaluated at the iterate: grad_x L(x_k, lambda_k) = grad f(x_k) - sum_i lambda_i grad c_i(x_k). The KKT conditions require this quantity to vanish, so a tolerance on the objective gradient alone is only the unconstrained special case. Feasibility is measured on the constraint forms stated in the problem formulation: for equalities by |c_i(x_k)|, and for inequalities c_j(x) >= 0 by max(0, -c_j(x_k)), so that strictly positive values of c_j are not counted as violations. Because NLP is generally non-convex, algorithms may converge to local optima; multiple restarts from different starting points or global search strategies (branch-and-bound, multistart) are recommended when global optimality is required.

Formula
\|\nabla f(x_k)\| \le \epsilon \quad \text{and} \quad \max_{i} |c_i(x_k)| \le \delta

Common pitfalls

  • Applying the KKT conditions blindly at degenerate or infeasible points is risky: without a constraint qualification they may not be necessary at a local minimizer, so a search for KKT points can miss the true optimum and optimality claims at such points are unsupported.
  • Using poorly scaled variables causes ill-conditioned Hessian approximations and slow or failed convergence.
  • Accepting the first local minimum found without multiple restarts in non-convex settings may miss the global optimum significantly.
  • Finite-difference gradient approximations introduce numerical error; analytic or automatic differentiation is strongly preferred.

Frequently asked questions

Is every linear program also a nonlinear program?

Yes. Linear programming is a special case of NLP where both the objective and all constraints are affine. However, LP admits the simplex and interior-point algorithms that exploit linearity and are far more efficient than general NLP solvers; using a general NLP solver for an LP is wasteful but mathematically valid.

When can I trust that a KKT point is a global minimum?

When the NLP is convex, meaning f is convex and the feasible set is a convex set, any KKT point is a global minimum. For non-convex problems this guarantee does not hold, and a KKT point is only a local minimum (under second-order sufficiency conditions). Global optimization methods such as branch-and-bound or convex relaxations are needed otherwise.

What is the difference between SQP and interior-point methods?

SQP iteratively solves quadratic programming subproblems that approximate the NLP locally and is often preferred for small-to-medium problems with many active constraints. Interior-point (barrier) methods keep iterates in the interior of the inequality-constrained region and are often used for large sparse problems. These size-based choices are practical rules of thumb rather than guaranteed rankings; Nocedal and Wright (2006) is the reference for a detailed treatment of both methods.

Related methods

Sources

  1. Nocedal, J., & Wright, S. J. (2006). Numerical Optimization (2nd ed.). Springer.

    ISBN: 978-0-387-30303-1