Kittttttan*s Web

日本語 | English

Calculus

Applications of the Derivative

3.2 Maximum and Minimum Problems

Our goal is to learn about ƒ(x) from dƒ/dx. We begin with two quick questions. If dƒ/dx is positive, what does that say about ƒ? If the slope is negative, how is that reflected in the function? Then the third question is the critical one:

How do you identify a maximum or minimum?   Normal answer:   The slope is zero.

This may be the most important application of calculus, to reach dƒ/dx = 0.

Take the easy questions first. Suppose dƒ/dx is positive for every x between a and b. All tangent lines slope upward. The function ƒ(x) is increasing as x goes from n to b.

3B   If dƒ/dx > 0 then ƒ(x) is increasing. If dƒ/dx < 0 then ƒ(x) is decreasing.

To define increasing and decreasing, look at any two points x < X. "Increasing" requires ƒ(x) < ƒ(X). "Decreasing" requires j(x) > ƒ(X). A positive slope does not mean a positive function. The function itself can be positive or negative.

EXAMPLE 1   ƒ(x) = x² − 2x has slope 2x − 2. This slope is positive when x > 1 and negative when x < 1. The function increases after x = 1 and decreases before x = 1.

Slopes are − +. Slope is + − + − + so ƒ is up-down-up-down-up.
[Fig. 3.3]

We say that without computing ƒ(x) at any point! The parabola in Figure 3.3 goes down to its minimum at x = 1 and up again.

EXAMPLE 2   x² − 2x + 5 has the same slope. Its graph is shifted up by 5, a number that disappears in dfldx. All functions with slope 2x − 2 are parabolas x² − 2x + C, shifted up or down according to C. Some parabolas cross the x axis (those crossings are solutions to ƒ(x) = 0). Other parabolas stay above the axis. The solutions to x² − 2x + 5 = 0 are complex numbers and we don't see them. The special parabola x² − 2x + 1 = (x -1)² grazes the axis at x = 1. It has a "double zero," where ƒ(x) = dƒ/dx = 0.

EXAMPLE 3   Suppose dƒ/dx = (x-1)(x-2)(x-3)(x-4). This slope is positive beyond x = 4 and up to x = 1 (dƒ/dx = 24 at x = 0). And dƒ/dx is positive again between 2 and 3. At x = 1, 2, 3, 4, this slope is zero and ƒ(x) changes direction.

Here ƒ(x) is a fifth-degree polynomial, because ƒ'(x) is fourth-degree. The graph of ƒ goes up-down-up-down-up. It might cross the x axis five times. It must cross at least once (like this one). When complex numbers are allowed, every fifth-degree polynomial has five roots.

You may feel that "positive slope implies increasing function" is obvious-perhaps it is. But there is still something delicate. Starting from dƒ/dx > 0 at every single point, we have to deduce ƒ(X) > ƒ(x) at pairs of points. That is a "local to global" question, to be handled by the Mean Value Theorem. It could also wait for the Fundamental Theorem of Calculus: The diflerence ƒ(X) − ƒ(x) equals the area under the graph of dƒ/dx. That area is positive, so ƒ(X) exceeds ƒ(x).

MAXIMA AND MINIMA

Which x makes ƒ(x) as large as possible? Where is the smallest ƒ(x)? Without calculus we are reduced to computing values of ƒ(x) and comparing. With calculus, the information is in dƒ/dx.

Suppose the maximum or minimum is at a particular point x. It is possible that the graph has a corner-and no derivative. But if dƒ/dx exists, it must be zero. The tangent line is level. The parabolas in Figure 3.3 change from decreasing to increasing. The slope changes from negative to positive. At this crucial point the slope is zero.

3CLocal Maximum or Minimum   Suppose the maximum or minimum occurs at a point x inside an interval where ƒ(x) and dƒ/dx are defined. Then ƒ'(x) = 0.

The word "local" allows the possibility that in other intervals, ƒ(x) goes higher or lower. We only look near x, and we use the definition of dƒ/dx.

