Constraint Minimization - Pen and Paper calculation
AIM :
To minimize the following function.
`5−(x−2)^2 - 2(y-1)^2`
Subject to the following constraint.
`x + 4y = 3`
INTRODUCTION :
Constrained optimization (in some contexts called constraint optimization) is the process of optimizing an objective function with respect to some variables in the presence of constraints on those variables. In a constrained optimization problem, the objective function is either a cost function (to be minimized) or a reward/utility function (to be maximized).
A constraint is a hard limit we place on a variable’s value to prevent the objective function from going forever in certain directions.

A general constrained minimization problem may be written as follows:
Min `f(x)`
Subjected to `g_i(x) = c_i` for `i = 1,.......n` (Equality Constraints)
SOLUTION :
Here, we need to find the values of the variables ‘`x`’ and ‘`y`’ such that the function is minimized and the values satisfy the constraint equation.
Step – 1 : Simplifying the Function
In this step, we simplify the given function,
`f(x,y) = 5−(x−2)^2 - 2(y-1)^2`
As we know, `(a–b)^2=a^2–2ab+b^2` , we expand the above equation as,
`5–(x^2–4x+4)–2(y^2-2y+1)`
`=>` `f(x,y)=-x^2–2y^2+4x+4y-1`
Step – 2 : Forming a New Function
We form the equation for `g(x,y)` by using the Lagrangian Method as follows.
`g(x,y)=f(x,y)+λ(x+4y–3)`
`=>` `-x^2–2y^2+4x+4y–1+λx+4λy–3λ`
Step – 3 : Applying Minimiaztion Function
Further, we differentiate the above equation with respect to `x` , `y` and `lamda`
`(delg)/(delx)=0` `=>` `-2x+4+λ=0`
`(delg)/(dely)=0` `=>` `-4y+4+4λ=0`
`(delg)/(dellamda)=0` `=>` `x+4y = 3`
Step – 4 : Solving Linear Equations
From the previous step, we obtain three linear equations.
`-2x+λ=-4`
`-4y+4λ=-4`
`x+4y=3`
By solving the above three equations simultaneously, we get the values of `x` , `y` and `lamda` as follows.
`x=5/3` ; `y=1/3` ; `λ=-2/3`
These above values satisfy the constraint equation and thereby, minimizing the function.
CONCLUSIONS :
The given function subjected to the constraint has been successfully minimized for the values,
`x=5/3` ; `y=1/3` ; `λ=-2/3`