Optimization, linear approximation and differentials
Turning a word problem into a single-variable function and finding its maximum/minimum, approximating with the tangent line, and estimating error with differentials. The classic word problem of the final.
The most “applied” week of Calculus I. In an optimization problem you turn a word situation into a function and find the best value with the extrema knowledge of week 8. Linear approximation is the use of the derivative’s idea “the tangent line is close to the function” for estimating numbers without a calculator. Differentials are the application of the same idea to error computation. Things to keep in mind:
- In optimization the hard part is not the derivative, it is setting up the function. Objective function + constraint.
- Use the constraint to reduce to one variable. You cannot differentiate a function of two variables.
- Show that the point you found is a max or a min. The endpoints or the test.
- Linear approximation = the tangent line. .
- is the change along the tangent, is the actual change.
Optimization problems
The six-step method
1. Draw a figure, name the variables, write the units.
2. Objective function: what are you maximizing/minimizing? (area, volume, cost, distance)
3. Constraint: the information linking the variables (perimeter 600, volume 4000...)
4. Solve the constraint for one variable, substitute into the objective -> a single-variable f(x).
5. Write the interval that makes physical sense (such as length > 0).
6. Solve f'(x) = 0; verify that it is a max/min with the endpoints or with f''.
Example 1 (pen). A rectangular area will be enclosed with m of fence and divided into two equal compartments by a fence parallel to one side. Maximize the total area.
Let the dividing fence be parallel to the sides of length . Then there are three fences of length (two outer sides and the divider), and two fences of length :
Which side you choose to be the triple one does not change the result; only the labels swap. Drawing the figure and counting the fences one by one prevents errors at this step.
. , max. . The largest area is m².
Example 2 (material). The least material for a box with a square base, an open top and a volume of cm³.
base side x, height h
objective: S = x^2 + 4xh (base + 4 side faces, no top)
constraint: x^2 h = 4000 -> h = 4000 / x^2
S(x) = x^2 + 16000 / x, x > 0
S'(x) = 2x - 16000 / x^2 = 0 -> x^3 = 8000 -> x = 20
S''(x) = 2 + 32000 / x^3 > 0 -> minimum
h = 4000 / 400 = 10, S = 400 + 800 = 1200 cm^2
On an open interval () there are no endpoints. Since there is a single critical point and , this local min is also the absolute min. Write this sentence on the exam.
PITFALL · not checking whether it is a max or a min. gives a candidate. Before writing the answer, either compare with the endpoint values or show the sign of . For example in the wire problem (Question 12) the critical point gives the minimum; the maximum is at an endpoint, when all the wire goes to the circle.
TIP · use the square for distances. Instead of , minimize . The square root is an increasing function, and the smallest and the smallest are at the same point. The derivative is much shorter.
Linear approximation
If is differentiable at , then for near the graph is very close to the tangent line:
is called the linearization of at . Choose as a point close to the target number for which you can compute and in your head.
Example 3. Estimating . , : , .
Commonly used approximations ( near zero, ):
| Function | Approximation |
|---|---|
Example 4. . The true value is . The error is of the order of the square of .
Over or under? If (concave down), the graph stays below the tangent and overestimates (as for ). If , it underestimates (as for ).
Differentials
For , is an independent variable (a small increment), and
is the rise along the tangent line. The actual change is . When is small, .
Example 5. , , : , . The difference is exactly .
Error estimation
If you measure one quantity and compute another from it, the measurement error propagates to the computed value. The differential estimates it.
Example 6. The edge of a cube is cm, with a measurement error of cm.
V = x^3 dV = 3x^2 dx = 3 · 100 · 0.1 = 30 cm^3 (absolute error)
relative error = dV / V = 30 / 1000 = 0.03 (3 percent)
shortcut: dV / V = 3 · dx / x = 3 · 0.01 = 0.03
General rule: if , then . The larger the power, the larger the relative error.
PITFALL · confusing and . If the question says “use differentials to estimate”, compute . If it says “find the actual change”, compute . They may ask for both together and also ask for the difference.
Common mistakes
| Wrong thinking | Correct |
|---|---|
| Differentiating a function of two variables | First reduce to one variable with the constraint |
| Finding the critical point and calling it the max | Verify with the endpoints or |
| Not writing the domain interval | Length ; limits such as the cut-out square |
| Counting fence along the river too | Don’t include a side that isn’t in the problem |
| Differentiating the distance with its root | Minimize |
| The slope is , a constant number | |
| Choosing far from the target number | for , for |
| in error computation | ; don’t forget to multiply by |
| Not converting the relative error to a percentage | = |
Test yourself
Exam-style questions. Solve them on paper first, then reveal the answer.
Find two positive numbers whose sum is such that the product of one number and the square of the other is as large as possible.
Show answer
, . Use the constraint: , , . . , at it is : max. , .
An open-top box is made from a cm sheet by cutting equal squares of side from the corners and folding up the sides. Find that maximizes the volume, and the maximum volume.
Show answer
, . . : (endpoint, ) or . cm³. The volume is at the endpoints, so the max is at .
A farmer has m of fencing to enclose a rectangular field along a straight river. No fence is needed along the river. Find the dimensions that maximize the area.
Show answer
Let the two sides perpendicular to the river be and the parallel side : . . , . : max. m².
A closed cylindrical can must hold cm³. Find the radius and height that minimize the total surface area.
Show answer
Constraint: . Surface: . . : min. cm. The height equals the diameter.
Find the point on the curve that is closest to the point .
Show answer
Minimize the square of the distance (the minimum is at the same point without the root): . Derivative: . The second derivative is : min. The point is , , .
Find the linearization of at and use it to approximate .
Show answer
, , . . . The true value is ; since is concave down, the tangent overestimates a little.
Use a linear approximation to estimate .
Show answer
, (the nearest number whose cube root is known). , , . . True: .
For , compute and when and .
Show answer
. True change: . The difference is , of the order of .
The radius of a sphere is measured as cm with a possible error of cm. Use differentials to estimate the maximum error in the computed volume, and the relative error.
Show answer
cm³. Relative error: , that is . A error in the radius triples in the volume.
Find the linearization of at and use it to estimate .
Show answer
, , . . . . True: .
A rectangle has its base on the -axis and its two upper vertices on the parabola . Find the largest possible area.
Show answer
By symmetry the upper vertices are , . The base is and the height is : . . : max. .
A cm wire is cut into two pieces. One piece is bent into a square and the other into a circle. How much wire should be used for the square to minimize the total area?
Show answer
Use cm for the square: side , area . for the circle: radius , area . , . . : min. (The max is at an endpoint: all the wire to the circle, .)
Verification: All answers were checked with node (verify/MAT1051/10.mjs): the optimization functions were scanned at 200000 points on the allowed interval and the location and value of the maximum/minimum were compared; linear approximations with the true value, differentials with a numerical derivative and the true Δy.