Start with ƒ(x + Δx) − ƒ(x). If ƒ(x) is the maximum, this difference is negative or zero. The step Δx can be forward or backward:

if Δ > 0:   ƒ(x + Δx) − ƒ(x) ⁄ Δx = negative ⁄ positive ≤ 0 and in the limit dƒ/dx ≤ 0.
if Δ < 0:   ƒ(x + Δx) − ƒ(x) ⁄ Δx = negative ⁄ positive ≥ 0 and in the limit dƒ/dx ≥ 0.

Both arguments apply. Both conclusions dƒ/dx ≤ 0 and dƒ/dx ≥ 0 are correct. Thus dƒ/dx = 0.

Maybe Richard Feynman said it best. He showed his friends a plastic curve that was made in a special way —"no matter how you turn it, the tangent at the lowest point is horizontal." They checked it out. It was true.

Surely You're Joking, Mr. Feynman! is a good book (but rough on mathematicians).

EXAMPLE 3 (continued)   Look back at Figure 3.3b. The points that stand out are not the "ups" or "downs" but the "turns." Those are stationary points, where dƒ/dx = 0. We see two maxima and two minima. None of them are absolute maxima or minima, because ƒ(x) starts at -∞ and ends at +∞.

EXAMPLE 4   ƒ(x) = 4x³ − 3x⁴ has slope 12x² − 12x³. That derivative is zero when x² equals x³, at the two points x = 0 and x = 1. To decide between minimum and maximum (local or absolute), the first step is to evaluate ƒ(x) at these stationary points. We find ƒ(0) = 0 and ƒ(1) = 1.

Now look at large x. The function goes down to -∞ in both directions. (You can mentally substitute x = 1000 and x = -1000). For large x, -3x⁴ dominates 4x³.

