Appearance
5.P — Worked Problems: Calculus
Sixteen problems covering limits, differentiation, optimisation, every standard integration technique, multivariable calculus and series. Every formula used is derived in the chapter that introduces it.
Problem 1 — A limit that substitution cannot do
Evaluate \displaystyle\lim_{x\to3}\frac{x^2-9}{x-3} and \displaystyle\lim_{x\to0}\frac{\sqrt{x+4}-2}{x}.
Solution
Part (a). Substituting x=3 gives \frac{0}{0}, which is not a number — it is a signal that the top and bottom share a factor that must be removed.
Step 1 — factorise the top with the difference of two squares:
\frac{x^2-9}{x-3} = \frac{(x-3)(x+3)}{x-3}
Step 2 — cancel. This is legal because a limit never evaluates at x=3; it only looks at values nearby, where x-3 is genuinely non-zero.
= x+3
Step 3 — now substitute.
\lim_{x\to3}(x+3) = 6
Part (b). Again \frac00. There is nothing to factorise, so use the conjugate trick from 2.1 — what algebra is: multiply top and bottom by \sqrt{x+4}+2.
\frac{\sqrt{x+4}-2}{x}\times\frac{\sqrt{x+4}+2}{\sqrt{x+4}+2} = \frac{(x+4)-4}{x\left(\sqrt{x+4}+2\right)}
The top collapses because (\sqrt A - 2)(\sqrt A + 2) = A - 4:
= \frac{x}{x\left(\sqrt{x+4}+2\right)} = \frac{1}{\sqrt{x+4}+2}
Now substitute x=0:
= \frac{1}{2+2} = \frac14
Answers: 6 and \frac14.
Check part (b) with L'Hôpital, since it is a genuine \frac00: differentiate top and bottom separately. The top's derivative is \frac{1}{2\sqrt{x+4}}, the bottom's is 1, and at x=0 that is \frac{1}{4} ✓
Problem 2 — Differentiating from the definition
Find the derivative of f(x) = \frac{1}{x} using only the limit definition.
Solution
Step 1 — write the difference quotient.
f'(x) = \lim_{h\to0}\frac{\frac{1}{x+h}-\frac1x}{h}
Step 2 — combine the two fractions on top over the common denominator x(x+h):
\frac1{x+h}-\frac1x = \frac{x - (x+h)}{x(x+h)} = \frac{-h}{x(x+h)}
Step 3 — divide by h, which means multiplying by \frac1h:
\frac{-h}{x(x+h)}\cdot\frac1h = \frac{-1}{x(x+h)}
The h cancels, which is always the goal — until it does, the limit cannot be taken.
Step 4 — let h\to0.
f'(x) = \frac{-1}{x\cdot x} = -\frac{1}{x^2}
Answer: -\dfrac{1}{x^2}.
Check against the power rule. \frac1x = x^{-1}, so the rule gives (-1)x^{-2} = -\frac1{x^2} ✓
What to notice. The negative sign says the curve is falling everywhere, on both sides of zero. And the x^2 on the bottom says the fall is savage near zero and gentle far out — at x=0.1 the slope is -100, at x=10 it is -0.01.
Problem 3 — All three rules in one function
Differentiate y = \dfrac{x^2\sin x}{e^{3x}}.
Solution
Step 1 — decide the structure. This is a quotient whose top is itself a product and whose bottom needs the chain rule. Handle the inner pieces first.
Step 2 — the top, by the product rule. With u = x^2 and v = \sin x:
\frac{d}{dx}\left(x^2\sin x\right) = 2x\sin x + x^2\cos x
Step 3 — the bottom, by the chain rule. The outside is e^{(\cdot)} and the inside is 3x whose derivative is 3:
\frac{d}{dx}e^{3x} = 3e^{3x}
Step 4 — the quotient rule, \frac{f'g-fg'}{g^2}:
y' = \frac{\left(2x\sin x + x^2\cos x\right)e^{3x} - x^2\sin x\cdot 3e^{3x}}{\left(e^{3x}\right)^2}
Step 5 — simplify. Every term on top has a factor e^{3x}, and the bottom is e^{6x}, so one e^{3x} cancels:
y' = \frac{2x\sin x + x^2\cos x - 3x^2\sin x}{e^{3x}}
Step 6 — factor out x to leave it tidy:
y' = \frac{x\left(2\sin x + x\cos x - 3x\sin x\right)}{e^{3x}}
Answer: y' = \dfrac{x\left(2\sin x + x\cos x - 3x\sin x\right)}{e^{3x}}.
The easier route worth knowing. Rewrite y = x^2\sin x\cdot e^{-3x} first, and it becomes a triple product with no quotient rule at all:
y' = 2x\sin x\,e^{-3x} + x^2\cos x\,e^{-3x} + x^2\sin x\left(-3e^{-3x}\right)
which is the same answer. Moving a factor from the bottom to the top with a negative exponent almost always saves work.
Problem 4 — Implicit differentiation
Find \frac{dy}{dx} for x^3 + y^3 = 6xy (the folium of Descartes), and the tangent line at (3,3).
Solution
Step 1 — differentiate every term with respect to x. Whenever a y is differentiated, the chain rule attaches \frac{dy}{dx}, because y is a function of x even though we cannot write it out.
- \frac{d}{dx}x^3 = 3x^2
- \frac{d}{dx}y^3 = 3y^2\frac{dy}{dx}
- \frac{d}{dx}(6xy) = 6y + 6x\frac{dy}{dx} — the product rule, since both factors vary
3x^2 + 3y^2\frac{dy}{dx} = 6y + 6x\frac{dy}{dx}
Step 2 — collect the \frac{dy}{dx} terms on one side.
3y^2\frac{dy}{dx} - 6x\frac{dy}{dx} = 6y - 3x^2
Step 3 — factor and divide.
\frac{dy}{dx}\left(3y^2-6x\right) = 6y-3x^2 \quad \Rightarrow \quad \frac{dy}{dx} = \frac{6y-3x^2}{3y^2-6x} = \frac{2y-x^2}{y^2-2x}
Step 4 — evaluate at (3,3).
\frac{dy}{dx} = \frac{2(3)-9}{9-2(3)} = \frac{6-9}{9-6} = \frac{-3}{3} = -1
Step 5 — the tangent line through (3,3) with slope -1:
y - 3 = -1(x-3) \quad \Rightarrow \quad y = -x + 6
Answers: \frac{dy}{dx} = \frac{2y-x^2}{y^2-2x}, tangent y = 6-x.
Check the point is on the curve: 27+27 = 54 and 6(3)(3) = 54 ✓
What to notice. This curve cannot be written as y = f(x) — it loops back on itself, so some x values have three y values. Implicit differentiation does not care. It gives the slope at any point on the curve without ever needing a formula for y.
Problem 5 — An optimisation problem with a real answer
A cylindrical tin must hold 500 ml. What radius and height use the least metal?
Solution
Step 1 — write what you want to minimise. The metal used is the total surface area: two circular ends plus the curved side.
A = 2\pi r^2 + 2\pi rh
Step 2 — use the constraint to remove one variable. The volume is fixed at 500 cm³ (1 ml = 1 cm³):
\pi r^2h = 500 \quad \Rightarrow \quad h = \frac{500}{\pi r^2}
Step 3 — substitute, so A depends on r alone.
A(r) = 2\pi r^2 + 2\pi r\cdot\frac{500}{\pi r^2} = 2\pi r^2 + \frac{1000}{r}
The \pi and one r cancel in the second term, which is why this substitution is worth doing carefully.
Step 4 — differentiate and set to zero. Write the second term as 1000r^{-1} so the power rule applies:
A'(r) = 4\pi r - \frac{1000}{r^2}
4\pi r = \frac{1000}{r^2} \quad \Rightarrow \quad 4\pi r^3 = 1000 \quad \Rightarrow \quad r^3 = \frac{250}{\pi} = 79.577
r = \sqrt[3]{79.577} = 4.301 \text{ cm}
Step 5 — confirm it is a minimum, not a maximum.
A''(r) = 4\pi + \frac{2000}{r^3}
Both terms are positive for any positive r, so A'' > 0 and the point is a minimum ✓
Step 6 — find the height.
h = \frac{500}{\pi(4.301)^2} = \frac{500}{58.14} = 8.601 \text{ cm}
Answers: radius 4.30 cm, height 8.60 cm, using 348.7 cm² of metal.
The result worth remembering. h = 8.601 and 2r = 8.602. The optimal tin is exactly as tall as it is wide — the height equals the diameter. That is true for every volume, and you can prove it in general: substituting r^3 = \frac{V}{2\pi} into h = \frac{V}{\pi r^2} always gives h = 2r.
Why real tins are not that shape. Look at a tin of beans and it is taller and narrower than this. The reasons are outside the mathematics: the two ends need a seam and a folded rim, so they cost more per square centimetre than the side; tins must fit shelves and hands; and printing wraps around the side. The model minimises area, and area is not quite the same as cost. That gap between the optimum and the real product is worth noticing in every applied problem.
Problem 6 — Related rates
A 5 m ladder slides down a wall. When the foot is 3 m from the wall it is sliding away at 0.4 m/s. How fast is the top falling?
Solution
Step 1 — name the varying quantities. Let x be the distance from the wall to the foot, and y the height of the top. Both change with time; the ladder's length does not.
Step 2 — write the relationship that always holds.
x^2 + y^2 = 25
Step 3 — differentiate both sides with respect to time. Every term needs the chain rule, since x and y are functions of t:
2x\frac{dx}{dt} + 2y\frac{dy}{dt} = 0
The right side is zero because 25 is constant — the ladder does not stretch.
Step 4 — put in the numbers for this instant. We know x = 3 and \frac{dx}{dt} = 0.4. We need y, from the original relationship:
y = \sqrt{25-9} = 4
2(3)(0.4) + 2(4)\frac{dy}{dt} = 0
2.4 + 8\frac{dy}{dt} = 0 \quad \Rightarrow \quad \frac{dy}{dt} = -0.3 \text{ m/s}
Answer: the top is falling at 0.3 m/s. The minus sign is the answer telling you the height is decreasing — exactly as it should, and a positive answer here would have meant an error.
What to notice — and it is genuinely alarming. Redo the calculation at x = 4.9, where y = \sqrt{25-24.01} = 0.995:
\frac{dy}{dt} = -\frac{x}{y}\frac{dx}{dt} = -\frac{4.9}{0.995}(0.4) = -1.97 \text{ m/s}
And as y\to0 the speed tends to infinity. A real ladder cannot do this, which tells you the model has broken: the assumption that the foot keeps sliding at a constant rate stops being physically possible near the end. A model that predicts infinity is a model whose assumptions have expired, and noticing that is more valuable than the arithmetic.
Problem 7 — Substitution
Evaluate \displaystyle\int_0^{\pi/2}\sin^3x\cos x\,dx.
Solution
Step 1 — spot the pattern. There is a function of \sin x multiplied by \cos x, and \cos x is exactly the derivative of \sin x. That is the signal for substitution.
Step 2 — substitute.
u = \sin x, \qquad du = \cos x\,dx
Step 3 — change the limits too, so there is no need to convert back at the end:
- when x = 0: u = \sin 0 = 0
- when x = \frac\pi2: u = \sin\frac\pi2 = 1
Step 4 — rewrite the whole integral in u.
\int_0^{\pi/2}\sin^3x\cos x\,dx = \int_0^{1}u^3\,du
Step 5 — integrate and evaluate.
= \left[\frac{u^4}{4}\right]_0^1 = \frac14 - 0 = \frac14
Answer: \frac14.
Sanity check. The integrand is positive on (0,\frac\pi2) and never exceeds about 0.325 (its maximum, at \sin^2x = \frac34), over an interval of width 1.571. So the answer must be positive and comfortably below 0.51. And 0.25 is ✓
Problem 8 — Integration by parts, twice
Evaluate \displaystyle\int x^2 e^{x}\,dx.
Solution
Step 1 — choose u to be the part that simplifies when differentiated. x^2 becomes 2x becomes 2 becomes 0; e^x never changes. So u = x^2 and dv = e^x dx.
u = x^2 \Rightarrow du = 2x\,dx, \qquad dv = e^xdx \Rightarrow v = e^x
Step 2 — apply \int u\,dv = uv - \int v\,du.
\int x^2e^xdx = x^2e^x - \int 2xe^xdx
The new integral is easier — the power dropped from 2 to 1. That is the sign of a good choice.
Step 3 — do it again on the new integral. Now u = 2x, dv = e^xdx:
\int 2xe^xdx = 2xe^x - \int 2e^xdx = 2xe^x - 2e^x
Step 4 — put it back together, watching the sign.
\int x^2e^xdx = x^2e^x - \left(2xe^x - 2e^x\right) = x^2e^x - 2xe^x + 2e^x + C
Step 5 — factor.
= e^x\left(x^2-2x+2\right)+C
Answer: e^x(x^2-2x+2)+C.
Check by differentiating, which is the only check worth doing on an integral:
\frac{d}{dx}\left[e^x(x^2-2x+2)\right] = e^x(x^2-2x+2) + e^x(2x-2) = e^x\left(x^2-2x+2+2x-2\right) = x^2e^x \; ✓
What to notice. \int x^ne^xdx always needs n rounds of parts, and the answer is always e^x times a polynomial of degree n with alternating signs. Recognising the pattern saves the work the second time you meet it.
Problem 9 — Partial fractions inside an integral
Evaluate \displaystyle\int\frac{3x+1}{x^2-x-2}\,dx.
Solution
Step 1 — factorise the bottom. Two numbers multiplying to -2 and adding to -1 are -2 and +1:
x^2-x-2 = (x-2)(x+1)
Step 2 — split into partial fractions.
\frac{3x+1}{(x-2)(x+1)} = \frac{A}{x-2}+\frac{B}{x+1}
Multiply through by (x-2)(x+1):
3x+1 = A(x+1) + B(x-2)
Step 3 — choose values that kill one term at a time.
Put x=2: \;7 = 3A, so A = \frac73.
Put x=-1: \;-2 = -3B, so B = \frac23.
Step 4 — integrate each simple piece. Each is of the form \int\frac{k}{x-a}dx = k\ln|x-a|:
\int\frac{7/3}{x-2}dx + \int\frac{2/3}{x+1}dx = \frac73\ln|x-2| + \frac23\ln|x+1| + C
Answer: \frac73\ln\lvert x-2\rvert + \frac23\ln\lvert x+1\rvert + C.
Check by differentiating.
\frac{7}{3(x-2)}+\frac{2}{3(x+1)} = \frac{7(x+1)+2(x-2)}{3(x-2)(x+1)} = \frac{7x+7+2x-4}{3(x^2-x-2)} = \frac{9x+3}{3(x^2-x-2)} = \frac{3x+1}{x^2-x-2} \; ✓
The absolute-value bars matter. \ln is undefined for negative numbers, but the integral \int\frac{dx}{x-2} makes perfect sense for x<2. The bars are what make the formula valid on both sides of the break.
Problem 10 — Trigonometric substitution
Evaluate \displaystyle\int\frac{dx}{\sqrt{9-x^2}}.
Solution
Step 1 — match the pattern. The form \sqrt{a^2-x^2} with a = 3 calls for x = a\sin\theta.
x = 3\sin\theta, \qquad dx = 3\cos\theta\,d\theta
Step 2 — simplify the root, which is the whole reason for the substitution:
\sqrt{9-x^2} = \sqrt{9-9\sin^2\theta} = \sqrt{9\left(1-\sin^2\theta\right)} = \sqrt{9\cos^2\theta} = 3\cos\theta
The Pythagorean identity turned the root into something with no root left in it.
Step 3 — substitute everything.
\int\frac{3\cos\theta\,d\theta}{3\cos\theta} = \int d\theta = \theta + C
Step 4 — convert back to x. From x = 3\sin\theta we get \sin\theta = \frac x3, so \theta = \arcsin\frac x3.
= \arcsin\frac{x}{3}+C
Answer: \arcsin\dfrac x3 + C.
Check by differentiating, using the chain rule on the arcsine:
\frac{d}{dx}\arcsin\frac x3 = \frac{1}{\sqrt{1-\frac{x^2}{9}}}\cdot\frac13 = \frac{1}{3\sqrt{\frac{9-x^2}{9}}} = \frac{1}{3\cdot\frac{\sqrt{9-x^2}}{3}} = \frac{1}{\sqrt{9-x^2}} \; ✓
Problem 11 — Area and volume from the same region
The region bounded by y = x^2 and y = 2x is rotated about the x-axis. Find its area and the volume of the solid.
Solution
Step 1 — find where the curves meet.
x^2 = 2x \quad \Rightarrow \quad x^2-2x = 0 \quad \Rightarrow \quad x(x-2)=0 \quad \Rightarrow \quad x = 0,\ 2
Step 2 — decide which curve is on top. Test at x=1: the line gives y=2, the parabola gives y=1. The line is above.
Step 3 — the area, upper minus lower.
A = \int_0^2\left(2x - x^2\right)dx = \left[x^2 - \frac{x^3}{3}\right]_0^2 = \left(4 - \frac83\right) - 0 = \frac{12-8}{3} = \frac43
Step 4 — the volume, by washers. Rotating the gap between two curves gives a disc with a hole, so subtract the inner area from the outer at each slice:
V = \pi\int_0^2\left[(2x)^2 - (x^2)^2\right]dx = \pi\int_0^2\left(4x^2-x^4\right)dx
The trap to avoid: it is \int(R^2 - r^2), not \int(R-r)^2. Squaring the difference is not the difference of the squares.
= \pi\left[\frac{4x^3}{3}-\frac{x^5}{5}\right]_0^2 = \pi\left(\frac{32}{3}-\frac{32}{5}\right)
Common denominator 15:
= \pi\left(\frac{160-96}{15}\right) = \frac{64\pi}{15}
Answers: area \frac43 \approx 1.333, volume \frac{64\pi}{15}\approx 13.40.
Sanity check on the volume. The solid sits inside the cone swept by the line y=2x, whose volume is \frac13\pi r^2h with r = 4 and h=2, giving \frac{32\pi}{3} = 33.5. Ours is less, since a hole was removed ✓
Problem 12 — Arc length
Find the length of y = \frac{2}{3}x^{3/2} from x=0 to x=3.
Solution
Step 1 — differentiate.
\frac{dy}{dx} = \frac23\cdot\frac32 x^{1/2} = x^{1/2} = \sqrt x
The coefficient was chosen precisely so this comes out clean, which is why this curve appears in textbooks.
Step 2 — put it into the arc-length formula.
L = \int_0^3\sqrt{1+\left(\sqrt x\right)^2}\,dx = \int_0^3\sqrt{1+x}\,dx
Step 3 — integrate, using u = 1+x, du = dx, with limits running from 1 to 4:
= \int_1^4 u^{1/2}du = \left[\frac{2}{3}u^{3/2}\right]_1^4 = \frac23\left(4^{3/2} - 1^{3/2}\right)
Now 4^{3/2} = \left(\sqrt4\right)^3 = 8:
= \frac23(8-1) = \frac{14}{3} = 4.667
Answer: \frac{14}{3} \approx 4.67.
Check for reasonableness. The straight line from (0,0) to (3, 2\sqrt3) = (3, 3.464) has length \sqrt{9+12} = 4.583. The curve must be longer than the chord joining its ends, and 4.667 > 4.583 ✓ — only slightly longer, because the curve is not far from straight over this range.
Why arc-length problems are rare in textbooks. The \sqrt{1+(y')^2} almost never integrates in closed form. For y = x^2 it needs a hyperbolic substitution; for an ellipse it cannot be done at all in elementary functions, which is how the entire subject of elliptic integrals began. Curves that work out neatly are chosen for that reason.
Problem 13 — Partial derivatives and a saddle
For f(x,y) = x^3 + y^3 - 3xy, find all critical points and classify them.
Solution
Step 1 — the first partial derivatives. Differentiating with respect to x treats y as a constant, so y^3 vanishes and -3xy gives -3y:
f_x = 3x^2 - 3y, \qquad f_y = 3y^2-3x
Step 2 — set both to zero.
3x^2 = 3y \Rightarrow y = x^2
3y^2 = 3x \Rightarrow x = y^2
Step 3 — solve the pair. Substitute the first into the second:
x = \left(x^2\right)^2 = x^4 \quad \Rightarrow \quad x^4 - x = 0 \quad \Rightarrow \quad x\left(x^3-1\right) = 0
x = 0 \text{ or } x = 1
With y = x^2, the critical points are (0,0) and (1,1).
Step 4 — the second partial derivatives.
f_{xx} = 6x, \qquad f_{yy} = 6y, \qquad f_{xy} = -3
Step 5 — apply the test D = f_{xx}f_{yy} - f_{xy}^2.
At (0,0):
D = (0)(0) - (-3)^2 = -9 < 0 \quad \Rightarrow \quad \textbf{saddle point}
At (1,1):
D = (6)(6) - 9 = 27 > 0, \qquad f_{xx} = 6 > 0 \quad \Rightarrow \quad \textbf{local minimum}
Answers: (0,0) is a saddle; (1,1) is a local minimum, with f(1,1) = 1+1-3 = -1.
What a saddle means, concretely. At (0,0), walking along the line y=x gives f = 2x^3 - 3x^2, which decreases as you leave the origin in the positive direction. Walking along y = -x gives f = 3x^2, which increases. Uphill one way, downhill another — the shape of a horse's saddle, or a mountain pass. This is why "the gradient is zero" is not the same as "this is the best point", and why optimisation algorithms in high dimensions spend most of their trouble on saddles rather than on minima.
Problem 14 — Lagrange multipliers
Find the largest area of a rectangle inscribed in the ellipse \frac{x^2}{9}+\frac{y^2}{4}=1.
Solution
Step 1 — set up. By symmetry the rectangle has corners at (\pm x, \pm y), so its sides are 2x and 2y:
\text{maximise } f(x,y) = 4xy \quad \text{subject to } g(x,y) = \frac{x^2}{9}+\frac{y^2}{4} = 1
Step 2 — write \nabla f = \lambda\nabla g.
f_x = 4y, \quad f_y = 4x, \qquad g_x = \frac{2x}{9}, \quad g_y = \frac{y}{2}
4y = \lambda\frac{2x}{9}, \qquad 4x = \lambda\frac{y}{2}
Step 3 — eliminate \lambda by dividing one equation by the other:
\frac{4y}{4x} = \frac{\lambda\frac{2x}{9}}{\lambda\frac y2} = \frac{2x}{9}\cdot\frac{2}{y} = \frac{4x}{9y}
Cross-multiply:
\frac{y}{x} = \frac{4x}{9y} \quad \Rightarrow \quad 9y^2 = 4x^2 \quad \Rightarrow \quad y^2 = \frac{4x^2}{9}
Step 4 — put that into the constraint.
\frac{x^2}{9} + \frac{4x^2/9}{4} = 1 \quad \Rightarrow \quad \frac{x^2}{9}+\frac{x^2}{9} = 1 \quad \Rightarrow \quad \frac{2x^2}{9} = 1
x^2 = 4.5 \quad \Rightarrow \quad x = \frac{3}{\sqrt2} = 2.121
And then y^2 = \frac{4(4.5)}{9} = 2, so y = \sqrt2 = 1.414.
Step 5 — the area.
A = 4xy = 4(2.121)(1.414) = 12
Answer: the maximum area is 12, from a rectangle 4.243 by 2.828.
Check the corner is on the ellipse: \frac{4.5}{9}+\frac{2}{4} = 0.5+0.5 = 1 ✓
The pattern hiding in the answer. x = \frac{a}{\sqrt2} and y = \frac{b}{\sqrt2}, and the area is 2ab. For a circle (a=b=r) this gives the square of area 2r^2 — the largest rectangle in a circle is a square, as you would guess. The ellipse case is that square, stretched.
Problem 15 — A Taylor approximation with its error
Use a Taylor polynomial about x=0 to estimate e^{0.5} to four decimal places, and say how many terms are needed.
Solution
Step 1 — write the series.
e^x = 1 + x + \frac{x^2}{2!}+\frac{x^3}{3!}+\frac{x^4}{4!}+\cdots
Step 2 — put in x=0.5 and accumulate the terms.
| n | term \frac{0.5^n}{n!} | running total |
|---|---|---|
| 0 | 1 | 1 |
| 1 | 0.5 | 1.5 |
| 2 | 0.125 | 1.625 |
| 3 | 0.0208333 | 1.6458333 |
| 4 | 0.0026042 | 1.6484375 |
| 5 | 0.0002604 | 1.6486979 |
| 6 | 0.0000217 | 1.6487196 |
| 7 | 0.0000016 | 1.6487212 |
Step 3 — compare with the true value. e^{0.5} = 1.6487212707\ldots
Answer: seven terms (up to n=6) already give 1.6487196, correct to five decimal places; eight terms give 1.6487212, correct to seven.
Step 4 — bound the error without knowing the answer, which is the part that makes this a method rather than a coincidence. The remainder after the x^n term is at most
\left|R_n\right| \le \frac{M\,x^{n+1}}{(n+1)!}
where M is the largest the next derivative gets on the interval. For e^x every derivative is e^x, and on [0, 0.5] its largest value is e^{0.5} < 1.7. So after the n=4 term:
|R_4| \le \frac{1.7\times 0.5^5}{5!} = \frac{1.7\times0.03125}{120} = 0.00044
The actual error at that point was 1.6487213 - 1.6484375 = 0.00028, comfortably inside the bound ✓
What to notice. The terms shrink extremely fast because of the factorial on the bottom — by n=7 each new term is a hundred times smaller than the one before. This is why a computer can evaluate e^x, \sin x and \ln x to full precision with a handful of multiplications and no special hardware, and it is exactly what happens when you press the button.
Problem 16 — Everything at once
A drug is injected so that its concentration in the blood is C(t) = 5te^{-0.4t} mg/l, with t in hours. Find when the concentration peaks, what the peak is, the average concentration over the first 6 hours, and the total exposure over all time.
Solution
Step 1 — the peak, by differentiating. Use the product rule with u = 5t and v = e^{-0.4t}, whose derivative is -0.4e^{-0.4t} by the chain rule:
C'(t) = 5e^{-0.4t} + 5t\left(-0.4e^{-0.4t}\right) = 5e^{-0.4t}\left(1 - 0.4t\right)
Step 2 — set it to zero. The factor 5e^{-0.4t} is never zero, so the only solution comes from the bracket:
1 - 0.4t = 0 \quad \Rightarrow \quad t = 2.5 \text{ hours}
Step 3 — confirm it is a maximum without computing the second derivative: for t<2.5 the bracket is positive so C is rising; for t>2.5 it is negative so C is falling. Rising then falling is a maximum ✓
Step 4 — the peak value.
C(2.5) = 5(2.5)e^{-1} = 12.5 \times 0.367879 = 4.598 \text{ mg/l}
Step 5 — the average over the first 6 hours needs the integral, which needs parts. Take u = 5t and dv = e^{-0.4t}dt, so v = \frac{e^{-0.4t}}{-0.4} = -2.5e^{-0.4t}:
\int 5te^{-0.4t}dt = 5t\left(-2.5e^{-0.4t}\right) - \int\left(-2.5e^{-0.4t}\right)5\,dt
= -12.5te^{-0.4t} + 12.5\int e^{-0.4t}dt
= -12.5te^{-0.4t} - 31.25e^{-0.4t} + K
= -e^{-0.4t}\left(12.5t + 31.25\right)+K
Step 6 — evaluate from 0 to 6.
At t=6: e^{-2.4} = 0.0907180, and 12.5(6)+31.25 = 106.25, so the value is -0.0907180\times106.25 = -9.6388.
At t=0: e^0 = 1 and the bracket is 31.25, so the value is -31.25.
\int_0^6 C\,dt = -9.6388 - (-31.25) = 21.611
\text{average} = \frac{21.611}{6} = 3.602 \text{ mg/l}
Step 7 — total exposure over all time, an improper integral:
\int_0^\infty C\,dt = \lim_{b\to\infty}\left[-e^{-0.4t}(12.5t+31.25)\right]_0^b
As b\to\infty, the exponential e^{-0.4b} shrinks to zero far faster than 12.5b grows, so the whole product goes to zero. Only the lower limit survives:
= 0 - (-31.25) = 31.25 \text{ mg·h/l}
Answers: peaks at 2.5 h at 4.60 mg/l; average over 6 h is 3.60 mg/l; total exposure 31.25 mg·h/l.
What the last number is called and why it matters. That total is the area under the curve, and in pharmacology it is the single most important number about a dose: it measures the body's total exposure to the drug, which is what determines both the effect and the toxicity. The peak matters for side effects, the timing matters for dosing intervals, and the area matters for whether the drug works at all. All three came from this one function, using a derivative for the first and an integral for the last — which is the whole of Part 5 in one problem.
Next: Part 6 — Differential Equations, where the derivative becomes the unknown and the answer is a function rather than a number.