MultivariableCalculusModule II Optimization
MultivariableCalculusModule II Optimization
Contents
1 Introduction 2
5 Project: Elasticity 7
5.1 Maximum Normal Stress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
5.2 Maximum Shear Stress . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
7 Project: Economics 9
7.1 Maximum Production . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1
1 Introduction
In this module we discuss optimization problems, their applications, and methods of solution. Optimization
problems, i.e. problems of finding maxima and minima of functions, are among the most important problems
in mathematics. They have extremely important applications in economics, engineering, and science. We
start with one optimization problem originating in economics, and illustrate the basic ideas employed in
the mathematical methods of solution. At the beginning we use simple reasoning rather than rigorous calculus
language. The more rigorous techniques are gradually introduced later.
These equations reflect a simple observation that when the price of trucks increases then customers buy fewer
trucks and more sedans, and when the price on sedans increases they buy more trucks and fewer sedans.
Assuming that the dealership sells t trucks at a price of x dollars per truck and s sedans at a price of y dollars
per sedan the revenue of the dealership would be
In this model the revenue R is a function of two variables x and y. Simplifying the left hand side term in (3)
we see that the revenue can be expressed in terms of the following quadratic function of two independent variables
x and y:
R(x, y) = −2x2 − 3y 2 + 4xy + 10, 000x + 16, 000y. (4)
Now we can state our task of finding prices that maximize the revenue as a mathematical problem:
Optimization problem. Find values of x and y such that R(x, y) achieves its maximal value.
Later we will see how calculus solves this problem. Now we try to solve it using simple reasoning only. As we
always do in mathematics let us denote the unknown solution of this problem by x0 , y0 and try to find equations
for them. That is, let us assume that R(x, y) achieves its maximal value at some point (x0 , y0 ).
Our solution is based on the following simple idea: though both x and y are variables and their values change,
it does not mean that they have to change simultaneously. First let us keep the price of sedans constant
and equal to y0 , that is y = y0 , and change only the price of trucks. Since y = y0 is fixed, the revenue is a function
of only x. Let us denote this function by
g(x) = R(x, y0 ) = −2x2 − 3y02 + 4xy0 + 10, 000x + 16, 000y0 . (5)
Now let us find the price x0 that maximizes the function of one variable g(x) using the method from Calculus I
that treats optimization problems for single variable functions. We know that the maximum is achieved at the
point x0 where the first derivative equals zero:
2
Now let us fix x = x0 and find the value of y for which R(x0 , y) is maximal. After fixing x = x0 in (4) we get a
function of a single variable y:
In order to find the maximal value of h(y) we use the Calculus I again:
Combining equations (6) and (8) we get the following system of two equations:
−4x0 + 4y0 + 10, 000 = 0
(9)
−6y0 + 4x0 + 16, 000 = 0.
This system can be solved by the elimination method. From the first equation 4x0 = 4y0 + 10, 000 or
x0 = y0 + 2, 500. (10)
Therefore,
− 6y0 + 4y0 + 10, 000 + 16, 000 = 0, (12)
and
y0 = 13, 000. (13)
Correspondingly,
x0 = y0 + 2, 500 = 15, 500. (14)
So if the maximum of the function R(x, y) exists, it is achieved at x0 = 15, 500, y0 = 13, 000.
Based on this mathematical model you may suggest the following prices: $15, 500 for a truck and $13, 000 for
a sedan.
Remark. We have solved the problem assuming from the very beginning that the maximum of R(x, y) exists.
For our dealership problem it seems to be a reasonable assumption. Many optimization problems that appear in
applications allow us to make such assumptions.
3
function of one variable y. Rates of change obtained by using this procedure are called partial derivatives to
distinguish them from derivatives of functions of one variable. (Derivatives of functions of one variable are often
called ordinary derivatives.)
So, if there is a function of two variables f (x, y), then two rates of change should be considered: a rate of
change with respect to x and a rate of change with respect to y. In other words, to find a partial derivative with
respect to x assume that y is fixed (constant) and differentiate with respect to x, and to find a partial derivative
with respect to y assume that x is fixed and differentiate with respect to y. The following notations for partial
derivatives are used:
∂f (x, y) ∂f (x, y)
or fx (x, y), or fy (x, y).
∂x ∂y
Finding maxima is like climbing mountains. You are looking for a point where the elevation is maximal. So
it is a point at which the rate of change of elevation changes its sign from positive (when you go up the elevation
increases) to negative (when you go down the elevation decreases). So at a maxima point (the top of the mountain)
all rates of change of elevation should change their sign from positive to negative. Therefore if these rates are
defined they should equal zero at a maxima point.
In other words, if f (x, y) is differentiable and has a maximum at (a, b), then the following necessary conditions
should be satisfied:
fx (a, b) = 0, fy (a, b) = 0. (15)
1. Let us assume that f (x, y) has a maximum at (a, b). Write an equation of the line in xy-plane with slope m
that passes throw the point(a, b).
2. Write the function g(x) that is a restriction of f (x, y) on the line from the Step 1.
6. Use the Chain Rule again to find the second derivative of g(x).
4
8. Use the inequality g 00 (a) < 0 with arbitrary m to derive the following sufficient conditions:
2
fxx (a, b) < 0, fxx fyy − fxy >0 (16)
9. Repeat the Steps 6-8 to find sufficient conditions for having a minimum at (a, b).
10. (Optional) Repeat the Steps 1-9 replacing line L by an arbitrary curve h(x, y) = 0 passing through (a, b).
where $ K is capital stocks (the monetary worth of all machinery, equipment, and buildings), $ L is labor input
(the total number of person-hours worked in a year), $ M is materials and supplies, and C is a given productivity
coefficient.
You may assume that a + b + c = 1. Discuss this assumption from the point of view of economics. (You may
use books or internet resources.)
R = pCK a Lb M c ,
f (L, M ) = pCK a Lb M c − L − M.
Here we assume that the capital stocks K is fixed but you can control the labor cost L and materials and supplies
cost M .
Your goal is to choose L and M that maximize the profit.
Justification
After you presented your budget to maximize the profit some members of the board of directors were not convinced.
They asked you to justify your decisions and to prove that the proposed budget will give the maximal profit. Use
the second derivative test to justify your decision.
5
References
Include all sources you used. For example:
1. C.W. Cobb and P.H.Douglas, A theory of production. American Economic Review 18(1):139165. Supplement,
Papers and Proceedings of the Fortieth Annual Meeting of the American Economic Association, 1928.
g(x, y, z) = x2 + y 2 − z − 1 = 0. (18)
The solution of this problem may not be (and in general is not) a critical point of f (x, y, z). So the methods of
the previous section are not applicable here.
However, this problem can be immediately reduced to a problem of unconstrained optimization if one solves
equation (18) with respect to z:
z = x2 + y 2 − 1
and then substitutes it into the function f to obtain the following unconstrained optimization problem:
The resulting problem can be easily solved by setting the first partial derivatives hx and hy equal zero.
In Example 2 a successful reduction to a problem without constraint was possible only because one was able
to solve equation (18) with respect to z. However, in the many important problems of constrained optimization
the equation representing the constrain cannot be explicitely solved with respect to x, y, or z.
The brilliant idea of Lagrange was that the constrained optimization problem
f (x, y, z) → extremum
(19)
g(x, y, z) = 0
The solutions of this problem are among the critical points of function g(x, y). Therefore we are looking for
solutions of the following system of equations:
(
∂h(x,y)
∂x =0
∂h(x,y) (20)
∂y = 0.
∂z gx (x, y, z) ∂z gy (x, y, z)
=− , =− .
∂x gz (x, y, z) ∂y gz (x, y, z)
6
The next step is to find the derivatives hx (x, y) and hy (x, y) by applying the Chain Rule to h(x, y) = f (x, y, z(x, y)):
∂h ∂f ∂f ∂z ∂f ∂f gx (x, y, z)
= + = − ,
∂x ∂x ∂z ∂x ∂x ∂z gz (x, y, z)
∂h ∂f ∂f ∂z ∂f ∂f gy (x, y, z)
= + = − .
∂y ∂y ∂z ∂y ∂y ∂z gz (x, y, z)
Substituting these expressions into equations (20) we obtain
∂f gx (x,y,z)
( ∂f
∂x − ∂z gz (x,y,z) = 0,
∂f ∂f gy (x,y,z)
∂y − ∂z gz (x,y,z) = 0.
Thus, if the point (x0 , y0 ) is a solution of the system (20) and z0 = z(x0 , y0 ), then
gx (x0 ,y0 ,z0 )
( ∂f ∂f
∂x (x0 , y0 , z0 ) − ∂z (x0 , y0 , z0 ) gz (x0 ,y0 ,z0 ) = 0,
∂f ∂f gy (x0 ,y0 ,z0 ) (21)
∂y (x0 , y0 , z0 ) − ∂z (x0 , y0 , z0 ) gz (x0 ,y0 ,z0 ) = 0.
Denote
fz (x0 , y0 , z0 )
λ= , (22)
gz (x0 , y0 , z0 )
then equations (21) imply
fx (x0 , y0 , z0 ) − λgx (x0 , y0 , z0 ) = 0,
(23)
fy (x0 , y0 , z0 ) − λgy (x0 , y0 , z0 ) = 0.
Combining these equations with the equation (22) we get
Therefore, if the point (x0 , y0 , z0 ) is a solution to the problem (19), then there exists a number λ such that
(x0 , y0 , z0 , λ) is a solution to the system of equations:
∇f (x, y, z) = λ∇g(x, y, z),
(25)
g(x, y, z) = 0.
that is called the Lagrange function. It is easy to see that if one sets the first partial derivatives of the Lagrange
fuction Lx , Ly , Lz , and Lλ equal zero, one obtains the system (25).
Thus, we can claim that the solutions to the constrained optimization problem (19) are among the critical
points of the function L defined in (27).
5 Project: Elasticity
Definitions
For this project you will need some basic definitions from the Theory of elasticity. You can use books or internet
resources such as Wikipedia.
In the first section of your project define and explain the concepts of Strain, Stress, Normal Stress, Shear
Stress, Maximum Shear Stress Plane, Maximum Shear Stress Angle.
7
5.1 Maximum Normal Stress
In stress analysis problems, one is interested in finding the maximum and minimum normal stresses, and the
maximum shearing stress at a point. Explain why it is important.
In the following discussion, the point x in the present configuration is kept fixed.
At the point x in the present configuration of the body, consider a plane whose outer unit normal is n =<
n1 , n2 , n3 >. The stress vector on this plane is given by equation
T =< σ11 n1 + σ12 n2 + σ13 n3 , σ21 n1 + σ22 n2 + σ23 n3 , σ31 n1 + σ32 n2 + σ33 n3 >,
where
σ11 σ12 σ13
σ = σ21 σ22 σ23
σ31 σ32 σ33
is a stress tensor. The stress tensor can be reduced to a symmetrical form. So you may assume that
σ21 = σ12 , σ31 = σ13 , σ32 = σ23 .
The normal stress on this plane is given by
Tnormal = compn T = T · n.
Thus the problem of finding the maximum or the minimum normal stress at the point x reduces to finding
the unit vector n for which σnormal is maximum or minimum. So you are looking for a solution to the following
constrained optimization problem:
Tnormal (n1 , n2 , n3 ) → extremum,
n21 + n22 + n23 = 1.
Use Lagrange Multipliers method to solve this problem.
References
Include all sources you used. For example:
1. S. Timoshenko and J.N. Goodier, Theory of Elasticity, McGRAW–HILL BOOK COMPANY, Inc. 1951.
8
1. The equation g(x, y) = 0 defines an implicit function y = y(x). Using implicit differentiation find y 0 (x) and
y 00 (x).
2. Introduce a function h(x) = f (x, y(x)). Show that if the point (a, b) is a solution to problem (27), then the
point a is a relative extremum point for h(x).
4. Substitute the expressions for y 0 (x) and y 00 (x) into the expressions for h0 (x) and h00 (x).
5. Show that the necessary condition h0 (a) = 0 implies that there exists a number λ such that
6. Introduce the Lagrange function L(x, y, λ) = f (x, y) − λg(x, y) and show that
∇L(a, b, λ) = 0.
7. Substitute f (x, y) = L(x, y, λ) + λg(x, y) into the expression for h00 (x).
8. Apply the sufficient condition for relative minimum h00 (a) > 0 to derive sufficient condition for a minimum
in problem (27).
9. Apply the sufficient conditions for relative maximum h00 (a) < 0 to derive sufficient conditions for a maximum
in problem (27).
10. Express the sufficient conditions from steps 8 and 9 in terms of the following determinant:
0 gx (a, b) gy (a, b)
gx (a, b) Lxx (a, b, λ) Lxy (a, b, λ)
gy (a, b) Lxy (a, b, λ) Lyy (a, b, λ)
11. (Optional) Find sufficient conditions for a relative extremum in an optimization problem with one constraint:
f (x, y, z) → extremum
(28)
g(x, y, z) = 0.
7 Project: Economics
Definitions
In this project you will need some basic definitions from economics. You can use books or internet resources such
as Wikipedia.
In the first section of your project define and explain the Cobb-Douglas production function.
P = CLα M β T γ ,
where $ L is labor input (the total number of person-hours worked in a year), $ M is materials and supplies, $ T is
the transportation cost, and C is a given productivity coefficient. All these expenses you should cover from your
fixed budget $ B.
Use the Lagrange multipliers method to maximize the production of your plant by dividing your budget B
between L, M , and T .
9
Justification
After you presented your budget to maximize the production some members of the board of directors were not
convinced. They asked you to justify your decisions and to prove that the proposed budget will give the maximal
production. Use the second derivative test to justify your decision.
References
Include all sources you used. For example:
1. C.W. Cobb and P.H.Douglas, A theory of production. American Economic Review 18(1):139165. Supplement,
Papers and Proceedings of the Fortieth Annual Meeting of the American Economic Association, 1928.
and the load current Io . Using Ohms Law, we relate it to the load resistance
V2
Vo
PL = Vo Io = Vo = o . (29)
RL RL
However, Vo still depends on RL , which is the variable we will use to optimize PL . After applying more circuit
analysis, we obtain
VOC RL
PL = . (30)
(RT h + RL )2
10
Our objective is:
A typical plot of PL versus RL is shown in Figure 2. At some specific value of RL, the load power reaches a
maximum. To find this value, we can use the Calculus I approach of differentiating PL with respect to RL :
dPL 2 − 2V 2 (R
(RT h + RL )2 VOC OC T h + RL )
2 (R
VOC T h − RL )
= 4
= (31)
dRL (RT h + RL ) (RT h + RL )3
dPL
We see that = 0 precisely when
dRL
RL = RT h ,
which is a classical result of power transfer for a DC circuit.
8.2 AC Circuits
When we move to sinusoidal AC circuits, we run into a similar scenario with maximum power transfer. However,
there are some key differences:
• Instead of dealing with pure resistance for the parasitic loss and load, we will work with impedance,
which is the sum of resistance R and reactance X.
• Rather than maximizing the real output power PRL across the load resistance, we wish to maximize the
complex output power SRL . Ultimately, this result will be real, and represents the average power on the
resistor as before.
• The battery analogy no longer applies, since the voltage is now AC.
The AC-equivalent circuit diagram is shown above. After a bit of complex circuit analysis, we find the complex
power expression
1 2
2 RL VOC
SRL = , (32)
(RT h + RL )2 + (XT h + XL )2
where VOC is now the magnitude of the AC open-circuit voltage, RT h and XT h are the parasitic resistance and
reactance of the source, and RL and XL are the resistance and reactance of the load attached to the battery. We
11
would like to maximize SRL in terms of both RL and XL , which we see is now a two-dimensional optimization
problem. Thus, we will compute both partial derivatives, and set them to zero, obtaining
!
(RT h + RL )2 + (XT h + XL )2 − 2RL (RT h + RL )
2
VOC
∂SRL
=
∂RL 2 [(RT h + RL )2 + (XT h + XL )2 ]2
V2 RT2 h − RL2 + (X 2
T h + XL )
= OC = 0,
2 [(RT h + RL )2 + (XT h + XL )2 ]2
2
∂SRL VOC −2RL (XT h + XL )
= = 0.
∂XL 2 [(RT h + RL )2 + (XT h + XL )2 ]2
RT2 h − RL
2
+ (XT h + XL )2 = 0, −2RL (XT h + XL ) = 0.
We are only interested in physical solutions, which will exclude RL = 0. Thus, there is only one solution
XL = −XT h , RL = RT h ,
which is a commonly stated result for maximum power transfer in an AC circuit: the load impedance must be
equal to the complex conjugate of the parasitic impedance to maximize the load resistor output power.
12
where Vant and Rant are antenna voltage and parasitic resistance, respectively. The parameters L and C are
the inductance (in Henrys) and capacitance (in Farads) of the bandpass filter (selected by the user). The voltage
Vf ilt is the resulting filtered antenna voltage, containing only the signal information at a specific radio channel.
The ratio of filtered output voltage to the antenna input voltage can be described in terms of frequency by the
transfer function
1
Vf ilt S RC
H(s) = = 2 1
1 . (33)
Vant S + S RC + LC
This is a special case of a more general bandpass filter transfer function
SH0
HBP (s) = , (34)
S 2 + S ωQ0 + ω02
where H0 is the passband gain, Q is the quality factor and ω0 is the resonant frequency. The quality factor
describes the selectivity of the filter, and is defined using high and low cutoff frequencies, as
ω0
Q= .
ωH − ωL
By comparing equations (33) and (34), we see that selecting the values of R, C, and L, is equivalent to designing
a filter to pass only a specific range of desired frequencies coming in from the antenna, and removing everything
else.
BW = ωH − ωL .
The exact component values needed to meet the frequency and bandwidth criteria are L = 22.491nH and C = 5nF .
However, we cannot purchase components with exactly these values. Instead, we must pick components with
standard manufactured values. Furthermore, these components are not guaranteed to have the values specified on
their nameplate. Manufacturers will indicate a tolerance on the components value. Tolerances of 10%, 5%, or 1%
are typical.
We can examine the change in frequency or bandwidth by examining the total differential of the frequency
or bandwidth expression, caused by the errors in the parameter values (due to the manufacturing uncertainties). If
we know the maximum size of the error in each parameter (given by the tolerances), we can see which component
is the most critical. The differential of a function of several variables is defined as
∂f ∂f ∂f
δf (x1 , x2 , . . . , xn ) = δx1 + δx2 + . . . δxn .
∂x1 ∂x2 ∂xn
For example, by matching the form of (33) with that of (34), we can see that the bandwidth of the filter is
1
BW =
RC
The differential (the variation) of the bandwidth can be expressed as
1 1
d(BW ) = − 2 δR + − δC.
R C RC 2
Using the method of differentials and the component values given above, determine:
13
• Which component C or L and C or R produces a larger variation in the frequency and in the bandwidth,
respectively. In other words, find which component value affects the two parameters more significantly.
• The amount of frequency variation and bandwidth variation in the filter if the component tolerances are
10%, 5%, and 1%. If the frequency variation must be no greater than 10 kHz and the bandwidth variation
must be no greater than 10 kHz, what are the required tolerances on each of the components?
References
Include all sources youve used for this project. For example:
1. H. Zumbahlen, Analog Devices Inc., Linear Circuit Design Handbook, Elsevier Science, 2008, ISBN:
9780750687034.
14