Minimizing a simple non-linear function by using Lagrange Multipliers
Given Function:
`5 − ( x − 2 )^2 − 2 ( y − 1 )^2`
Constraints
`x + 4 y = 3`
Solution:
According to Lagrange Theory,
`L = f ( x ) + λ g ( x )`
f(x) is the given function
g(x) is the given constraint
`L = 5 − ( x − 2 )^ 2 − 2 ( y − 1 ) ^2 − λ ( x + 4 y = 3 )`
`L = 5 − ( x − 2 )^ 2 − 2 ( y − 1 ) ^2 + λ( x + 4 y − 3)`
To successfully minimize the given function, we have to partially derivate L with respect to x, y and `λ`
`(∂ L)/ (∂ x) = 0`
`− 2 x + 4 + λ = 0`.........................................................(equation 1)
`(∂ L)/ (∂ y) = 0`
`− 4 y + 4 + 4 λ = 0`
`− y + 1 + λ = 0`...........................................................(equation 2)
`(∂ L)/( ∂ λ) = 0`
`x + 4 y = 3`..................................................................(equation 3)
`Equation (1) - Equation (2)`
`− 2 x + 4 + λ + y − 1 − λ = 0`
`− 2 x + y + 3 = 0`
`y = 2 x − 3`
substituting y in equation 3
`x + 4 y − 3 = 0`
`x + 8 x − 12 − 3 = 0`
`x = 5/3`
substituting x
`y = 2 x − 3`
`y = 2* ( 5/ 3 ) + 3`
`y = 1/3`
substituting x & y
`− 2 x + 4 + λ = 0`
`− 10/ 3 + 4 + λ = 0`
`3 λ = − 10 + 12`
`λ = 2/ 3`