Work out lagrange multiplier instantly with clear inputs, formula shown and shareable results.
At a constrained optimum the objective's gradient must be parallel to the constraint's gradient, so ∇f = λ∇g. Consistency of λ across the components is the test, and the cross product vanishing confirms parallelism.
Lagrange condition
∇f = λ∇g, so λ = (∂f/∂x)/(∂g/∂x) = (∂f/∂y)/(∂g/∂y)
λ = 0.5 from both components, so the gradients are parallel and the Lagrange condition holds.
It is the shadow price: the rate at which the optimal objective value improves as the constraint is relaxed by one unit.