3 LM 04122020
3 LM 04122020
Optimization
“Take the derivative and set it
equal to zero!”
-Fermat’s
Theorem
Pierre de Fermat
1607- 1665
Pierre de Fermat was actually a lawyer before he was a
mathematician….perhaps he was trying to figure out
how to maximize his legal fees!
f ' x
f x
f x
x x
x x x x
Let’s try one numerically… 2
f x x f x
36 4 slope
slope 8 x
4
x f x x Slope
f x 4 36 8
2
x 2 16 6
1 9 5
36
.5 6.25 4.5
.25 5.0625 4.25
.1 4.41 4.1
x
The slope gets closer and
closer to 4
Or, in general… slope
f x x f x
x
2
x x x2
slope
x
f x
x2
f x x x 2 2 xx x 2 x 2
slope
x
2xx x 2
f x slope
x
x
x slope 2 x
x x
slope 2 x x f ' 2 4
x Let the change in x go
to 0
Some useful derivatives
Exponents
Linear Functions
f ( x) Ax n f ' ( x) nAx n 1
f ( x) Ax f ' ( x) A
Logarithms
A
f ( x) A ln( x) f ' ( x)
x
Example: f ( x) 12 ln x
12
f ' x
x
A necessary condition for a maximum or a minimum is
that the derivative equals zero
f x f x
f ' x 0
OR
f ' x 0
x *
x
x * x
f ' x 0
f ' x 0
x x
x* x*
As x increases, As x
the slope is f '' x 0 increases, the
f '' x 0
decreasing slope is
increasing
PARTIAL DERIVATIVES
To maximize,
a volume function V = xyz subject to
the constraint 2xz + 2yz + xy = 12—which
expressed the side condition that the surface
area was 12 m2.
PARTIAL DERIVATIVES
Joseph-Louis
Lagrange
1736-1813
f x, y g x, y
g x 0
f x g x
f x
x
x*
x 0 The new function is
Therefore, at the maximized
maximum, two thigs g x 0 The new function
have to be true coincides with the
original objective
So, we have our Lagrangian
function….
f x, y g x, y
We need the derivatives with respect o both ‘x’ and ‘y’ to be zero
x f x x, y g x x, y 0
y f y x, y g y x, y 0
0 g x, y 0 g x, y 0
LAGRANGE MULTIPLIERS—TWO VARIABLES
Thus, h’(t0) = 0.
LAGRANGE MULTIPLIERS—THREE VARIABLES
0 h ' t0
f x x0 , y0 , z0 x ' t0 f y x0 , y0 , z0 y ' t0
f z x0 , y0 , z0 z ' t0
f x0 , y0 , z0 r ' t0
LAGRANGE MULTIPLIERS—THREE VARIABLES
Therefore, if g x0 , y0 , z0 0 , there is
a number λ such that:
f x0 , y0 , z0 g x0 , y0 , z0
As in Example, we let
x, y, and z be the length, width, and height,
respectively, of the box in meters.
Vx = λgx
Vy = λgy
Vz = λgz
2xz + 2yz + xy = 12
LAGRANGE’S METHOD
xz = λ(2z + x)
xy = λ(2x + 2y)
2xz + 2yz + xy = 12
LAGRANGE’S METHOD Example 1
From Equations,
we have
2yz + xy = 2xz + 2yz
which gives 2xz = xy.