Conclusion   ƒ = 1 is an absolute maximum. ƒ = 0 is not a maximum or minimum (local or absolute). We have to recognize this exceptional possibility, that a curve (or a car) can pause for an instant (ƒ' = 0) and continue in the same direction. The reason is the "double zero" in 12x² − 12x³, from its double factor x².

The graphs of 4x³ -3x⁴ and x + x⁻¹. Check rough points and endpoints.
[Fig. 3.4]

EXAMPLE 5   Define ƒ(x) = x + x⁻¹ for x > 0. Its derivative 1 − 1/x² is zero at x = 1. At that point ƒ(1) = 2 is the minimum value. Every combination like 1/3 + 3 or 2/3 + 2/3 is larger than ƒmin = 2. Figure 3.4 shows that the maximum of x + x⁻¹ is +∞.*

Important   The maximum always occurs at a stationarypoint (where dƒ/dx = 0) or a rough point (no derivative) or an endpoint of the domain. These are the three types of critical points. All maxima and minima occur at critical points! At every other point dƒ/dx > 0 or dƒ/dx < 0. Here is the procedure:

EXAMPLE 6   (Absolute value ƒ(x) = |x|) The minimum is zero at a rough point. The maximum is at an endpoint. There are no stationary points.

The derivative of y = |x| is never zero. Figure 3.4 shows the maximum and minimum on the interval [-3,2]. This is typical of piecewise linear functions.

Question   Could the minimum be zero when the function never reaches ƒ(x) = 0?
Answer   Yes, ƒ(x) = 1/(1+ x)² approaches but never reaches zero as x → ∞.

Remark 1   x + ±∞ and ƒ(x) → ± ∞ are avoided when ƒ is continuous on a closed interval a ≤ x ≤ b. Then ƒ(x) reaches its maximum and its minimum (Extreme Value Theorem). But x → ∞ and ƒ(x) → ∞ are too important to rule out. You test x → ∞ by considering large x. You recognize ƒ(x) → ∞ by going above every finite value.

Remark 2   Note the difference between critical points (specified by x) and critical values (specified by ƒ(x)). The example x + x⁻¹ had the minimum point x = 1 and the minimum value ƒ(1) = 2.

MAXIMUM AND MINIMUM IN APPLICATIONS

To find a maximum or minimum, solve ƒ'(x) = 0. The slope is zero at the top and bottom of the graph. The idea is clear—and then check rough points and endpoints. But to be honest, that is not where the problem starts.

In a real application, the first step (often the hardest) is to choose the unknown and find the function. It is we ourselves who decide on x and ƒ(x). The equation dƒ/dx = 0 comes in the middle of the problem, not at the beginning. I will start on a new example, with a question instead of a function.

EXAMPLE 7   Where should you get onto an expressway for minimum driving time, if the expressway speed is 60 mph and ordinary driving speed is 30 mph?

I know this problem well—it comes up every morning. The Mass Pike goes to MIT and I have to join it somewhere. There is an entrance near Route 128 and another entrance further in. I used to take the second one, now I take the first. Mathematics should decide which is faster—some mornings I think they are maxima.

Most models are simplified, to focus on the key idea. We will allow the expressway to be entered at any point x (Figure 3.5). Instead of two entrances (a discrete problem) we have a continuous choice (a calculus problem). The trip has two parts, at speeds 30 and 60:

a distance √(a² + x²) up to the expressway, in √(a² + x²)/30 hours
a distance b − x on the expressway, in (b − x)/60 hours

Problem   Minimize ƒ(x)= total time = √(a² + x²)/30 + (b − x)/60.

We have the function ƒ(x). Now comes calculus. The first term uses the power rule:
The derivative of u1/2 is ½u-1/2du/dx. Here u = a²+ x² has du/dx = 2x:
ƒ'(x) = (1/30)(1/2)(a²+ x²)-1/2(2x) − 1/60   (1)

To solve ƒ'(x) = 0, multiply by 60 and square both sides:
(a² + x²)-1/2(2x) = 1   gives   2x = (a² + x²)1/2   and   4x²= a²+ x².   (2)

Thus 3x² = a². This yields two candidates, x = a/√3 and x = -a/√3. But a negative x would mean useless driving on the expressway. In fact ƒ' is not zero at x = -a/√3. That false root entered when we squared 2x.

Join the freeway at x-minimize the driving time ƒ(x).
[Fig. 3.5]

I notice something surprising. The stationary point x = a/√3 does not depend on b. The total time includes the constant b/60, which disappeared in dƒ/dx. Somehow b must enter the answer, and this is a warning to go carefully. The minimum might occur at a rough point or an endpoint. Those are the other critical points of ƒ, and our drawing may not be realistic. Certainly we expect x ≤ b, or we are entering the expressway beyond MIT.

Continue with calculus. Compute the driving time ƒ(x) for an entrance at x* = a/√3:
ƒ(x) = (1/30)√a² + (a²/3) + (1/60)(b − a/√3) = √3a/60 + b/60 = ƒ*.

The s uare root of 4a²/3 is 2a/√3. We combined 2/30 − 1/60 = 3/60 and divided by √3. Is this stationary value ƒ* a minimum? You must look also at endpoints:
enter at s = 0: travel time is a⋅30 + b⋅60 = ƒ**
enter at x = b: travel time is √(a² + b²)/30 = ƒ***.

The comparison ƒ* < ƒ** should be automatic. Entering at x = 0 was a candidate and calculus didn't choose it. The derivative is not zero at x = 0. It is not smart to go perpendicular to the expressway.

The second comparison has x = b. We drive directly to MIT at speed 30. This option has to be taken seriously. In fact it is optimal when b is small or a is large.

This choice x = b can arise mathematically in two ways. If all entrances are between 0 and b, then b is an endpoint. If we can enter beyond MIT, then b is a rough point. The graph in Figure 3.5c has a corner at x = b, where the derivative jumps. The reason is that distance on the expressway is the absolute value |b − x| —never negative.

Either way x = b is a critical point. The optimal x is the smaller of a/√3 and b.
if a/√3 ≤ b: stationary point wins, enter at x = a/√3, total time ƒ*
if a/√3 ≥ b: no stationary point, drive directly to MIT, time ƒ***

The heart of this subject is in "word problems." All the calculus is in a few lines, computing ƒ' and solving ƒ'(x) = 0. The formulation took longer. Step 1 usually does:

  1. Express the quantity to be minimized or maximized as a function ƒ(x). The variable x has to be selected.
  2. Compute ƒ'(x), solve ƒ'(x) = 0, check critical points for ƒmin and ƒmax.

A picture of the problem (and the graph of ƒ(x)) makes all the difference.

EXAMPLE 7 (continued)   Choose x as an angle instead of a distance. Figure 3.6 shows the triangle with angle x and side a. The driving distance to the expressway is a sec x. The distance on the expressway is b -a tan x. Dividing by the speeds 30 and 60, the driving time has a nice form:
ƒ(x) = total time = (a sec x) / 30 − (b − a tan x)/60.   (3)

The derivatives of sec x and tan x go into dƒ/dx:
dƒ/dx = (a/30) sec x tan x − (a/60) sec² x.   (4)

Now set dƒ/dx = 0, divide by a, and multiply by 30 cos²x:
sin x = ½.   (5)

This answer is beautiful. The angle x is 30°! That optimal angle (n/6 radians) has sin x = i.The triangle with side a and hy otenuse a/√3 is a 30 60 90 right triangle.

I don't know whether you prefer √(a² + x²) or trigonometry. The minimum is exactly as before—either at 30° or going directly to MIT.

(a) Driving at angle x. (b) Energies of spring and mass. (c) Profit = income − cost.
[Fig. 3.6]

EXAMPLE 8   In mechanics, nature chooses minimum energy. A spring is pulled down by a mass, the energy is ƒ(x), and dƒ/dx = 0 gives equilibrium. It is a philosophical question why so many laws of physics involve minimum energy or minimum time—which makes the mathematics easy.

The energy has two terms—for the spring and the mass. The spring energy is ½x² —positive in stretching (x > 0 is downward) and also positive in compression (x < 0). The potential energy of the mass is taken as -mx —decreasing as the mass goes down. The balance is at the minimum of ƒ(x) = ½kx² − mx.

I apologize for giving you such a small problem, but it makes a crucial point. When ƒ(x) is quadratic, the equilibrium equation dƒ/dx = 0 is linear.

dƒ/dx = kx − m = 0

Graphically, x = m/k is at the bottom of the parabola. Physically, kx = m is a balance of forces—the spring force against the weight. Hooke's law for the spring force is elastic constant k times displacement x.

EXAMPLE 9Derivative of cost = marginal cost (our first management example).

The paper to print x copies of this book might cost C = 1000 + 3x dollars. The derivative is dC/dx = 3. This is the marginal cost of paper for each additional book. If x increases by one book, the cost C increases by $3. The marginal cost is like the velocity and the total cost is like the distance.

Marginal cost is in dollars per book. Total cost is in dollars. On the plus side, the income is I(x) and the marginal income is dI/dx. To apply calculus, we overlook the restriction to whole numbers.

Suppose the number of books increases by dx. The cost goes up by (dC/dx) dx. The income goes up by (dI/dx) dx. If we skip all other costs, then profit P(x) = income I(x) − cost C(x). In most cases P increases to a maximum and falls back.

At the high point on the profit curve, the marginal profit is zero:
dP/dx = 0   or   dI/dx = dC/dx.   (6)

Profit is maximized when marginal income I' equals marginal cost C'.

This basic rule of economics comes directly from calculus, and we give an example:

C(x) = cost of x advertisements = 900 + 400x − x²
setup cost 900, print cost 400x, volume savings x²

I(x) = income due to x advertisements = 600x − 6x²
sales 600 per advertisement, subtract 6x² for diminishing returns

optimal decision dC/dx = dI/dx   or   400 − 2x = 600 − 12x   or   x = 20
profit = income − cost = 9600 − 8500 = 1100.

The next section shows how to verify that this profit is a maximum not a minimum. The first exercises ask you to solve dƒ/dx = 0. Later exercises also look for ƒ(x).