USE THIS SEARCH BOX AND GET MORE QUESTIONS UPDATES

Saturday, March 12, 2016

Finding Maxima and Minima of functions with more than 2 variables

When a function has one variable we know how to find the maxima and minima of the function by differentiating and equating to zero to find the points.

But when a function has more than two variables, we use partial differentiation to find the maxima and minima.

1. f(x,y)=x3+3xy2+2xy subject to the condition x + y = 4
Sol: The local maximum and minimum of f(x,y) subject to the constraint g(x,y)=0 correspond to the stationary points of L(x,y,λ)=f(x,y)λ.g(x,y)
where λ is Lagrange multiplier.
We have L(x,y,λ)=x3+3xy2+2xyλ.(x+y4)
Now Lx=3x2+3y2+2yλ
λLλy=6xy+2xλ
Ly=6xy+2xλ
Lλ=(x+y4)

Note: in doing partial differentiation, except the independent variable everything is considered a constant.  For example, when we do differentiation w.r.t x then, except x all others should be considered constant.
Also ddx(xn)=n.xn1

Putting Lx=Ly=Lλ=0
3x2+3y2+2y=λ ------(1)
6xy+2x=λ -----(2)
x + y - 4 = 0 ------------(3)
From equations (1) and (2) we get 3x2+3y2+2y=6xy+2x --------(4)
Putting y = - x + 4 in equation (4)
we get 3x2+3(x+4)2+2(x+4)=6x(x+4)+2x
3x2+3(x28x+16)2x+8=6x2+24x+2x
12x252x+56=0
3x213x+14=0
(3x7)(x2)=0
x=2,73

For x = 2, from equation (3) we get y = 2 and F(x,y)) = 40
and for x=73y=53 and F(x,y) = 392527

Alternatively: By substituting y = x - 4 in the equation f(x, y) = x3+3xy2+2xy
we get, F(x, 4-x) = x3+3x(4x)2+2x(4x)
F(x) = x3+3x(168x+x2)+2x(4x)
F(x) = 4x326x2+56x
Differentiation F with respect to x we get, F1(x)=12x252x+56
Solving like above we get the values of x=2,73

2. Find the point on the line 3x + 2y = 5 that is closest to the point (3,1)
Sol:  The distance between a general point (x,y) and the point (3, 1) is (x3)2+(y1)2
We want to find the minimum value of this distance subject to the constraint 3x + 2y = 5.  Infact we have to minimize the square of the distance, and so we minimize f(x, y) = (x3)2+(y1)2
subject to the given constraint.
L(x,y,λ)=(x3)2+(y1)2λ(3x+2y5)
Lx=2(x3)+3λ
Ly=2(y1)+2λ
Lλ=3x2y+5

Putting Lx=Ly=Lλ=0
2(x3)+3λ=0 -------(1)
2(y1)+2λ=0 ------(2)
3x + 2y = 5 ------------(3)

Multiplying (1) by 2 and (2) by 3 will give
4(x3)+6λ=0
6(y1)+6λ=0
So 4(x-3) = 6(y-1)  2x - 3y = 3 -------(4)
Multiplying equation (3) by 3 and (4) by 2, gives
9x + 6y = 15
4x - 6y = 6
Solving we get x = 2113 and y = 113
Thus the point (2113,113) is on the given line and closest to (3,1)

No comments:

Post a Comment