CONSTRAINT MINIMIZATION – PEN AND PAPER CALCULATION
CONSTRAINT MINIMIZATION – PEN AND PAPER CALCULATION
AIM – To minimize given function in accordance with constraint equation provided.
OBJECTIVES-
- Write a combined function which includes both given function and constraint equation.
- Differentiate function partially with respect to x, y and λ. Put these three expressions equal to zero.
- Solve these equations to find values of x, y and λ.
INTRODUCTION-
In mathematical optimization, constraint optimization is the process of optimizing an objective function with respect to some variables in the presence of constraints on those variables. Constraints can be either hard constraints, which set conditions for the variables that are required to be satisfied, or soft constraints, which have some variable values that are penalized in the objective function if, and based on the extent that, the conditions on the variables are not satisfied.
SOLUTION-
Given function: `f(x,y)=5-(x-2)^2-2(y-1)^2`
Constraint: `x+4y=3`
Let `g(x,y)=5-(x-2)^2-2(y-1)^2+λ(x+4y-3)`
So, partially differentiating w.r.t x we get
`(∂g(x,y))/(∂x)= -2(x-2)+λ` Putting this equal to zero we get our equation number (1)
`λ=2(x-2) … (1)`
Partially differentiating w.r.t y we get
`(∂g(x,y))/(∂y)= -4(y-1)+4λ` Putting this equal to zero we get our equation number (2)
`λ=4(y-1) … (2)`
Partially differentiating w.r.t λ we get
`(∂g(x,y))/(∂λ)= x+4y-3` Putting this equal to zero we get our equation number (3)
`x+4y=3 … (3)`
Solving equation number (1), (2) and (3) we get following values,
`x= 5/3`
`y=1/3`
`λ=(-2)/3`
So, minimum value of given function is `f(5/3,1/3)=4`