you can use Lagrange multipliers - Wikipedia, the free encyclopedia to do this.
To solve the optimisation problem, differenciate L with respect to p,q and and set all partial derivatives to zero.
you can use Lagrange multipliers - Wikipedia, the free encyclopedia to do this.
To solve the optimisation problem, differenciate L with respect to p,q and and set all partial derivatives to zero.