the lagrangian method is often introduced in intermediate microeconomics. it's a very math heavy method, but incredibly useful. this video walks through the lagrange method in general.