Grade by Grade
B. Derivatives and Their Applications · Applications of Derivatives: Motion, Rates and Optimization

Optimization: Time, Distance and Exponential Models

B2.4About 70 minutes
Learning goals
  • I can write a total time or a distance as a function of one variable and minimize it.
  • I can find when two moving objects are closest.
  • I can optimize models that involve exponential functions, using the product rule.
  • I can recognize when the best answer is at an endpoint of the domain.

Words to know

time = distance ÷ speed
The relation used to build time functions for trips in parts.
distance formula
d = √((x₂ − x₁)² + (y₂ − y₁)²).
present value
A future amount expressed in today's dollars, for example V(t)e^(−rt).
closest approach
The moment when two moving objects are nearest to each other.

Fastest isn't always straightest

You are in a canoe on a lake in cottage country, 2 km from a straight shoreline. Your cottage is on the shore, 6 km along from the nearest point. You can paddle at 4 km/h and walk the shore path at 5 km/h. Should you paddle straight to the cottage? Paddle straight to shore and walk the whole way? Or something in between?

This lesson collects optimization problems about time and distance, plus a few that use exponential and rational models. The method is the same as before. What changes is how you build the function.

Useful formulas

  • time = distance ÷ speed. For a trip in two parts, add the two times.
  • Distance between two points: d = √((x₂ − x₁)² + (y₂ − y₁)²).
  • Minimize D² instead of D. Since D ≥ 0, D is smallest exactly when D² is smallest, and D² has no square root to differentiate. (This trick does not work for a sum of square roots, like the canoe trip's time.)
  • Moving objects: write each position as a function of t, then the distance between them as a function of t.
Worked example

Example 1: The canoe and the cottage

Paddling at 4 km/h and walking at 5 km/h, where should you land to reach the cottage (2 km offshore, 6 km along the shore) in the least time?

  1. Let x be the distance along the shore from A (the nearest point) to the landing point, 0 ≤ x ≤ 6.
  2. Paddling distance √(4 + x²); walking distance 6 − x. Time: T(x) = √(4 + x²)/4 + (6 − x)/5.
  3. T′(x) = x/(4√(4 + x²)) − 1/5.
  4. T′ = 0: 5x = 4√(4 + x²). Square: 25x² = 16(4 + x²), so 9x² = 64 and x = 8/3 ≈ 2.67 km.
  5. T(8/3) = √(4 + 64/9)/4 + (10/3)/5 = (10/3)/4 + 2/3 = 5/6 + 2/3 = 1.5 h.
  6. Endpoints: T(0) = 0.5 + 1.2 = 1.7 h; T(6) = √40/4 ≈ 1.58 h.

Land about 2.67 km along the shore from A. The trip takes 1.5 hours, faster than paddling straight to the cottage (about 1.58 h) or straight to shore (1.7 h).

lakeshore pathcanoe2 kmcottageAland herex6 − x (walk 5 km/h)√(4 + x²) (paddle 4 km/h)
The canoe trip of Example 1. Paddling is slower than walking, so it pays to cut across the water at an angle and walk the rest. (Drawn to scale.)
Worked example

Example 2: Two ships

At noon, ship A is 50 km due north of ship B. Ship A sails south at 20 km/h and ship B sails east at 15 km/h. When are they closest, and how close do they get?

  1. Put B's noon position at the origin. After t hours, A is at (0, 50 − 20t) and B is at (15t, 0).
  2. D² = (15t)² + (50 − 20t)² = 225t² + 2500 − 2000t + 400t² = 625t² − 2000t + 2500.
  3. d/dt (D²) = 1250t − 2000 = 0 at t = 1.6 h.
  4. D² = 625(2.56) − 3200 + 2500 = 1600 − 3200 + 2500 = 900, so D = 30 km. (A positive leading coefficient means this is a minimum.)

They are closest at 1.6 h after noon (1:36 p.m.), when they are 30 km apart.

B at noonA at noonA sails south, 20 km/hB sails east, 15 km/hD = 30 km at t = 1.6 h50 − 20t15t1231020304050t (h)D (km)
Left: the two ships at noon and at t = 1.6 h, when the distance between them is smallest. Right: the distance D(t). It falls, reaches 30 km at t = 1.6 h, then grows again.
Worked example

Example 3: When to harvest timber

A stand of trees is worth V(t) = 2000(1 + 0.5t) dollars t years from now. Money later is worth less than money now, so a forester compares values in today's dollars by multiplying by e^(−0.08t) (an 8% continuous discount rate). When should the trees be cut to maximize P(t) = 2000(1 + 0.5t)e^(−0.08t)?

  1. Product rule: P′(t) = 2000(0.5)e^(−0.08t) + 2000(1 + 0.5t)(−0.08)e^(−0.08t).
  2. Factor: P′(t) = 2000e^(−0.08t)[0.5 − 0.08(1 + 0.5t)] = 2000e^(−0.08t)(0.42 − 0.04t).
  3. P′ = 0 at t = 0.42/0.04 = 10.5 years. P′ > 0 before and < 0 after, so this is the maximum for t ≥ 0.
  4. P(10.5) = 2000(6.25)e^(−0.84) ≈ 12 500(0.4317) ≈ $5396, compared with P(0) = $2000.

Harvest in about 10.5 years, when the stand is worth about $5400 in today's dollars. After that, the trees grow in value more slowly than money grows in the bank.

Worked example

Example 4: Between two factories

Two factories are 10 km apart. Factory A releases 8 times as much smoke as factory B. The smoke concentration at a point between them, x km from A, is modelled by C(x) = 8k/x² + k/(10 − x)², where k > 0 is a constant. Where between them is the air cleanest?

  1. C(x) = 8kx⁻² + k(10 − x)⁻² for 0 < x < 10.
  2. C′(x) = −16kx⁻³ + 2k(10 − x)⁻³ (chain rule on the second term: the inner derivative is −1).
  3. C′ = 0: 2k/(10 − x)³ = 16k/x³, so x³ = 8(10 − x)³. Take cube roots: x = 2(10 − x), so x = 20/3 ≈ 6.67.
  4. C → ∞ near either factory, and there is only one critical number, so it is the absolute minimum.

The air is cleanest about 6.67 km from factory A (3.33 km from B), closer to the cleaner factory.

Just for fun

The canoe problem is secretly physics: light travelling from air into water bends to take the fastest path, just as you should when paddling and walking. Fermat worked this out in the 1600s, long before anyone had to get to a cottage.

Hands-on activity

The fastest way across the yard

You need: a yard, a park or a schoolyard with two surfaces (in winter, a shovelled path and deep snow; in summer, a sidewalk and grass, or "walk" versus "hop on one foot" on the same ground), a tape measure, a phone stopwatch, and a helper.

  1. Measure your speed on each surface: time yourself over 10 m on each, and divide.
  2. Set up a target 6 m along the fast surface and a start point 3 m off it, in the slow surface (or the slow mode).
  3. Write T(x) = √(9 + x²)/v_slow + (6 − x)/v_fast, and find the best x with calculus.
  4. Try three routes: straight to the target, straight to the fast surface, and your calculus route. Time each.

What to look for: the calculus route should be fastest or tied, though small timing errors can hide the difference. If the slow speed is much slower, the best route cuts to the fast surface more directly (x is smaller). You should find x/√(9 + x²) = v_slow/v_fast at the best point (see the Challenge questions).

Your turn

1

A canoeist is 3 km from shore, and her cabin is 8 km along the shore from the nearest point. She paddles at 3 km/h and walks at 5 km/h. Where should she land?

2

Car A is 10 km north of an intersection, driving south at 60 km/h. Car B leaves the intersection at the same moment, driving east at 80 km/h. When are they closest?

3

Find the maximum of f(t) = 100te^(−0.25t) for t ≥ 0.

4

Two factories 12 km apart; A releases 27 times as much smoke as B. With C(x) = 27k/x² + k/(12 − x)², where is the air cleanest?

5

Find the point on the curve y = √x closest to (4, 0).

6

A forest's value in today's dollars is P(t) = 1000(1 + t)e^(−0.1t). When should it be harvested?

7

Two lamps are 4 m apart; one is 8 times as bright. Using I(x) = 8k/x² + k/(4 − x)², x metres from the bright lamp, where is the light dimmest?

More practice: warm-up

1

Time = ?

2

Distance from (0, 0) to (x, 3)?

3

Differentiate √(x² + 9).

4

Does minimizing D² give the same x as minimizing D?

5

Differentiate te^(−t).

More practice: on your own

1

Ship A is 30 km west of ship B. A sails east at 15 km/h and B sails north at 20 km/h. Find their closest distance.

2

Redo Example 1 with the cottage only 1 km along the shore from A (paddle 4 km/h, walk 5 km/h, 2 km offshore). Where should you land?

3

A hockey-card collection is worth V(t) = 50(t + 2) dollars in t years. In today's dollars it is worth P(t) = 50(t + 2)e^(−0.1t). When should it be sold?

4

Find the points on y = x²/2 closest to (0, 3).

5

Two equal factories are 10 km apart. Use C(x) = k/x² + k/(10 − x)² to show the cleanest air is at the midpoint.

Challenge

1

In Example 1, let θ be the angle between the paddling path and the line from the canoe straight to shore. Show that at the best landing point, sin θ = (paddling speed) ÷ (walking speed).

2

A 1 m wire is cut into two pieces. One piece (length x) is bent into a square and the other into a circle. Find x that minimizes the total area, and explain where the maximum is.

3

Show that f(t) = tⁿe^(−kt) (n, k > 0) has its maximum for t > 0 at t = n/k.

Check your understanding

Quiz

1.

Why can you minimize D² instead of D?

2.

A swimmer swims at 2 km/h for √(1 + x²) km and runs at 6 km/h for (5 − x) km. Which function gives the total time?

3.

D² = 625t² − 2000t + 2500. At what time is D smallest?

4.

P(t) = 2000(1 + 0.5t)e^(−0.08t). Which expression is P′(t)?

5.

In the canoe problem with the cottage only 1 km along the shore, the critical number x = 8/3 lies outside the domain 0 ≤ x ≤ 1. What should you do?

6.

For C(x) = 8k/x² + k/(10 − x)², the cleanest point satisfies x³ = 8(10 − x)³. What is x?

For parents and teachers

Big idea (B2.4): time, distance and exponential optimization problems use the same steps as area and cost problems. Build the function carefully (time = distance ÷ speed; distance formula; exponential model), state the domain, then differentiate and test.

How to help: try the yard activity together; timing a few routes makes the canoe problem real. Ask your teen to check whether the critical number is actually inside the domain.

Common difficulties:

  • Multiplying distance by speed instead of dividing.
  • Errors with the chain rule on √(4 + x²) or (10 − x)⁻².
  • Squaring both sides when solving T′ = 0 and forgetting to check the solution.
  • Missing that the answer can be an endpoint.