Escolar Documentos
Profissional Documentos
Cultura Documentos
Optimization
1
• In formulating an optimization problem, the
first order of business is to delineate an
objective function in which the dependent
variable represents the object of maximization
or minimization.
• The independent variables are referred to as
choice variables (decision variables or policy
variables).
• The essence of the optimization process is
simply to find the set of values of the choice
variables that will yield the desired extremum
of the objective function.
3
2
y y y
E
B C
A
D
F
x x x
O Fig. 1.a O Fig. 1.b O Fig. 1.c
3
• Most problems in business are concerned with
extreme values other than end-point values, for
with most such problems the domain of the
objective function is restricted to be the set of
nonnegative numbers, and thus an end point (on
the left) will represent the zero level of the choice
variable, which is often of no practical interest.
• An absolute maximum must be either a relative
maximum or one of the end points of the
function.
• If we know all the relative maxima, it is necessary
only to select the largest of these and compare it
with the end points in order to determine the
absolute maximum (same procedure for absolute
minimum also). 7
4
• We have assumed that y = f(x) is continuous
and possesses a continuous derivative (we are in
effect ruling out sharp points).
• For smooth functions, relative extreme values
can occur only where the first derivative has a
zero value.
• Points C and D in Fig. b represent extreme
values, and both of which are characterized by a
zero slope - f1(x1) = 0 and f1(x2) = 0.
• In the context of smooth functions, the condition
f1(x) = 0 is taken as necessary condition for a
relative extremum (either maximum or
minimum). 9
y y
D
(+) (-)
A
(-) (+)
C
y = f(x)
B
O x x
O x1 x2
Fig. 2.a Fig. 2.b
10
5
First-derivative test for relative extremum:
• If the first derivative of a function f(x) at x = x0
is f1(x0) = 0, then the value of the function at
x0, f(x0), will be
a. A relative maximum if the derivative f1(x)
changes its sign from positive to negative
from the immediate left of the point x0 to its
immediate right.
b. A relative minimum if f1(x) changes its sign
from negative to positive from the immediate
left of x0 to its immediate right.
11
6
• If the necessary condition f1(x) = 0 is satisfied,
then the change-of-derivative-sign proviso can
serve as a sufficient condition for a relative
maximum or minimum, depending on the
direction of the sign change.
• In Fig. 3.a, the function f is shown to attain a zero
slope at point J (when x = j). Even though f1(j) is
zero – which makes f(j) a stationary value – the
derivative does not change its sign from one side
of x = j to the other; therefore, point J gives
neither a maximum nor a minimum. It exemplifies
what is known as an inflection point.
13
7
y y
y = f(x) y = g(x)
J K
x x
O j O
(a) k (b)
dy/dx dy/dx
K1
dy/dx = f1(x)
dy/dx=g1(
x)
J1 x
O x O
(a1) (b1)
Fig. 3
15
8
• A relative extremum must be a stationary
value, but a stationary value may be
associated with either a relative extremum or
an inflection point.
Example 1:
Find the relative extrema of the function
y = f(x) = x3 – 12x2 + 36x + 8
First, we find the derivative function to be
f’(x) = 3x2 - 24x + 36
17
of roots (solutions):
x1 = 2 [at which we have f’(2) = 0 and f(2) = 40]
X2 = 6 [at which we have f’(6) = 0 and f(6) = 8
Since f’(2) = f’(6) = 0, these two values of x are the
critical values we desire. 18
9
It is found from the above that f’(x) > 0 for x <
2, and f’(x) < 0 for x > 2, in the immediate
neighborhood of x = 2; thus, the corresponding
value of the function f(2) = 40 is established as a
relative maximum.
Further, since f’(x) < 0 for x < 6, and f’(x) > 0
for x > 6, in the immediate neighborhood of x =
6, the value of the function f(6) = 8 must be a
relative minimum.
19
Example 2:
Find the relative extremum of the average-cost
function
AC = f(Q) = Q2 – 5Q + 8
• The derivative here is f1(Q) = 2Q – 5, a linear
function.
• Setting f1(Q) equal to 0, we get the linear
equation 2Q – 5 = 0, which has the single root
Q = 2.5.
• This is the only critical value in the present
case. 20
10
• To apply the first-derivative test, let us find the
values of the derivative at, say, Q = 2.4 and Q
= 2.6, respectively.
• Since f1(2.4) = -0.2 < 0 whereas f1(2.6) =
0.2 > 0, we can conclude that the stationary
value AC = f(2.5) = 1.75 represents a relative
minimum.
• The graph of the function is a U-shaped curve,
so that, the relative minimum found will be the
absolute minimum.
21
Class Assignments:
1. Optimize the following functions:
(a) y = 2x2 + 16x
(b) y = 5x2 + 5x – 6
(c) y = 3x2 + 14
(d) y = -2x2 + 16x
2. A firm knows that the relationship between its weekly
sales Q and weekly profit PR is expressed by the
following function:
PR = - 0.002Q2 + 10Q – 4000
The firm wants to determine the profit-maximizing
level of weekly sales of the firm. Find the profit-
maximizing level of weekly sales of the firm. 22
11
Second-derivative test for relative extremum:
• If the first derivative of a function f at x = x0 is
f1(x0) = 0, then the value of the function at x0,
f(x0), will be
a. A relative maximum if the second-derivative
value at x0 is f11(x0) < 0.
b. A relative minimum if the second-derivative
value at x0 is f11(x0) > 0.
• The drawback of this test is that no unequivocal
conclusion can be drawn in the event that f11(x0)
= 0.
23
24
12
Example 1:
Find the relative extrema of the function
y = g(x) = x3 – 3x2 + 2
The first and second derivatives are
f1(x) = 8x – 1 and f11(x) = 8
• Setting f1(x) equal to zero and solving the
resulting equation, we find the (only) critical value
to be x = 1/8, which yields the (only) stationary
value f(1/8) = - 1/16.
• Because the second derivative is positive, the
extremum is established as a minimum.
25
13
g(0) = 2 [a maximum because g11(0) = -6 < 0]
g(2) = -2 [a minimum because g11(2) = 6 > 0]
Example 3:
Let the R(Q) and C(Q) functions be
R(Q) = 1200Q – 2Q2
C(Q) = Q3 – 61.25Q2 + 1528.5Q + 2000
Then the profit function is
π(Q) = - Q3 + 59.25Q2 – 328.5Q – 2000
Where R, C, and π are all in dollar units and Q is
in units (say) tons per week. 27
14
• As an alternative approach to the above, we can
first find the MR and MC functions and equate the
two, i.e., find their intersection. Since
R1(Q) = 1200 – 4Q
C1(Q) = 3Q2 – 122.5Q + 1528.5
equating the two functions will result in a
quadratic equation identical with dπ/dQ = 0 which
has yielded the two critical values of Q.
29
Class Assignment:
1. Find the relative maxima and minima of y by the
second-derivative test:
a. y = -2x2 + 8x + 25
b. y = x3 + 6x2 + 7
2. A firm has the following total-cost and demand
functions:
C = (1/3)Q3 – 7Q2 + 111Q + 50
Q = 100 – P
Find the maximum profit and profit-maximizing
level of output Q. 30
15
Optimization of Functions of Several Variables:
1.To optimize a function of the form Z = f(x, y), four
steps are involved:
Step I:
• To differentiate the function partially with respect
to x and y and set these partial derivatives equal
to zero (first-order condition). Mathematically,
fx = 0 ..........(1) and fy = 0……….(2)
Step II:
• To solve for the critical values x0 and y0, a
solution obtained by equation (1) and (2)
simultaneously. 31
Step III:
• To take the direct and cross partial derivatives for
equations (1) and (2) with respect to x and y (the
second-order conditions) so as to form the
Hessian determinant, which is mentioned below:
fxx fxy
|H| =
fyx fyy
Step IV:
• To find the value of |H| = fxxfyy – fxyfyx.
• If fxx > 0 and |H| > 0, the function has a
minimum value at the critical points. 32
16
• If fxx < 0 and |H| > 0, the function has a
maximum value at the critical points; otherwise
the test fails, and the function may have an
inflection or saddle point.
2. To optimize the function of three variables such as
Z = f(x, y, w), the same procedure is followed.
• Obtain the first-order conditions for the function
as follows:
fx = 0........(1), fy = 0……..(2) and fw = 0……..(3)
• Solve (1), (2) and (3) for the critical points x0, y0
and w0.
33
fxx fxy
• If fxx < 0, > 0, and |H| < 0,
fyx fyy
the function has a maximum value at the
critical points. 34
17
• If the above determinants, whatever the number
of variables may be, alternate the signs from
negative, positive, negative, positive and so on,
the function has a maximum value at the critical
points.
fxx fxy
• If fxx > 0, > 0, and |H| > 0,
fyx fyy
the function has a minimum value at the critical
points.
• If the above determinants, whatever the number
of variables may be, are positive, the function has
a minimum value at the critical points.
35
Principal Minors:
• In the Hessian determinant
fxx fxy fxw
fyx fyy fyw
fwx fwy fww
the respective first, second and third principal minors are:
fxx fxy fxx fxy fxw
|H1| = fxx, |H2| =
fyx fyy |H3| = fyx fyy fyw
fwx fwy fww
36
18
Example 1:
Find the extreme value(s) of
z = 2x12 + x1x2 + 4x22 + x1x3 + x32 + 2
The first-order condition for extremum involves the
simultaneous of the following three equations:
(f1 =) 4x1 + x2 + x3 = 0
(f2 =) x1 + 8x2 =0
(f3 =) x1 + 2x3 = 0
Because this is a homogeneous linear-equation
system, in which all the three equations are
independent (the determinant of the coefficient 37
19
Example 2:
Suppose a producer faces two demand curves for
two commodities (a) and (b) she produces of the
form
Pa = 120 – 3Qa – 2Qb
Pb = 150 – Qa – 4Qb
The total cost of producing the two commodities (a)
and (b) is
TC = Qa2 + 3QaQb + 3Qb2 + 60
Find the levels of Qa and Qb that maximize the total
profits (Z = TP).
39
Solution:
As TP = TR – TC and TR = PaQa + PbQb, therefore,
Z = TP = PaQa + PbQb – TC
Using the demand equations and the total cost equation
yields
Z = TP = (120 – 3Qa – 2Qb)Qa + (150 – Qa – 4Qb)Qb –
Qa2 – 3QaQb – 3Qb2 – 60
Thus, Z = TP = 120Qa – 4Qa2 – 6QaQb + 150Qb – 7Qb2 –
60
The first-order conditions are
Zqa = 120 – 8Qa – 6Qb = 0
Zqb = 150 – 6Qa – 14Qb = 0 40
20
Solving these two equations yields Qa = 390/38 and
Qb = 240/38
The second-order condition are
Zqaqa = - 8, Zqaqb = - 6
Zqbqa = - 6, Zqbqb = - 14
and the Hessian determinant is
-8 -6
|H| = = 112 – 36 = 76
-6 -14
Because Zqaqa is positive and |H| is positive, the
function has the maximum value at the critical
points.
41
Class Assignment:
1. Optimize the following functions:
(a) Z = 8x2 – 6x – 4xy – 3y + 5y2
(b) Z = -3x2 + 7x + xw – 2y2 + 4y +2yw – 4w2
2. A firm produces two commodities Q1 and Q2. The
revenue functions are R1 = 60Q1 – 3Q12 and R2 =
40Q2 – 2Q22 and the cost function is C = 2Q1Q2.
Find the best level of Q1 and Q2 that maximizes
profit.
42
21