Loading…

Lagrange Multipliers Optimizer

Math Calculus • Multivariable Calculus

View all topics
Solves constrained extrema using Lagrange multipliers: \(\nabla f = \lambda \nabla g\) with \(g=c\). Type pi, e, sqrt(2), powers like x^2. Graph shows contour map of \(f\) and the constraint curve \(g=c\) (2D). Drag to pan, wheel to zoom.
Search domain (box)
Solver & graph settings (optional)
Ready
Enter \(f\), \(g\), \(c\), and a domain, then click “Calculate”.

Graph

Contours of \(f\) and constraint \(g=c\)

Drag to pan, mouse wheel to zoom, double-click to reset. Hover to read \((x,y)\), \(f\), and \(g\). The constraint curve \(g=c\) is drawn thicker; candidate points are marked and labeled.

Rate this calculator

0.0 /5 (0 ratings)
Be the first to rate.
Your rating
You can update your rating any time.

Frequently Asked Questions

What does the Lagrange multipliers method solve?

It finds candidate maxima and minima of an objective function f subject to an equality constraint g = c. The method solves ∇f = λ∇g together with the constraint to locate points on the constraint where f can be extremal.

Why do I need to set a search domain for the solver?

The calculator uses a multi-seed Newton method that searches for solutions within the bounds you provide. Restricting the domain helps locate relevant solutions and avoid missing or duplicating points in large regions.

What does the unconstrained compare option do?

When enabled, the tool also searches for unconstrained critical points by solving ∇f = 0. This helps compare constrained candidates on g = c with stationary points of f that may lie off the constraint.

How should I interpret the contour graph and the constraint curve?

The contour map shows level sets of f, while the thicker curve represents the constraint g = c. Candidate points are marked where the constraint intersects contours in a way consistent with tangency implied by ∇f being parallel to ∇g.