Constraint Minimization - Pen and Paper calculation
1. AIM:
Minimize the following function
`5-(x-2)^2 -2(y-1)^2`
subject to the following constraint
`x + 4y = 3`
2. SOLUTION:
Let `f(x,y) = 5-(x-2)^2 -2(y-1)^2`
So, `f(x,y) = -x^2 + 4x - 2y^2 + 4y - 1`
Since we want to minimize this function, we can directly differentiate but we also have a constraint. Thus we need to use Lagrange approach.
So, let a new function `g(x,y,lambda)`
`g(x,y,lambda) = f(x,y) + lambda(constrai nt)` = `-x^2 + 4x - 2y^2 + 4y - 1 + lambda(x + 4y - 3)`
now doing partial differentiation, we get
`(delg)/(delx) = -2x + 4 + lambda`..........................(1)
`(delg)/(dely) = -4y + 4 + 4lambda`........................(2)
`(delg)/(dellambda) = x + 4y - 3`............................(3)
Solving (1) and (2) simultaneously, we get
`y - 2x + 3 = 0` now solve this with (3). we get
`9y - 3 = 0` So, `y = 1/3`
Putting value of `y`in (3), we get `x+4*1/3 - 3 = 0` So, `x = 5/3`
Putting `x` and `y` in (1), we get `-2(5/3) + 4 + lambda = 0` So,
`lambda = -2/3`
Therefore, minimmum `f(x,y) = 5-(x-2)^2 -2(y-1)^2` while satisfying `x + 4y = 3` is 4