0% found this document useful (0 votes)
7 views

Tutorial 3 Sol

Uploaded by

donndonn95
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Tutorial 3 Sol

Uploaded by

donndonn95
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

MH1803: Calculus for Physics - Tutorial 3

1. A wire is bent to fit the curve y = 1 − x2 . A string is stretched from


the origin to a point (x, y) on the curve. Find (x, y) to minimize the
length of the string. In this case, we want to minimize the distance
p
x2 + y 2 , which is equivalent to minimizing f = x2 + y 2 (why?). We
will solve this optimization with constraint problem using three different
approach. Through this instructive problem, I hope you can see why
the method of Lagrange multipliers is an extremely powerful method to
solve this class of problems.

(a) Elimination: Substitute y = 1 − x2 into f and find the stationary


points of the resulting function of one variable. State the nature of
each stationary point.
(b) Implicit differentiation: How is dy related to dx (hint: use the
constraint)? Derive the total differential and show that you get
df dy
= 2x + 2y . (1)
dx dx
Substitute dy in Eq. (1) and show that we need to solve
df
= 2x − 4xy = 0.
dx
Hence find the stationary points. Differentiate Eq. (1) to determine
the nature of the stationary points.
(c) Finally, use the method of Lagrange multipliers to find the sta-
tionary points.

Solution:

1
a) We begin by substituting y = 1 − x2 into f (x, y) = x2 + y 2 :

f (x, y = 1 − x2 ) = x2 + (1 − x2 )2
= x2 + 1 − 2x2 + x4
= x4 − x2 + 1

Finding stationary points of a function requires setting df /dx = 0:


df
= 4x3 − 2x = 0
dx
Solving for x:
r
1
x = 0 or x = ±
2
Categorising x as minimum or maximum requires the second derivative:

d2 f
= (12x2 − 2x)
dx2 x=(0,±1/2) x=(0,±1/2)

−2 for x = 0 (relative maximum)
=
4 for x = ±p1/2 (minimum)

p
The minimum we wanted then occurs at x = ± 1/2, where y = 1/2.

b) We begin by writing down the total differential for f (x, y) = x2 + y 2 :

df = 2xdx + 2ydy (2)

We now write down the total differential for y = 1 − x2 :

dy = −2xdx

2
Eliminating dy from df :

df = (2x − 4xy)dx
Similar to part (a), we minimise f by setting df /dx = 0 and eliminating
y using the equation of the curve y = 1 − x2 :
df
= 2x − 4xy = 0
dx
⇒2x − 4x(1 − x2 ) = 0
p
We solve for x and find x = 0 or x = ± 1/2. Categorising x as minimum
or maximum requires the second derivative. We apply d/dx to both sides
of (2):
 2
d2 f dy d2 y
= 2 + 2 + 2y
dx2 dx dx2
At x = 0, we find:

y = 1,
dy
= 0,
dx
d2 y
= −2
dx2
d2 f
⇒ 2 = 2 − 4 = −2
dx
p
which is a maximum point. For x = ± 1/2:
1
y=
2
dy √
=∓ 2
dx
d2 y
= −2
dx2
d2 f
⇒ 2 =2+4−2=4
dx

3
which is a minimum point.

c) Using the method of Lagrange multipliers, we identify the function


we wish to minimise f (x, y) = x2 + y 2 and its related constraint function
g(x, y) = y + x2 − 1 = 0. The Lagrange multipler method requires us to
solve:

∇(f (x, y) + λg(x, y)) = 0

Where ∇ = (∂/∂x + ∂/∂y). Bringing in the gradient operator, we have:

2x + λ2x = 0
2y + λ = 0

We solve the above equations simulataneously with g(x, y) = y +x2 −1 =


0 for λ. We find 2 values of λ:

λ = −1 or λ = −2
p
For λ = −1, we find x = ± 1/2 and y = 1/2. Substituing these values
of (x, y) into f (x, y):

1 1 3
f (x, y) = + =
λ=−1 2 4 4

For λ = −2, we find x = 0 and y = 1. Substituting these values of (x, y)


into f (x, y):

f (x, y) = 02 + 12 = 1
λ=−2

4
Since f (x, y)|λ=−1 < f (x, y)|λ=−2 , minimising f (x, y) would require (x, y) =
p
± 1/2, y = 1/2.

As expected, all three methods give the same answers for (x, y) to min-
imise the function f = x2 + y 2 with the same constraint.

2. Find the volume of the largest rectangular parallelepiped (that is, box),
with edges parallel to the axes, inscribed in the ellipsoid
x2 y 2 z 2
+ + = 1.
a2 b2 c2
Solution
Recall the use of Lagrange multiplier in maximizing a function f (x, y, z)
subject to constraint g(x, y, z) = 0. The Lagrange function is

L (x, y, z, λ) = f (x, y, z) + λg(x, y, z)

where λ is the Lagrange multiplier.


To locate the extrema of f (x, y, z) we have

∇L (x, y, z, λ) = ∇f (x, y, z) + λ∇g(x, y, z) = 0

x2 y2 z2
Here, we observe that the constraint a2 + b2 + c2 = 1 is an ellipsoid
centred at (0, 0, 0). Hence the vertices of the rectangular parallelepiped
(with edges parallel to the axes) are located at (±x, ±y, ±z), and the
volume is
V (x, y, z) = (2x)(2y)(2z) = 8xyz

We then have the following set of equations:


2λx
yz = − (3)
a2
5
2λy
xz = − (4)
b2
2λz
xy = − 2 (5)
c
x2 y 2 z 2
+ + =1 (6)
a2 b2 c2
from which we could solve for x, y, z and λ.
From equations 1 to 3, we could obtain

a2 y 2 = b2 x2 ; a2 z 2 = c2 x2 ; b2 z 2 = c2 y 2
1 1 1
⇒ x = √ a; y = √ b; z = √ c
3 3 3
This would then give
8abc
Vmax = √
3 3

You might also like