begin to implement a function for computing the lagragian multipliers.