Project

Constraint Minimalisation

The objective of this project is to find the minima of a given function using Lagrange multiplier method with respect to a constraint equation.

In mathematical optimization, the method of Lagrange multipliers is a strategy for finding the local maxima and minima of a function subject to equality constraints (i.e., subject to the condition that one or more equations have to be satisfied exactly by the chosen values of the variables).

Simply put the minima of the given function must satisfy the constraint equation.

The given function is:

`f(x)=5-(x-2)^2-2〖(y-1)〗^2`

The constraint is:

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

Using these two functions we can form what is called the Lagrangian function L:

`L=f(x)-λg(x)`

Where is the Lagrange multiplier

To find out the minima of the given function we need to partially differentiate the Lagrangian with respect to x and y

`∇L=∇f(x)-λ∇g(x)`

Partially differentiating L with respect to x:

`L=5-(x-2)^2-2(y-1)^2-λ(x+4y-3)`

`L_x=2(x-2)-λ`

`L_y=4(y-1)-4λ`

Now to find the minima we have to set Lx and Ly as zero

Therefore, we get,

`x=λ/2+2`

`y=λ+1`

Now we have 2 equations for 3 unknowns. But we know that the constraint has to be satisfied. Thus, we have the third equation too. We can substitute the values of x and y in the constraint equation. Then the equation becomes:

`λ/2+2+4(λ+1 ) = 3`

From the above equation

`λ=-2/3`

Now we can back substitute the value in the equations for x and y:

From that we get

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

The minima of f(x) subject to the constraint is `x=5/3 ,y=1/3`

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.