Project

Constraint Minimization using python

Let us consider the given function as

`f ( x , y ) = 5 − ( x − 2 )^ 2 − 2 ⋅ ( y − 1 ) ^2`

and the constraint as

`g ( x , y ) = x + 4 y − 3`

We can use Lagrange multipliers to find the maximum or minimum value of the function.

So, we can take `f(x,y)` as `f(x,y,lamda)`, then we have to differentiate the function w.r.t x,y and `lamda` and equate the to zero gives the x, y and `lamda`values which then by substituting in the function gives maximum or minimum value.

Therefore minimization of the function is not possible.

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.