Project

Constrained Minimization

Aim: Minimizing a given function subjected to a constraint.

Objective:

Minimize the equation: `f(x,y) = 5 - (x-2)^2 - 2(y-1)^2`

Under constraint: `x + 4y = 3`

Theory:

Constrained minimization (constrained optimization) is the process of optimizing an objective function with respect to some variables in the presence of constraints on those variables.

If the constrained problem has only equality constraints, the method of Lagrange multipliers can be used to convert it into an unconstrained problem whose number of variables is the original number of variables plus the original number of equality constraints. Alternatively, if the constraints are all equality constraints and are all linear, they can be substituted out of the objective function, leaving an unconstrained problem in a smaller number of variables.

Method:

The function `f(x,y) = 5 - (x-2)^2 - 2(y-1)^2` can be simplified as `-x^2 - 2y^2 +4x +4y -1`.

By Lagrange method of constrained minimization, we have,

`g(x,y) = f(x,y) + lamda(x + 4y - 3)`

where, `lambda` is Lagrange operator

Hence, now we differentiate the above equation partially and equate it to zero (for minimizing)

Eq-1: `(del f)/(del x) = -2x + 4 + lamda = 0`

Eq-2: `(del f)/(del y) = -4y + 4lambda + 4 = 0`

Eq-3: `(del f)/(del y) = x + 4y -3 = 0`

From Eq-1 and Eq-2, we get

Eq-4: `x = (lambda)/2 + 2`

Eq-5: `y = lambda + 1`

substituting the values of `x` and `y` in Eq-3, we get,

`((lambda)/2 + 2) + 4(lambda + 1) - 3 = 0`

Hence, `lambda = -2/3`.

Substituting the value of `lambda` in Eq-4 and Eq-5, we get,

`x = 5/3` and `y = 1/3`

Results:

For the constraint provided to the given function, the function is minimized at

`x = 5/3`

`y = 1/3`

References:

  • Python for Mechanical Engineers - Course provided by Skill Lync
  • Supporting Material: Higher Engineering Mathematics - BS Grewal
Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.