Foundations to FrontierPart III: Calculus IBezhig

Module 14: Curve analysis and optimization

21 exercises, each with a complete solution. 7 figures. 1 code listing. 1 note from the engine.

On this page
  1. A. Prerequisites and observable goals
  2. B. The central idea: use derivatives to compare nearby choices
  3. C. Tests, with their limits
  4. D. Why concavity controls tangent errors
  5. E. A practical workflow
  6. F. Worked examples
  7. F1. The Optimization Workbench
  8. F2. Three traps and a faded example
  9. G. Independent practice
  10. Drill set: the friction points
  11. Frontier applications
  12. From a real game engine
  13. Hint ladders for M14.09–M14.21
  14. H. Complete solutions: Module 14
  15. Spaced review answers
  16. Faded example answer
  17. I. Retention and readiness

A. Prerequisites and observable goals#

Before

Derivative sign charts, critical numbers, closed-interval extrema, and basic geometry.

After

Translate derivative signs into graph behavior and solve a constrained optimization problem from a mathematical model.

Picture 14.1. The shape alphabet. Every curved stretch of a smooth graph is one of four strokes. The sign of f′f' says rising or falling; the sign of f′′f'' says which way the graph bends, because f′′f'' is the slope of the slope. Compare the two dashed tangent lines in each cell: from left to right they steepen or flatten. Read as a position graph, this is Module 12’s rule again: when f′f' and f′′f'' have the same sign, the speed grows.

B. The central idea: use derivatives to compare nearby choices#

A function’s height, slope, and bending are different pieces of information. The first derivative describes increasing or decreasing behavior. The second derivative describes how the slope changes. Optimization uses this information after the feasible choices have been expressed as a domain: the best algebraic critical point is irrelevant if it violates the problem’s constraints.

C. Tests, with their limits#

On an interval, f′>0f'>0 implies increasing and f′<0f'<0 implies decreasing, by the MVT. At a critical input cc, a first-derivative sign change +→−+\to- gives a local maximum; −→+-\to+ gives a local minimum. No sign change means this test does not produce an extremum.

Where f′′>0f''>0, the graph is concave up; where f′′<0f''<0, concave down. An inflection point is a point on the graph where concavity changes. A zero of f′′f'' is only a candidate, and a missing domain point cannot be an inflection point of the graph. If f′(c)=0f'(c)=0 and f′′(c)>0f''(c)>0, the second derivative test gives a local minimum; f′′(c)<0f''(c)<0 gives a local maximum. If f′′(c)=0f''(c)=0, the test is inconclusive.

An absolute maximum on a closed interval must still be compared against endpoints and all other critical candidates. For an open or unbounded feasible interval, investigate behavior at the ends; do not assume a best value is attained. Standard derivative applications: [O1Apps].

Picture 14.2. From sign chart to sketch. Factor f′f' and f′′f'', mark their zeros on two number lines, write a sign in every gap, and read off one stroke of the shape alphabet per gap. At x=0x=0 the derivative is zero but does not change sign, so there is no extremum there, only a level spot where the bending flips. The only extremum is the minimum at x=1x=1.

D. Why concavity controls tangent errors#

If f′f' increases, moving right from aa produces slopes at least as large as f′(a)f'(a). The secant slope from aa to x>ax>a, by the MVT, is one of those intermediate slopes. Therefore f(x)−f(a)≥f′(a)(x−a)f(x)-f(a)\ge f'(a)(x-a), placing the graph above the tangent. The same conclusion holds to the left after the sign of x−ax-a is handled. This explains the underestimate for a concave-up graph in Module 13.

An optimization model often turns many choices into one variable. A rectangle with fixed perimeter cannot change width and length independently. Eliminating one variable is not a calculus trick: it expresses the constraint, and the remaining interval expresses physical feasibility.

E. A practical workflow#

For a graph: record domain and intercepts, discontinuities or asymptotes, zeros and undefined points of f′f', derivative signs, and concavity. Use those features to construct a coherent sketch rather than drawing a smooth curve through a few sampled points.

For optimization: name the quantity to maximize or minimize; write its units; express it with the constraints; state the feasible domain; find critical inputs; justify the winner globally; and translate the input back into all requested dimensions. If the model is wrong, flawless differentiation solves the wrong problem.

Picture 14.3. The tank trade-off. An open-top tank with a square base must hold 3232 m3^3, and its material is its surface area S(x)=x2+128xS(x)=x^2+\dfrac{128}{x}, the floor plus four walls. Too narrow and the walls grow tall; too wide and the floor grows huge. Both ends of the domain cost too much, so the best tank is in between, where S′(x)=0S'(x)=0: a 44 m square, 22 m deep. The tanks are drawn to one scale.

F. Worked examples#

Curve behavior. Let f(x)=x3−3xf(x)=x^3-3x. Then f′=3(x−1)(x+1)f'=3(x-1)(x+1) and f′′=6xf''=6x. The graph increases on (−∞,−1)(-\infty,-1) and (1,∞)(1,\infty) and decreases between. Its local maximum is (−1,2)(-1,2) and local minimum is (1,−2)(1,-2). Concavity changes at (0,0)(0,0). There is no absolute extremum on all of R\R because the cubic is unbounded above and below.

The exact cubic f(x)=x3−3xf(x)=x^3-3x has slope zero at two nonzero heights. Its concavity changes at zero, where its slope is negative.

A fixed-perimeter rectangle. With perimeter 4040 m, length ℓ=20−w\ell=20-w. The area is A(w)=w(20−w)A(w)=w(20-w) for 0<w<200<w<20. Then A′=20−2wA'=20-2w, so w=10w=10 and ℓ=10\ell=10. Since A′′=−2<0A''=-2<0 everywhere and the area tends to zero at either feasible end, this is the absolute maximum. Equivalently, A=100−(w−10)2≤100A=100-(w-10)^2\le100 proves the result without calculus and checks it.

Exact derivative graph for the preceding cubic f(x)=x3−3xf(x)=x^3-3x. Its zeros locate horizontal tangents, and its sign determines the cubic’s increasing and decreasing intervals. A negative derivative means decreasing height, not necessarily negative height.

