Maxima and minima of functions of two and three variables-II
Read this section before proceeding to the questions.
Question 5
- Find the maximum value of f=xyz such that x+y+z=24.
Eliminating z in f, we get
f=xy(24−x−y)=24xy−x2y−xy2fx=24y−2xy−y2fy=24x−x2−2xyfxx=−2yfyy=−2xfxy=24−2x−2yfyx=24−2x−2y
For extreme values,
fx=024y−2xy−y2=0(21.1)
fy=024x−x2−2xy=0(21.2)
Solving (21.1) and (21.2), we get
x=yx=24−y
When x=y,
y=0y=243=8
When x=24−y,
y=0y=24
Thus there are four extreme points (0,0),(8,8),(24,0) and (0,24).
At (0,0),
fxx=0fyy=0fxy=fyx=24∣∣∣fxxfxyfyxfyy∣∣∣=∣∣∣024240∣∣∣=−(24)2<0
At (24,0),
fxx=0fyy=−2×24=−48fxy=fyx=−24∣∣∣fxxfxyfyxfyy∣∣∣=∣∣∣0−24−24−48∣∣∣=−(24)2<0
At (0,24),
fxx=−2×24=−48<0fyy=0fxy=fyx=−24∣∣∣fxxfxyfyxfyy∣∣∣=∣∣∣−48−24−240∣∣∣=−(24)2<0
At points (0,0),(24,0),(0,24), there is neither maximum nor minimum.
At (8,8),
fxx=−2×8=−16fyy=−2×8=−16fxy=fyx=−8∣∣∣fxxfxyfyxfyy∣∣∣=∣∣∣−16−8−8−16∣∣∣=192>0
Thus there is maximum at (8,8). Plugging in these values into x+y+z=24, we get z=8.
Thus at maximum, x=y=z=8 and the value is 8∗8∗8=512.
- Find the minimum value of u=x2+xy+y2+3z2 such that x+2y+4z=60.
Here u=x2+xy+y2+3z2 and ϕ=x+2y+4z−60.
Let F=u+λϕ=x2+xy+y2+3z2+λ(x+2y+4z−60). So
Fx=2x+y+λFy=x+2y+2λFz=6z+4λFλ=x+2y+4z−60
For extreme values,
Fx=02x+y+λ=0(21.3)
Fy=0x+2y+2λ=0(21.4)
Fz=06z+4λ=0(21.5)
Fλ=0x+2y+4z−60=0(21.6)
From (21.3), (21.4), (21.5) and (21.6), we get x=0,y=907,z=607.
Taking partial derivatives,
ux=2x+yuy=x+2yuz=6zuxx=2uxy=1uxz=0uyx=1uyy=2uyz=0
uzx=0uzy=0uzz=6ϕx=1ϕy=2ϕz=4
At (0,907,607), calculating bordered Hessian determinants,
∣∣˜H1∣∣=∣∣∣0ϕxϕxuxx∣∣∣=∣∣∣0112∣∣∣=−1<0
∣∣˜H2∣∣=∣∣
∣
∣∣0ϕxϕyϕxuxxuxyϕyuyxuyy∣∣
∣
∣∣=∣∣
∣∣012121212∣∣
∣∣=−6<0
∣∣˜H3∣∣=∣∣
∣
∣
∣∣0ϕxϕyϕzϕxuxxuxyuxzϕyuyxuyyuyzϕzuzxuzyuzz∣∣
∣
∣
∣∣=∣∣
∣
∣
∣∣0124121021204006∣∣
∣
∣
∣∣=−84<0
The way I calculated determinant in 4x4 matrix is using R code:
x=c(0,1,2,4,1,2,1,0,2,1,2,0,4,0,0,6)
y= matrix(x, nrow = 4, ncol = 4, byrow = TRUE)
det(y)
Thus all bordered Hessian determinants ∣∣˜H1∣∣,∣∣˜H2∣∣ and ∣∣˜H3∣∣ are <0.
Hence f has minimum at (0,907,607) and the value is
u=(907)2+3×(607)2=27007
The way I add these fractions is using Raku code:
say (8100/49+10800/49).raku
- Find the extreme value of ϕ=x2+y2+z2 such that x+z=1 and 2y+z=2.
Given, ϕ=x2+y2+z2. Let β=x+z−1,ψ=2y+z−2, then
F=ϕ+λ1β+λ2ψ=x2+y2+z2+λ1(x+z−1)+λ2(2y+z−2)Fx=2x+λ1Fy=2y+2λ2Fz=2z+λ1+λ2Fλ1=x+z−1Fλ2=2y+z−2
For extreme values,
Fx=02x+λ1=0(21.7)
Fy=02y+2λ2=0(21.8)
Fz=02z+λ1+λ2=0(21.9)
Fλ1=0x+z−1=0(21.10)
Fλ2=02y+z−2=0(21.11)
Multiplying (21.7) by 2 and (21.9) by 2, we get
4x+2λ1=0(21.12)
4z+2λ1+2λ2=0(21.13)
Adding (21.12) and (21.8) and subtracting (21.13), we have
4x+2y−4z=0(21.14)
Solving (21.10), (21.11) and (21.14),
x=13,y=23 and z=23.
The extreme value is thus
ϕ(13,23,23)=(13)2+(23)2+(23)2=99=1
Lagrange’s method of undetermined multipliers can help only in determining the extreme point but it cannot say definitely whether it has a maximum or a minimum value at that point.
Question 6
Find the minimum value of x2+y2+z2 when subjected to the condition x+y+z−1=0 and xyz+1=0.
Let f=x2+y2+z2,g=x+y+z−1 and h=xyz+1. We are trying to minimise the function f subject to the constraints g and h. Calculating the gradients of each
∇f=(2x,2y,2z)∇g=(1,1,1)∇h=(yz,xz,xy)
The Lagrange condition is ∇f=λ∇g+μ∇h, so we solve the equations
2x=λ+μyz(21.15)
2y=λ+μxz(21.16)
2z=λ+μxy(21.17)
x+y+z=1(21.18)
xyz+1=0(21.19)
Subtracting (21.16) from (21.15),
2x−2y=μz(y−x)μz(y−x)+2(y−x)=0(y−x)(μz+2)=0y=x,z=−2μ
Putting these values in (21.18),
2x−2μ=1(21.20)
and (21.19),
−2x2μ+1=0(21.21)
Solving (21.20) and (21.21),
x2(1−2x)+1=02x3−x2−1=0x=1,−14−√7i4,−14+√7i4
Taking x=1, y=1,z=−1. The extreme point is thus (1,1,−1).
Subtracting (21.17) from (21.15),
2x−2z=μy(z−x)(x−z)(2+μy)=0x=z,y=−2μ
Putting these values in (21.18),
2z−2μ=1(21.22)
and (21.19),
−2z2μ+1=0(21.23)
Solving (21.22) and (21.23),
z2(1−2z)+1=02z3−z2−1=0z=1,−14−√7i4,−14+√7i4
Taking z=1, x=1,y=−1. The extreme point is thus (1,−1,1).
Subtracting (21.17) from (21.16),
2y−2z=μx(z−y)μx(z−y)+2(z−y)=0(z−y)(μx+2)=0z=y,x=−2μ
Putting these values in (21.18),
2y−2μ=1(21.24)
and (21.19),
−2y2μ+1=0(21.25)
Solving (21.24) and (21.25),
y2(1−2y)+1=02y3−y2−1=0y=1,−14−√7i4,−14+√7i4
Taking y=1, x=−1,z=1. The extreme point is thus (−1,1,1).
Thus there are three extreme points:
- (1,1,−1)
- (1,−1,1)
- (−1,1,1)
The function has the value 3 at each of these points. The extreme value is thus 3.
Question 7
If the sum of three positive numbers is the cube of 2, what is the maximum value of their product.
Let x,y,z be three positive numbers. And we are given x+y+z=8. We have to maximise the product f=xyz. Eliminating z in f, we get
f=xy(8−x−y)=8xy−x2y−xy2fx=8y−2xy−y2fy=8x−x2−2xyfxx=−2yfyy=−2xfxy=8−2x−2yfyx=8−2x−2y
For extreme values,
fx=08y−2xy−y2=0(21.26)
fy=08x−x2−2xy=0(21.27)
Solving (21.26) and (21.27), we get
x=yx=8−y
When x=y,
y=0y=83
When x=8−y,
y=0y=8
Thus there are four extreme points (0,0),(83,83),(8,0) and (0,8).
At (0,0),
fxx=0fyy=0fxy=fyx=8∣∣∣fxxfxyfyxfyy∣∣∣=∣∣∣0880∣∣∣=−82<0
At (8,0),
fxx=0fyy=−2×8=−16fxy=fyx=−8∣∣∣fxxfxyfyxfyy∣∣∣=∣∣∣0−8−8−16∣∣∣=−82<0
At (0,8),
fxx=−2×8=−16<0fyy=0fxy=fyx=−8∣∣∣fxxfxyfyxfyy∣∣∣=∣∣∣−16−8−80∣∣∣=−82<0
At points (0,0),(8,0),(0,8), there is neither maximum nor minimum.
At (83,83),
fxx=−163fyy=−163fxy=fyx=−83∣∣∣fxxfxyfyxfyy∣∣∣=∣∣
∣∣−163−83−83−163∣∣
∣∣=823>0
Thus there is maximum at (83,83). Plugging in these values into x+y+z=8, we get z=83.
Thus at maximum, x=y=z=83 and maximum value is 83×83×83=51227.
Question 8
If the sum of the dimensions of a rectangular swimming pool is given, prove that the amount of water in the pool is maximum when it is a cube.
Let the dimensions of the swimming pool be x, y and z. Then the amount of water in the pool will be V=xyz where V= volume of water.
But what we are given is the sum of the dimensions of the pool i.e. x+y+z=a. Within this constraint we have to maximise the amount of water i.e. volume V.
In short, maximise V=xyz given x+y+z=a. Eliminating z in V, we get
V=xy(a−x−y)=axy−x2y−xy2Vx=ay−2xy−y2Vy=ax−x2−2xyVxx=−2yVyy=−2xVxy=a−2x−2yVyx=a−2x−2y
For extreme values,
Vx=0ay−2xy−y2=0(21.28)
Vy=0ax−x2−2xy=0(21.29)
Solving (21.28) and (21.29), we get
x=yx=a−y
When x=y,
y=0y=a3
When x=a−y,
y=0y=a
Thus there are four extreme points (0,0),(a3,a3),(a,0) and (0,a).
At (0,0),
Vxx=0Vyy=0Vxy=Vyx=a∣∣∣VxxVxyVyxVyy∣∣∣=∣∣∣0aa0∣∣∣=−a2<0
At (a,0),
Vxx=0Vyy=−2aVxy=Vyx=−a∣∣∣VxxVxyVyxVyy∣∣∣=∣∣∣0−a−a−2a∣∣∣=−a2<0
At (0,a),
Vxx=−2a<0Vyy=0Vxy=Vyx=−a∣∣∣VxxVxyVyxVyy∣∣∣=∣∣∣−2a−a−a0∣∣∣=−a2<0
At points (0,0),(a,0),(0,a), there is neither maximum nor minimum.
At (a3,a3),
Vxx=−2a3Vyy=−2a3Vxy=Vyx=−a3∣∣∣VxxVxyVyxVyy∣∣∣=∣∣
∣∣−2a3−a3−a3−2a3∣∣
∣∣=a23>0
Thus there is maximum at (a3,a3). Plugging in these values into x+y+z=a, we get z=a3.
Thus at maximum, x=y=z=a3 which is indeed a cube.
Question 9
Find a point within a triangle such that the sum of the squares of its distances from the three angular points is minimum.
Let the vertices of the triangle be (x1,y1),(x2,y2) and (x3,y3) and the point inside triangle be (x,y).
Let d be the sum of the squares of the distances of (x,y) from three angular points (vertices).
d=[(x−x1)2+(y−y1)2]+[(x−x2)2+(y−y2)2]+[(x−x3)2+(y−y3)2]
What we have to do is minimize the d.
dx=2(x−x1)+2(x−x2)+2(x−x3)dy=2(y−y1)+2(y−y2)+2(y−y3)
For extreme values,
dx=02(x−x1)+2(x−x2)+2(x−x3)=0x=x1+x2+x33
and
dy=02(y−y1)+2(y−y2)+2(y−y3)=0y=y1+y2+y33
Thus d has extreme value at (x1+x2+x33,y1+y2+y33).
Now calculating partial second derivatives,
dxx=6dxy=0dyy=6dyx=0
Thus dxx=6>0 and
∣∣∣dxxdxydyxdyy∣∣∣=∣∣∣6006∣∣∣=36>0
Thus d is minimum at (x1+x2+x33,y1+y2+y33). Hence, a point within a triangle such that the sum of the squares of its distances from the three angular points is minimum is (x1+x2+x33,y1+y2+y33).