F1. The Optimization Workbench#

Optimization problems usually fail in the modelling, not in the calculus. Run them on a workbench, one move per line, just as you ran related rates in Picture 12.4.

  1. Picture and goal. Draw it. Name the quantity to make largest or smallest, with its units.
  2. Objective. Write that quantity using every variable in the picture.
  3. Constraint and domain. Use the constraint to cut down to one variable, then write the feasible domain: every value that makes a real object.
  4. Candidates. Critical points inside the domain, plus the endpoints, or the behavior near an open end.
  5. Prove it is the best, then answer the question. Compare candidates, or read the sign of the derivative around the only critical point. Then report every quantity the question asks for, with units.

Worked example: the tank in Picture 14.3. An open-top tank with a square base must hold 3232 m3^3. Use the least material.

  1. Goal: minimize the surface area SS (m2^2). Base side xx and depth hh, in metres.
  2. Objective: S=x2+4xhS=x^2+4xh, the floor plus four walls.
  3. Constraint: x2h=32x^2h=32, so h=32/x2h=32/x^2 and S(x)=x2+128xS(x)=x^2+\dfrac{128}{x}. Domain: x>0x>0, an open interval with no endpoints.
  4. Parentheses Rewrite first: 128x=128x−1\dfrac{128}{x}=128x^{-1}, whose derivative is −128x−2-128x^{-2}. So S′(x)=2x−128x2=2x3−128x2S'(x)=2x-\dfrac{128}{x^2}=\dfrac{2x^3-128}{x^2}, which is zero only when x3=64x^3=64, at x=4x=4.
  5. The numerator 2x3−1282x^3-128 is negative for 0<x<40<x<4 and positive for x>4x>4, so SS falls and then rises: x=4x=4 is the minimum on the whole domain. Answer: a base 44 m by 44 m, depth h=32/16=2h=32/16=2 m, using 4848 m2^2 of material. Check in the constraint: 4⋅4⋅2=324\cdot4\cdot2=32.

The one-critical-point rule. On an interval, if a differentiable function has exactly one critical point and it is a local minimum, then it is the absolute minimum on that interval; the same holds for a maximum. The reason: to come back down below its value there, the function would first have to rise and turn around, and the turning point would be a second critical point. Move 5 of the tank used exactly this.

F2. Three traps and a faded example#

G. Independent practice#

F foundation C standard course work T transfer S optional stretch L runnable lab or project. Attempt the complete set before opening its solutions.

M14.01FSolution

Find the increasing/decreasing intervals and local extrema of f(x)=x3−6x2+9xf(x)=x^3-6x^2+9x.

M14.02CSolution

Find concavity intervals and inflection points of f(x)=x4−4x3f(x)=x^4-4x^3.

M14.03TSolution

A student says f′′(0)=0f''(0)=0 makes 00 an inflection point of f(x)=x4f(x)=x^4. Diagnose the claim.

M14.04CSolution

A farmer has 6060 m of fencing for three sides of a rectangle along a straight river. Find the dimensions giving the largest area.

M14.05TSolution

An open-top box is made by cutting equal squares of side xx from a 1212 cm by 1212 cm sheet and folding the sides. Maximize its volume.

M14.06TSolution

Find the point on the line y=2x+1y=2x+1 closest to the origin. Justify a global minimum.

M14.07CSolution

Analyze the intercepts, asymptotes, monotonicity, and concavity of f(x)=x/(x+1)f(x)=x/(x+1). Is x=−1x=-1 an inflection input?

M14.08SSolution

A closed cylinder has fixed volume 54π54\pi cm3^3. Find the radius and height minimizing its surface area. Explain what happens as the radius approaches either end of its domain.

Drill set: the friction points#

Each problem names the friction family or skill it trains. Do them in order: they get less familiar as they go. Hint ladders follow the original hints.

M14.09FSolution

(Fractions under pressure; f′f' undefined.) For f(x)=x1/3(x−4)f(x)=x^{1/3}(x-4), find where ff increases and decreases, and its local extrema.

M14.10FSolution

(Modular Workbench.) For f(x)=x e−xf(x)=x\,e^{-x}, find where ff increases and decreases, its local extrema, its concavity, and its inflection point.

M14.11CSolution

(Derivative on top.) For f(x)=x2ln⁡xf(x)=x^2\ln x with x>0x>0, find the local extremum with the second derivative test, and the inflection point.

M14.12CSolution

(Angle Fortress.) For f(x)=sin⁡2xf(x)=\sin^2x on [0,π][0,\pi], find where ff increases and decreases, its concavity, and its inflection points.

M14.13CSolution

(When the second derivative test is silent.) Find the local extrema of f(x)=x4−4x3f(x)=x^4-4x^3. Use the second derivative test where it works and the first derivative test where it does not.

M14.14CSolution

(A full sketch.) Sketch f(x)=xx2+1f(x)=\dfrac{x}{x^2+1}: symmetry, asymptote, increasing and decreasing intervals, extrema, concavity, and inflection points.

M14.15CSolution

(Optimization with a price tag.) A closed box with a square base must hold 20002000 cm3^3. Its top and bottom cost 22 cents per cm2^2 and its sides 11 cent per cm2^2. Find the cheapest box and its cost.

M14.16CSolution

(A monotone transform.) Find the point on y=xy=\sqrt x closest to (3,0)(3,0), and the distance.

M14.17TSolution

(When an endpoint wins.) A 1010 m wire is cut into two pieces. One is bent into a square and the other into a circle. Where should it be cut to make the total enclosed area as small as possible? As large as possible?

M14.18TSolution

(Angle Fortress; a projectile.) Ignoring air resistance, a projectile launched from level ground at speed vv and angle θ\theta lands at range R(θ)=v2sin⁡(2θ)gR(\theta)=\dfrac{v^2\sin(2\theta)}{g} on the same level. Find the angle that maximizes the range on [0,π/2][0,\pi/2] and the maximum range for v=20v=20 m/s and g=9.81g=9.81 m/s2^2. Which two angles give half the maximum range?

Frontier applications#

Picture 14.4. The best glide is a tangent. Each point on the drag polar is one way to fly. The slope of the line from the origin to that point is CL/CDC_L/C_D, the glide ratio. The steepest such line that still touches the polar is tangent to it, at the point where induced drag KCL2KC_L^2 equals parasite drag CD0C_{D0}.

M14.19TSolution

Best glide. (a) The glide ratio is G(CL)=CLCD0+KCL2G(C_L)=\dfrac{C_L}{C_{D0}+KC_L^2} for CL>0C_L>0. Show that GG has exactly one critical point, at CL∗=CD0/KC_L^*=\sqrt{C_{D0}/K}, that it is the maximum, and that there induced drag equals parasite drag. (b) With CD0=0.02C_{D0}=0.02 and K=0.045K=0.045, find CL∗C_L^* and the best glide ratio. (c) From 10001000 m in still air, about how far can the aircraft glide at its best glide ratio? (d) At CL=1.2C_L=1.2, flying slower, what is the glide ratio, and how much distance does that cost from 10001000 m?

Picture 14.5. Training a one-weight model. Left: the spring data, the least-squares line F=1.99xF=1.99x (aqua, with its four misses drawn) and a worse guess F=1.5xF=1.5x (orange). Right: the loss is a parabola in ww, so calculus finds its lowest point exactly; gradient descent (blue) walks down to the same place, closing 60%60\% of the remaining gap at each step.

M14.20TSolution

The smallest machine-learning model. (a) Expand E(w)E(w) into a parabola E(w)=αw2−2βw+γE(w)=\alpha w^2-2\beta w+\gamma, with α=∑xi2\alpha=\sum x_i^2, β=∑xiFi\beta=\sum x_iF_i, and γ=∑Fi2\gamma=\sum F_i^2. Find its minimizer w∗=β/αw^*=\beta/\alpha and explain why it is the global minimum. (b) For the spring data, find k∗=w∗k^*=w^* and the leftover error E(w∗)E(w^*). (c) Gradient descent updates w←w−η E′(w)w\leftarrow w-\eta\,E'(w). With η=0.01\eta=0.01 and w0=1w_0=1, take two steps. Show that every step multiplies the distance to w∗w^* by 1−2ηα1-2\eta\alpha, and find the range of learning rates η>0\eta>0 for which the steps converge. (Compare AI01, section 2.6.)

From a real game engine#

The game engine of M12.21 decides whether a smoke cloud blocks a line of sight with one short function, which both the bots’ perception and the HUD call:

C++
inline bool segmentIntersectsSmoke(const vec3& start, const vec3& end,
                                   const vec3& center, f32 radius) {
    if (radius <= 0.f) return false;
    const vec3 segment = end - start;
    const f32 lengthSquared = glm::dot(segment, segment);
    if (lengthSquared <= 0.000001f) {
        return glm::length(start - center) <= radius;
    }
    const f32 t = std::clamp(glm::dot(center - start, segment) / lengthSquared,
                             0.f, 1.f);
    return glm::length(start + segment * t - center) <= radius;
}

The points of the sight line are start + segment * t for 0≤t≤10\le t\le1: t=0t=0 is the eye and t=1t=1 the target. The std::clamp statement chooses one tt and clamps it into [0,1][0,1]; the final return asks whether that point lies inside the smoke ball. In the plane of the eye, the target, and the smoke’s centre, glm::dot of two vectors (a1,a2)(a_1,a_2) and (b1,b2)(b_1,b_2) is a1b1+a2b2a_1b_1+a_2b_2.

M14.21TSolution

(The closed-interval method in a game engine.) Put the eye at (0,0)(0,0) and the target at (20,0)(20,0), in metres, and call the line parameter ss (the code’s t), keeping tt for time. (a) For smoke centred at (8,3)(8,3), write the squared distance D2(s)D^2(s) from the point (20s,0)(20s,0) to the centre, minimize it on [0,1][0,1], and decide whether a cloud of radius 4.24.2 m blocks the view. Check that the std::clamp statement computes the same ss. (b) Now the smoke is centred at (25,1)(25,1), beyond the target. Find the ss that minimizes D2D^2 with no limits, then the minimum on [0,1][0,1]. Is the view blocked? What would the code decide without the clamp, and why would that be wrong? (c) Why may the code (and you) minimize D2D^2 instead of DD? (d) By M12.21 the cloud’s radius grows as R(t)=4.2 Ec(u)R(t)=4.2\,E_c(u), with Ec(u)=3u2−2u3E_c(u)=3u^2-2u^3 and u=t/0.8u=t/0.8, for 0≤t≤0.80\le t\le0.8 s. Use the Intermediate Value Theorem and the sign of R′R' to show that a sight line passing 33 m from the centre becomes blocked at exactly one moment, between t=0.5t=0.5 s and t=0.55t=0.55 s.

Optional small hints

For M14.05, 0<x<60<x<6. For M14.06, minimize squared distance instead of its square root. For M14.08, eliminate hh with the volume constraint before differentiating.

Hint ladders for M14.09–M14.21#

Climb one rung at a time, and try the problem again after each rung.

Rung 1: a nudge

What does x1/3(x−4)x^{1/3}(x-4) look like multiplied out?

Rung 2: the idea

Parentheses Rewrite, then factor the smallest power of xx out of f′f'.

Rung 3: a skeleton

f=x4/3−4x1/3f=x^{4/3}-4x^{1/3}; f′=43x1/3−43x−2/3=43x−2/3(□)f'=\tfrac43x^{1/3}-\tfrac43x^{-2/3}=\tfrac43x^{-2/3}(\square); f′f' is zero at □\square and undefined at □\square.

Rung 1: a nudge

Which two factors make up x e−xx\,e^{-x}?

Rung 2: the idea

Workbench: u=xu=x, v=e−xv=e^{-x}; then factor e−xe^{-x} out, and repeat for f′′f''.

Rung 3: a skeleton

f′=e−x(□)f'=e^{-x}(\square), f′′=e−x(□)f''=e^{-x}(\square); read the signs from the brackets, since e−x>0e^{-x}>0.

Rung 1: a nudge

What is  d dxln⁡x\tfrac{\dd}{\dd x}\ln x?

Rung 2: the idea

Product rule; derivative on top, original on bottom; then the second derivative test.

Rung 3: a skeleton

f′=x(2ln⁡x+□)f'=x(2\ln x+\square), zero at ln⁡x=□\ln x=\square; f′′=2ln⁡x+□f''=2\ln x+\square.

Rung 1: a nudge

Which identity turns 2sin⁡xcos⁡x2\sin x\cos x into one sine?

Rung 2: the idea

The double-angle identity; the Angle Fortress keeps 2x2x intact in f′′f''.

Rung 3: a skeleton

f′=sin⁡(□)f'=\sin(\square), f′′=2cos⁡(□)f''=2\cos(\square); on [0,π][0,\pi], cos⁡(2x)=0\cos(2x)=0 at x=π□x=\tfrac{\pi}{\square} and 3π□\tfrac{3\pi}{\square}.

Rung 1: a nudge

What is f′′f'' at each critical point?

Rung 2: the idea

The second derivative test decides when f′′≠0f''\ne0; when f′′=0f''=0, use the sign of f′f' on both sides.

Rung 3: a skeleton

f′=4x2(x−□)f'=4x^2(x-\square); f′′(3)=□f''(3)=\square; near 00, f′f' has the sign of (x−3)(x-3), which is □\square on both sides.

Rung 1: a nudge

What happens to f(−x)f(-x), and to f(x)f(x) for very large xx?

Rung 2: the idea

Quotient rule twice; factor before reading signs.

Rung 3: a skeleton

f′=1−x2(x2+1)2f'=\dfrac{1-x^2}{(x^2+1)^2}; f′′=2x(x2−□)(x2+1)3f''=\dfrac{2x(x^2-\square)}{(x^2+1)^3}; inflections at x=0,±□x=0,\pm\square.

Rung 1: a nudge

Which areas cost 22 cents and which cost 11?

Rung 2: the idea

The Optimization Workbench: the volume constraint eliminates hh.

Rung 3: a skeleton

h=2000/x2h=2000/x^2; cost C=2(2x2)+1(4xh)=4x2+□xC=2(2x^2)+1(4xh)=4x^2+\dfrac{\square}{x}; C′=0C'=0 when x3=□x^3=\square.

Rung 1: a nudge

Is it easier to minimize the distance or its square?

Rung 2: the idea

The square root is increasing, so both have the same minimizer (M14.06).

Rung 3: a skeleton

D2=(x−3)2+(x)2=(x−3)2+□D^2=(x-3)^2+(\sqrt x)^2=(x-3)^2+\square; set its derivative to zero.

Rung 1: a nudge

If xx metres go to the square, how long is each side, and what is the circle’s radius?

Rung 2: the idea

Closed interval [0,10][0,10]: compare the critical point with both endpoints.

Rung 3: a skeleton

A(x)=(x4)2+(10−x)24πA(x)=\left(\tfrac x4\right)^2+\dfrac{(10-x)^2}{4\pi}; A′=0A'=0 at x=40π+□x=\dfrac{40}{\pi+\square}; compare AA there with A(0)A(0) and A(10)A(10).

Rung 1: a nudge

Where does sin⁡(2θ)\sin(2\theta) reach its largest value?

Rung 2: the idea

Angle Fortress: the chain rule brings out a 22, and the angle stays 2θ2\theta.

Rung 3: a skeleton

R′(θ)=2v2cos⁡(2θ)g=0R'(\theta)=\dfrac{2v^2\cos(2\theta)}{g}=0 at θ=□\theta=\square; half range when sin⁡(2θ)=□\sin(2\theta)=\square.

Rung 1: a nudge

What does the quotient rule give for the top of G′G'?

Rung 2: the idea

The one-critical-point rule (F1) settles the maximum.

Rung 3: a skeleton

G′=CD0−KCL2(□)2G'=\dfrac{C_{D0}-K C_L^2}{(\square)^2}; Gmax⁡=12K CD0G_{\max}=\dfrac{1}{2\sqrt{K\,C_{D0}}}.

Rung 1: a nudge

Square out (Fi−wxi)2(F_i-wx_i)^2. Which powers of ww appear?

Rung 2: the idea

A parabola αw2−2βw+γ\alpha w^2-2\beta w+\gamma with α>0\alpha>0 has its lowest point where its derivative is zero.

Rung 3: a skeleton

w∗=β/αw^*=\beta/\alpha; α=□\alpha=\square, β=□\beta=\square; wn+1−w∗=(1−2ηα)(wn−w∗)w_{n+1}-w^*=(1-2\eta\alpha)(w_n-w^*).

Rung 1: a nudge

What is the distance from (20s,0)(20s,0) to (8,3)(8,3)?

Rung 2: the idea

The closed-interval method: interior critical points and both endpoints.

Rung 3: a skeleton

D2=(20s−8)2+□D^2=(20s-8)^2+\square; in (b), D2=(20s−25)2+1D^2=(20s-25)^2+1 is decreasing on [0,1][0,1], so the minimum is at s=□s=\square; in (d), compare R(0.5)R(0.5) and R(0.55)R(0.55) with 33.

H. Complete solutions: Module 14#

Compare the first step where your work differs. A corrected answer is not yet an independent success.

M14.01Show solution

Factor the derivative and test intervals

Here f′=3x2−12x+9=3(x−1)(x−3)f'=3x^2-12x+9=3(x-1)(x-3). Its signs are positive before 11, negative between 11 and 33, and positive after 33. Thus the function increases on (−∞,1)(-\infty,1) and (3,∞)(3,\infty) and decreases on (1,3)(1,3). At 11 it has a local maximum f(1)=4f(1)=4; at 33 a local minimum f(3)=0f(3)=0. These are local, not absolute on R\R.

Back to M14.01
M14.02Show solution

A second-derivative sign chart

Differentiate twice: f′′=12x2−24x=12x(x−2)f''=12x^2-24x=12x(x-2). It is positive on (−∞,0)(-\infty,0) and (2,∞)(2,\infty), negative on (0,2)(0,2). The graph is continuous and concavity changes at both candidate inputs. Its inflection points are (0,0),(2,−16)\boxed{(0,0),(2,-16)}.

Back to M14.02
M14.03Show solution

A candidate without a sign change

For x4x^4, f′′=12x2≥0f''=12x^2\ge0 on both sides of zero. The graph stays concave up, so zero is not an inflection input. In fact, it is a local and absolute minimum. A derivative being zero does not by itself describe how its sign behaves nearby.

Back to M14.03
M14.04Show solution

Three fenced sides, not four

Let ww be each side perpendicular to the river and ℓ\ell the parallel fenced side. The constraint is 2w+ℓ=602w+\ell=60, so A=w(60−2w)A=w(60-2w) on 0<w<300<w<30. Then A′=60−4w=0A'=60-4w=0 gives w=15w=15, ℓ=30\ell=30. Since A′′=−4<0A''=-4<0 and the endpoint limiting areas vanish, the largest area is 450 m2\boxed{450\text{ m}^2} with dimensions 1515 m by 3030 m.

Back to M14.04
M14.05Show solution

A geometric domain eliminates false candidates

The base dimensions are both 12−2x12-2x and height is xx. Thus

V=x(12−2x)2,V′=12(x−2)(x−6).V=x(12-2x)^2,\qquad V'=12(x-2)(x-6).

The feasible nondegenerate interval is (0,6)(0,6). Only x=2x=2 is an interior critical input. V′V' is positive before 22 and negative afterward until 66, and limiting endpoint volumes are zero. The maximum is 128 cm3\boxed{128\text{ cm}^3} from a box 88 cm by 88 cm by 22 cm. The zero at 66 describes a collapsed box, not a second useful design.

Back to M14.05
M14.06Show solution

Minimize a monotone transform of distance

Squared distance is D(x)=x2+(2x+1)2=5x2+4x+1D(x)=x^2+(2x+1)^2=5x^2+4x+1. Since square root is increasing, minimizing DD minimizes distance. Solve D′=10x+4=0D'=10x+4=0 to get x=−2/5x=-2/5, hence y=1/5y=1/5. The positive second derivative 1010 or completed square D=5(x+2/5)2+1/5D=5(x+2/5)^2+1/5 proves a global minimum. The point is (−2/5,1/5)\boxed{(-2/5,1/5)}, at distance 1/51/\sqrt5.

Back to M14.06
M14.07Show solution

Keep disconnected domain pieces separate

Write f=1−1/(x+1)f=1-1/(x+1), with domain x≠−1x\ne-1. The only intercept is (0,0)(0,0); asymptotes are vertical x=−1x=-1 and horizontal y=1y=1. Since f′=1/(x+1)2>0f'=1/(x+1)^2>0, it increases on each domain interval (−∞,−1)(-\infty,-1) and (−1,∞)(-1,\infty). It is not increasing across the missing point as a single interval claim. Because f′′=−2/(x+1)3f''=-2/(x+1)^3, concavity is up on the left and down on the right. There is no point of the graph at x=−1x=-1, so it is not an inflection point.

Back to M14.07
M14.08Show solution

Optimize under a volume constraint

From πr2h=54π\pi r^2h=54\pi, h=54/r2h=54/r^2 with r>0r>0. A closed cylinder has

S(r)=2πr2+2πrh=2πr2+108πr.S(r)=2\pi r^2+2\pi rh=2\pi r^2+\frac{108\pi}{r}.

Thus S′=4πr−108π/r2=4π(r3−27)/r2S'=4\pi r-108\pi/r^2=4\pi(r^3-27)/r^2. Its unique positive zero is r=3r=3 cm, giving h=6h=6 cm and S=54πS=54\pi cm2^2. The derivative changes from negative to positive. Also S→∞S\to\infty as r→0+r\to0^+ or r→∞r\to\infty, so the minimum is global. A very narrow cylinder needs huge height; a very wide one needs huge lids.

Back to M14.08
M14.09Show solution

Factor the smallest power, then read one bracket

Rewrite: f=x4/3−4x1/3f=x^{4/3}-4x^{1/3}. With 43−1=13\tfrac43-1=\tfrac13 and 13−1=−23\tfrac13-1=-\tfrac23,

f′(x)=43x1/3−43x−2/3=43x−2/3(x−1).f'(x)=\tfrac43x^{1/3}-\tfrac43x^{-2/3}=\tfrac43x^{-2/3}(x-1).

Critical numbers: x=1x=1, where f′=0f'=0, and x=0x=0, where f′f' is undefined but f(0)=0f(0)=0 is defined. (The definition agrees that f′(0)f'(0) does not exist: f(h)−f(0)h=h−2/3(h−4)\dfrac{f(h)-f(0)}{h}=h^{-2/3}(h-4) falls without bound as h→0h\to0.) Since x−2/3=1/(x1/3)2>0x^{-2/3}=1/(x^{1/3})^2>0 for x≠0x\ne0, f′f' has the sign of x−1x-1: negative for x<1x<1, on both sides of 00, and positive for x>1x>1. So ff decreases on (−∞,1)(-\infty,1) and increases on (1,∞)(1,\infty), with a local (in fact absolute) minimum f(1)=−3\boxed{f(1)=-3}. There is no extremum at 00: ff keeps falling through it, along a vertical tangent, since f′→−∞f'\to-\infty there.

Back to M14.09
M14.10Show solution

Factor out the exponential, which is never zero

f′=e−x+x(−e−x)=e−x(1−x)f'=e^{-x}+x(-e^{-x})=e^{-x}(1-x) and f′′=−e−x(1−x)+e−x(−1)=e−x(x−2)f''=-e^{-x}(1-x)+e^{-x}(-1)=e^{-x}(x-2). Because e−x>0e^{-x}>0, the brackets decide every sign. ff increases on (−∞,1)(-\infty,1) and decreases on (1,∞)(1,\infty), with maximum f(1)=1/e≈0.368\boxed{f(1)=1/e\approx0.368}, absolute by the one-critical-point rule. It is concave down on (−∞,2)(-\infty,2) and up on (2,∞)(2,\infty), with inflection point (2, 2/e2)≈(2, 0.271)\boxed{(2,\,2/e^2)\approx(2,\,0.271)}.

Back to M14.10
M14.11Show solution

Derivative on top, then the second derivative test

f′=2xln⁡x+x2⋅1x=x(2ln⁡x+1)f'=2x\ln x+x^2\cdot\tfrac1x=x(2\ln x+1). For x>0x>0 it is zero when ln⁡x=−12\ln x=-\tfrac12, at x=e−1/2≈0.607x=e^{-1/2}\approx0.607. Next, f′′=2ln⁡x+2+1=2ln⁡x+3f''=2\ln x+2+1=2\ln x+3, and f′′(e−1/2)=−1+3=2>0f''(e^{-1/2})=-1+3=2>0, so this is a local minimum, f(e−1/2)=−12e≈−0.184\boxed{f(e^{-1/2})=-\tfrac{1}{2e}\approx-0.184}. Concavity changes where 2ln⁡x+3=02\ln x+3=0, at x=e−3/2≈0.223x=e^{-3/2}\approx0.223: the inflection point is (e−3/2, −32e3)≈(0.223, −0.075)\boxed{\left(e^{-3/2},\,-\tfrac{3}{2e^3}\right)\approx(0.223,\,-0.075)}, concave down to its left and up to its right.

Back to M14.11
M14.12Show solution

One identity, then the Wheel

f′=2sin⁡xcos⁡x=sin⁡(2x)f'=2\sin x\cos x=\sin(2x), positive on (0,π2)(0,\tfrac\pi2) and negative on (π2,π)(\tfrac\pi2,\pi): ff rises to its maximum f(π2)=1\boxed{f(\tfrac\pi2)=1} and falls back, with minimum 00 at both endpoints. Next, f′′=2cos⁡(2x)f''=2\cos(2x), positive on (0,π4)(0,\tfrac\pi4) and (3π4,π)(\tfrac{3\pi}4,\pi) and negative between. So ff is concave up, then down, then up, with inflection points (π4,12)\boxed{(\tfrac\pi4,\tfrac12)} and (3π4,12)\boxed{(\tfrac{3\pi}4,\tfrac12)}.

Back to M14.12
M14.13Show solution

When one test is silent, ask the other

f′=4x3−12x2=4x2(x−3)f'=4x^3-12x^2=4x^2(x-3), so the critical numbers are 00 and 33, and f′′=12x2−24xf''=12x^2-24x. At 33: f′′(3)=108−72=36>0f''(3)=108-72=36>0, a local minimum, f(3)=−27\boxed{f(3)=-27}. At 00: f′′(0)=0f''(0)=0, so the second derivative test says nothing. First derivative test: near 00, 4x2>04x^2>0 and x−3<0x-3<0, so f′<0f'<0 on both sides. ff keeps decreasing through 00: no extremum there.

Back to M14.13
M14.14Show solution

Symmetry first, then two quotient rules

f(−x)=−f(x)f(-x)=-f(x), so the graph is symmetric about the origin. The bottom is never zero, so there is no vertical asymptote, and f→0f\to0 as x→±∞x\to\pm\infty: the horizontal asymptote is y=0y=0. Quotient rule: f′=(x2+1)−x(2x)(x2+1)2=1−x2(x2+1)2f'=\dfrac{(x^2+1)-x(2x)}{(x^2+1)^2}=\dfrac{1-x^2}{(x^2+1)^2}, so ff increases on (−1,1)(-1,1) and decreases on (−∞,−1)(-\infty,-1) and (1,∞)(1,\infty), with maximum (1,12)(1,\tfrac12) and minimum (−1,−12)(-1,-\tfrac12), both absolute. Workbench for f′′f'', with u=1−x2u=1-x^2 and v=(x2+1)−2v=(x^2+1)^{-2}: u′=−2xu'=-2x and v′=−4x(x2+1)−3v'=-4x(x^2+1)^{-3}, so

f′′=−2x(x2+1)−4x(1−x2)(x2+1)3=2x3−6x(x2+1)3=2x(x2−3)(x2+1)3.f''=\frac{-2x(x^2+1)-4x(1-x^2)}{(x^2+1)^3}=\frac{2x^3-6x}{(x^2+1)^3}=\frac{2x(x^2-3)}{(x^2+1)^3}.

It is negative on (−∞,−3)(-\infty,-\sqrt3) and (0,3)(0,\sqrt3) and positive on (−3,0)(-\sqrt3,0) and (3,∞)(\sqrt3,\infty), giving inflection points (−3,−34), (0,0), (3,34)\boxed{(-\sqrt3,-\tfrac{\sqrt3}{4}),\ (0,0),\ (\sqrt3,\tfrac{\sqrt3}{4})}.

Back to M14.14
M14.15Show solution

Expensive lids make a taller box

Workbench. (1) Minimize the cost CC in cents, with base side xx and height hh in cm. (2) C=2(2x2)+1(4xh)C=2(2x^2)+1(4xh). (3) x2h=2000x^2h=2000, so h=2000/x2h=2000/x^2 and C(x)=4x2+8000xC(x)=4x^2+\dfrac{8000}{x} for x>0x>0. (4) With 8000x=8000x−1\dfrac{8000}{x}=8000x^{-1}, C′=8x−8000x−2=8x−8000x2=8(x3−1000)x2C'=8x-8000x^{-2}=8x-\dfrac{8000}{x^2}=\dfrac{8(x^3-1000)}{x^2}, zero at x=10x=10. (5) C′<0C'<0 before 1010 and C′>0C'>0 after, so this is the global minimum. The cheapest box is 10 cm×10 cm×20 cm\boxed{10\text{ cm}\times10\text{ cm}\times20\text{ cm}}, costing 400+800=1200400+800=1200 cents, $12.00\boxed{\$12.00}. Because the lids cost double, the best box is twice as tall as it is wide.

Back to M14.15
M14.16Show solution

Minimize the square, report the root

The squared distance (M14.06 called it DD; here it is D2D^2, so that DD is the distance itself) is D2=(x−3)2+(x)2=(x−3)2+xD^2=(x-3)^2+(\sqrt x)^2=(x-3)^2+x for x≥0x\ge0. Its derivative 2(x−3)+12(x-3)+1 is zero at x=52x=\tfrac52, its second derivative is 2>02>0, and it is the only critical point, so it is the global minimum (also D2(0)=9D^2(0)=9 is larger). The closest point is (52,52)≈(2.5, 1.581)\boxed{\left(\tfrac52,\sqrt{\tfrac52}\right)\approx(2.5,\,1.581)}, with D2=14+52=114D^2=\tfrac14+\tfrac52=\tfrac{11}4, so the distance is 112≈1.658\boxed{\tfrac{\sqrt{11}}{2}\approx1.658}.

Back to M14.16
M14.17Show solution

The critical point is the worst cut

If xx metres go to the square, its side is x/4x/4; the circle’s circumference is 10−x10-x, so its radius is (10−x)/(2π)(10-x)/(2\pi). Total area on [0,10][0,10]:

A(x)=x216+(10−x)24π,A′(x)=x8−10−x2π.A(x)=\frac{x^2}{16}+\frac{(10-x)^2}{4\pi},\qquad A'(x)=\frac x8-\frac{10-x}{2\pi}.

Setting A′=0A'=0 and multiplying by 8π8\pi: πx=4(10−x)\pi x=4(10-x), so x=40π+4≈5.60x=\dfrac{40}{\pi+4}\approx5.60 m. Since A′′=18+12π>0A''=\tfrac18+\tfrac1{2\pi}>0, this is the minimum: A=25π+4≈3.50 m2A=\dfrac{25}{\pi+4}\approx\boxed{3.50\text{ m}^2}, cutting 5.605.60 m for the square. For the maximum compare the endpoints: A(0)=25π≈7.96A(0)=\dfrac{25}{\pi}\approx7.96 m2^2 (all circle) and A(10)=6.25A(10)=6.25 m2^2 (all square). The largest area comes from not cutting at all: bend the whole wire into a circle, ≈7.96 m2\boxed{\approx7.96\text{ m}^2}. The circle encloses the most area for its length, so the maximum sits at an endpoint.

Back to M14.17
M14.18Show solution

The inside angle doubles

R′(θ)=v2gcos⁡(2θ)⋅2R'(\theta)=\dfrac{v^2}{g}\cos(2\theta)\cdot2, which is zero on (0,π2)(0,\tfrac\pi2) only at 2θ=π22\theta=\tfrac\pi2, that is θ=π4\theta=\tfrac\pi4. The endpoints give R=0R=0, so the maximum is at 45∘\boxed{45^\circ}, with Rmax⁡=v2g=4009.81≈40.8 mR_{\max}=\dfrac{v^2}{g}=\dfrac{400}{9.81}\approx\boxed{40.8\text{ m}}. Half the maximum needs sin⁡(2θ)=12\sin(2\theta)=\tfrac12, so 2θ=30∘2\theta=30^\circ or 150∘150^\circ: θ=15∘ or 75∘\boxed{\theta=15^\circ\text{ or }75^\circ}. These angles add to 90∘90^\circ; complementary angles always give equal ranges, because sin⁡(2θ)=sin⁡(180∘−2θ)\sin(2\theta)=\sin(180^\circ-2\theta).

Back to M14.18
M14.19Show solution

Induced drag equals parasite drag

(a) Quotient rule:

G′(CL)=(CD0+KCL2)−CL(2KCL)(CD0+KCL2)2=CD0−KCL2(CD0+KCL2)2.G'(C_L)=\frac{(C_{D0}+KC_L^2)-C_L(2KC_L)}{(C_{D0}+KC_L^2)^2}=\frac{C_{D0}-KC_L^2}{(C_{D0}+KC_L^2)^2}.

For CL>0C_L>0 it is zero only at CL∗=CD0/KC_L^*=\sqrt{C_{D0}/K}, positive before and negative after, so by the one-critical-point rule this is the maximum. There KCL∗2=CD0KC_L^{*2}=C_{D0}: induced drag equals parasite drag, so CD=2CD0C_D=2C_{D0} and Gmax⁡=CL∗2CD0=12KCD0G_{\max}=\dfrac{C_L^*}{2C_{D0}}=\dfrac{1}{2\sqrt{KC_{D0}}}.

(b) CL∗=0.02/0.045=4/9=2/3≈0.67C_L^*=\sqrt{0.02/0.045}=\sqrt{4/9}=\boxed{2/3\approx0.67} and KCD0=0.0009KC_{D0}=0.0009, so Gmax⁡=12(0.03)=16.7G_{\max}=\dfrac{1}{2(0.03)}=\boxed{16.7}.

(c) About 16.7×100016.7\times1000 m, roughly 16.7 km\boxed{16.7\text{ km}}.

(d) G(1.2)=1.20.02+0.045(1.44)=1.20.0848≈14.2G(1.2)=\dfrac{1.2}{0.02+0.045(1.44)}=\dfrac{1.2}{0.0848}\approx\boxed{14.2}, so about 14.214.2 km: flying slower costs about 2.5 km\boxed{2.5\text{ km}}, because induced drag grows like CL2C_L^2.

Back to M14.19
M14.20Show solution

A parabola, its vertex, and a shrinking gap

(a) Each term is (Fi−wxi)2=Fi2−2wxiFi+w2xi2(F_i-wx_i)^2=F_i^2-2wx_iF_i+w^2x_i^2, and adding them gives E(w)=αw2−2βw+γE(w)=\alpha w^2-2\beta w+\gamma. Then E′(w)=2αw−2βE'(w)=2\alpha w-2\beta, which is zero at w∗=β/αw^*=\beta/\alpha. Since E′′=2α>0E''=2\alpha>0, the parabola opens upward and its vertex is the global minimum; completing the square shows it directly: E=α(w−βα)2+γ−β2αE=\alpha\left(w-\tfrac\beta\alpha\right)^2+\gamma-\tfrac{\beta^2}{\alpha}.

(b) α=1+4+9+16=30\alpha=1+4+9+16=30, β=2.1+7.8+18.6+31.2=59.7\beta=2.1+7.8+18.6+31.2=59.7, and γ=4.41+15.21+38.44+60.84=118.9\gamma=4.41+15.21+38.44+60.84=118.9. So k∗=59.730=1.99 N/cmk^*=\dfrac{59.7}{30}=\boxed{1.99\text{ N/cm}}, and the leftover error is E(w∗)=γ−β2α=118.9−118.803=0.097 N2E(w^*)=\gamma-\dfrac{\beta^2}{\alpha}=118.9-118.803=\boxed{0.097\text{ N}^2}.

(c) E′(w)=60w−119.4E'(w)=60w-119.4. First step: w1=1−0.01(60−119.4)=1.594w_1=1-0.01(60-119.4)=1.594. Second: w2=1.594−0.01(95.64−119.4)=1.8316w_2=1.594-0.01(95.64-119.4)=1.8316. Since 2β=2αw∗2\beta=2\alpha w^*, each step gives wn+1−w∗=(wn−w∗)−2ηα(wn−w∗)=(1−2ηα)(wn−w∗)w_{n+1}-w^*=(w_n-w^*)-2\eta\alpha(w_n-w^*)=(1-2\eta\alpha)(w_n-w^*); here 1−0.6=0.41-0.6=0.4, so the gap goes −0.99-0.99, −0.396-0.396, −0.158-0.158, and each step closes 60%60\% of it. The steps converge exactly when ∣1−2ηα∣<1|1-2\eta\alpha|<1, that is for 0<η<1/α=1/30≈0.033\boxed{0<\eta<1/\alpha=1/30\approx0.033}; there is no largest such η\eta, because η=1/30\eta=1/30 itself makes the factor −1-1 and the steps bounce forever. At η=1/60\eta=1/60 a single step lands on w∗w^*. AI01’s loss (w−3)2(w-3)^2 has α=1\alpha=1, which is why its limit there was η<1\eta<1.

Back to M14.20
M14.21Show solution

An endpoint can win, even in a game

(a) D2(s)=(20s−8)2+(0−3)2=(20s−8)2+9D^2(s)=(20s-8)^2+(0-3)^2=(20s-8)^2+9. Its derivative 40(20s−8)40(20s-8) is zero at s=0.4s=0.4, inside [0,1][0,1]; the endpoints give 7373 and 153153. So the minimum is D2=9D^2=9, D=3<4.2D=3<4.2: blocked. The std::clamp statement computes (8)(20)+(3)(0)202+02=160400=0.4\dfrac{(8)(20)+(3)(0)}{20^2+0^2}=\dfrac{160}{400}=0.4, the same ss, and the clamp leaves it alone.

(b) D2(s)=(20s−25)2+1D^2(s)=(20s-25)^2+1 has its unlimited minimum at s=1.25s=1.25, outside [0,1][0,1]. On [0,1][0,1] its derivative 40(20s−25)40(20s-25) is negative, so D2D^2 decreases and the minimum is at the endpoint s=1s=1: D2=26D^2=26, D≈5.10>4.2D\approx5.10>4.2, not blocked. Without the clamp the code would use s=1.25s=1.25, a point 55 m beyond the target, find D=1D=1, and report the target hidden, as if smoke behind a target could hide it. The clamp is the closed-interval method: when the critical point falls outside the interval, an endpoint wins.

(c) D=D2D=\sqrt{D^2}, and the square root is increasing, so D2D^2 and DD are smallest at the same ss (M14.06). The code takes one square root, inside glm::length, only when it compares with the radius.

(d) R′(t)=4.20.8⋅6u(1−u)>0R'(t)=\dfrac{4.2}{0.8}\cdot6u(1-u)>0 for 0<t<0.80<t<0.8, so RR increases. R(0.5)=4.2 Ec(0.625)≈4.2(0.6836)≈2.871<3R(0.5)=4.2\,E_c(0.625)\approx4.2(0.6836)\approx2.871<3 and R(0.55)=4.2 Ec(0.6875)≈4.2(0.7681)≈3.226>3R(0.55)=4.2\,E_c(0.6875)\approx4.2(0.7681)\approx3.226>3. RR is continuous, so by the Intermediate Value Theorem R=3R=3 at some tt in (0.5, 0.55)(0.5,\,0.55), and because RR is increasing, at exactly one. From that moment the sight line is blocked. Module 15’s Newton’s method pins it down: t≈0.518t\approx0.518 s.

Back to M14.21

Spaced review answers#

1. Both endpoints, every interior xx where f′(x)=0f'(x)=0, and every interior xx where f′(x)f'(x) does not exist. 2.  d dx[x e−x]=e−x−x e−x=e−x(1−x)\tfrac{\dd}{\dd x}\bigl[x\,e^{-x}\bigr]=e^{-x}-x\,e^{-x}=e^{-x}(1-x). 3. 12x2(x−1)=012x^2(x-1)=0, so x=0x=0 or x=1x=1.

Faded example answer#

Move 4: the chain rule gives  d dx4−x2=−x4−x2\tfrac{\dd}{\dd x}\sqrt{4-x^2}=\dfrac{-x}{\sqrt{4-x^2}}, so A′(x)=24−x2+2x⋅−x4−x2=2(4−x2)−2x24−x2=8−4x24−x2A'(x)=2\sqrt{4-x^2}+2x\cdot\dfrac{-x}{\sqrt{4-x^2}}=\dfrac{2(4-x^2)-2x^2}{\sqrt{4-x^2}}=\dfrac{8-4x^2}{\sqrt{4-x^2}}, zero at x=2x=\sqrt2; the endpoints give A(0)=A(2)=0A(0)=A(2)=0. Move 5: A(2)=22⋅2=4A(\sqrt2)=2\sqrt2\cdot\sqrt2=4, so the best rectangle is 22≈2.832\sqrt2\approx2.83 wide and 2≈1.41\sqrt2\approx1.41 tall, twice as wide as it is tall.

I. Retention and readiness#

Return to M13.03 and M09.08. Explain the distinct meanings of f=0f=0, f′=0f'=0, and f′′=0f''=0. Advance when you can derive a feasible objective from an unfamiliar word problem and justify its global optimum, not merely report a critical input.