Chapter 5 · Techniques of Integration

5.2 Trigonometric Substitution

Square roots of $a^2-x^2$, $a^2+x^2$ and $x^2-a^2$ disappear when $x$ becomes the side of a right triangle.

What is the area of a circle? Everyone knows the answer is $\pi r^2$, but with Calculus I alone we cannot actually prove it: the area of the upper half of the disc $x^2+y^2\le r^2$ is $\displaystyle\int_{-r}^{r}\sqrt{r^2-x^2}\,dx$, and neither substitution nor integration by parts gets anywhere with this integrand. The same square roots appear when we measure fuel in a cylindrical tank, the length of a hanging cable, the electric field near a charged rod and the orbit of a satellite.

The trick is to run substitution in reverse. Instead of naming a piece of the integrand $u$, we replace $x$ itself by a trigonometric function of a new variable $\theta$, chosen so that a Pythagorean identity swallows the square root. Geometrically, we make $x$ and $a$ two sides of a right triangle — and the square root is simply the third side.

The Three Substitutions

Each of the three Pythagorean identities matches one shape of square root: $$1-\sin^2\theta=\cos^2\theta,\qquad 1+\tan^2\theta=\sec^2\theta,\qquad \sec^2\theta-1=\tan^2\theta.$$ Multiplying by $a^2$, the substitution $x=a\sin\theta$ turns $a^2-x^2$ into $a^2\cos^2\theta$, and so on. The square root of a square is an absolute value, so we restrict $\theta$ to an interval on which the trigonometric factor is non-negative — and on which the substitution can be undone.

📐 Theorem 5.4 — Trigonometric substitution
Let $a\gt0$.
Integrand containsSubstituteRestriction on $\theta$Then
$\sqrt{a^2-x^2}$$x=a\sin\theta,\ dx=a\cos\theta\,d\theta$$-\tfrac\pi2\le\theta\le\tfrac\pi2$$\sqrt{a^2-x^2}=a\cos\theta$
$\sqrt{a^2+x^2}$$x=a\tan\theta,\ dx=a\sec^2\theta\,d\theta$$-\tfrac\pi2\lt\theta\lt\tfrac\pi2$$\sqrt{a^2+x^2}=a\sec\theta$
$\sqrt{x^2-a^2}$, with $x\ge a$$x=a\sec\theta,\ dx=a\sec\theta\tan\theta\,d\theta$$0\le\theta\lt\tfrac\pi2$$\sqrt{x^2-a^2}=a\tan\theta$
On each restricted interval the substitution is one-to-one, so $\theta=\sin^{-1}(x/a)$, $\tan^{-1}(x/a)$ or $\sec^{-1}(x/a)$ respectively, and the trigonometric factor on the right is $\ge0$, so no absolute value is needed. (For $x\le-a$ in the third row, substitute $x=-u$ to reduce to $u\ge a$.)
🧭 Problem-solving strategy — trigonometric substitution
  1. Identify the form $a^2-x^2$, $a^2+x^2$ or $x^2-a^2$ (completing the square first if there is a linear term) and read off $a$.
  2. Substitute for $x$ and for $dx$, and simplify the square root with the matching identity.
  3. Integrate the trigonometric integral in $\theta$ (the methods of 5.1).
  4. Return to $x$. Draw the reference triangle from the substitution (e.g. $\sin\theta=\tfrac xa$: opposite $x$, hypotenuse $a$) and read every trigonometric function of $\theta$ off it. For a definite integral you may instead change the limits to $\theta$-values and never go back.
Before you start, check that a plain substitution does not work: $\int x\sqrt{a^2-x^2}\,dx$ only needs $u=a^2-x^2$.
✏️ Example 1 — The sine substitution
Evaluate $\displaystyle\int\sqrt{9-x^2}\,dx$, and use the result to find the area of a disc of radius $3$.
Substitute The form is $a^2-x^2$ with $a=3$. Put $x=3\sin\theta$, $-\tfrac\pi2\le\theta\le\tfrac\pi2$; then $dx=3\cos\theta\,d\theta$ and $\sqrt{9-9\sin^2\theta}=3\cos\theta$ (since $\cos\theta\ge0$). $$\int\sqrt{9-x^2}\,dx=\int3\cos\theta\cdot3\cos\theta\,d\theta=9\int\cos^2\theta\,d\theta.$$
Integrate in $\theta$ Half-angle identity (5.1): $$9\int\cos^2\theta\,d\theta=\frac92\left(\theta+\frac{\sin2\theta}{2}\right)+C=\frac92\left(\theta+\sin\theta\cos\theta\right)+C.$$
Reference triangle $\sin\theta=\tfrac x3$: opposite side $x$, hypotenuse $3$, so the adjacent side is $\sqrt{9-x^2}$ and $\cos\theta=\tfrac{\sqrt{9-x^2}}{3}$. Also $\theta=\sin^{-1}\tfrac x3$. Hence $$\int\sqrt{9-x^2}\,dx=\frac92\sin^{-1}\frac x3+\frac x2\sqrt{9-x^2}+C.$$
Area The upper half-disc has area $\Big[\tfrac92\sin^{-1}\tfrac x3+\tfrac x2\sqrt{9-x^2}\Big]_{-3}^{3}=\tfrac92\cdot\tfrac\pi2-\tfrac92\cdot\left(-\tfrac\pi2\right)=\tfrac{9\pi}{2}$, so the disc has area $9\pi=\pi\cdot3^2$. ✓ Replacing $3$ by $r$ proves $A=\pi r^2$.
Interactive 1 — Reference-Triangle Builder: Linking $x$ and $\theta$

Pick a form. As $x$ moves, the triangle on the left is redrawn with sides $x$, $a$ and the square root, and the graph on the right shows the substitution $x=g(\theta)$ that links them. Compare the two readouts in the middle: the square root computed directly from $x$ always equals the simple trigonometric expression in $\theta$ — that is the whole point of the substitution.

2
$x$—
$\theta$ (radians / degrees)—
square root from $x$—
trig form in $\theta$—
$dx/d\theta$—
✏️ Example 2 — The tangent substitution
Evaluate $\displaystyle\int\frac{dx}{x^2\sqrt{4+x^2}}$.
Substitute Form $a^2+x^2$ with $a=2$: $x=2\tan\theta$, $dx=2\sec^2\theta\,d\theta$, $\sqrt{4+x^2}=2\sec\theta$. $$\int\frac{2\sec^2\theta\,d\theta}{4\tan^2\theta\cdot2\sec\theta}=\frac14\int\frac{\sec\theta}{\tan^2\theta}\,d\theta=\frac14\int\frac{\cos\theta}{\sin^2\theta}\,d\theta.$$
Integrate With $w=\sin\theta$: $\dfrac14\displaystyle\int w^{-2}\,dw=-\frac{1}{4w}+C=-\frac{1}{4\sin\theta}+C$.
Reference triangle $\tan\theta=\tfrac x2$: opposite $x$, adjacent $2$, hypotenuse $\sqrt{4+x^2}$, so $\sin\theta=\dfrac{x}{\sqrt{4+x^2}}$ and $$\int\frac{dx}{x^2\sqrt{4+x^2}}=-\frac{\sqrt{4+x^2}}{4x}+C.$$
Check $\dfrac{d}{dx}\left(-\dfrac{\sqrt{4+x^2}}{4x}\right)=-\dfrac14\cdot\dfrac{\frac{x^2}{\sqrt{4+x^2}}-\sqrt{4+x^2}}{x^2}=-\dfrac14\cdot\dfrac{x^2-(4+x^2)}{x^2\sqrt{4+x^2}}=\dfrac{1}{x^2\sqrt{4+x^2}}$. ✓
✏️ Example 3 — The secant substitution
Evaluate $\displaystyle\int\frac{dx}{\sqrt{x^2-25}}$ for $x\gt5$.
Substitute Form $x^2-a^2$ with $a=5$: $x=5\sec\theta$, $0\le\theta\lt\tfrac\pi2$, $dx=5\sec\theta\tan\theta\,d\theta$, $\sqrt{x^2-25}=5\tan\theta$. $$\int\frac{5\sec\theta\tan\theta}{5\tan\theta}\,d\theta=\int\sec\theta\,d\theta=\ln|\sec\theta+\tan\theta|+C\quad\text{(Theorem 5.1)}.$$
Reference triangle $\sec\theta=\tfrac x5$: hypotenuse $x$, adjacent $5$, opposite $\sqrt{x^2-25}$; so $\tan\theta=\tfrac{\sqrt{x^2-25}}{5}$ and $$\int\frac{dx}{\sqrt{x^2-25}}=\ln\left|\frac{x+\sqrt{x^2-25}}{5}\right|+C=\ln\left(x+\sqrt{x^2-25}\right)+C_1,$$ where $C_1=C-\ln5$ absorbs the constant.
Check $\dfrac{d}{dx}\ln\left(x+\sqrt{x^2-25}\right)=\dfrac{1+\frac{x}{\sqrt{x^2-25}}}{x+\sqrt{x^2-25}}=\dfrac{1}{\sqrt{x^2-25}}$. ✓
📐 Theorem 5.5 — Two standard results
For $a\gt0$: $$\int\frac{dx}{\sqrt{x^2+a^2}}=\ln\left(x+\sqrt{x^2+a^2}\right)+C\ \text{ for all }x,\qquad\int\frac{dx}{\sqrt{x^2-a^2}}=\ln\left|x+\sqrt{x^2-a^2}\right|+C\ \text{ for }|x|\gt a.$$ Together with $\displaystyle\int\frac{dx}{\sqrt{a^2-x^2}}=\sin^{-1}\frac xa+C$ ($|x|\lt a$) and $\displaystyle\int\frac{dx}{a^2+x^2}=\frac1a\tan^{-1}\frac xa+C$ — both obtained in one line by the first two substitutions — these cover every "pure" square root.

Definite Integrals: Change the Limits

For a definite integral there is no need to return to $x$: since the substitution is one-to-one on the restricted interval, we convert the $x$-limits into $\theta$-limits and evaluate in $\theta$ directly, exactly as with $u$-substitution in Calculus I.

✏️ Example 4 — Changing the limits
Evaluate $\displaystyle\int_0^1\frac{dx}{\left(1+x^2\right)^{3/2}}$.
Substitute $x=\tan\theta$, $dx=\sec^2\theta\,d\theta$, $\left(1+x^2\right)^{3/2}=\sec^3\theta$.
New limits $x=0\Rightarrow\theta=\tan^{-1}0=0$; $\ x=1\Rightarrow\theta=\tan^{-1}1=\tfrac\pi4$.
Evaluate $$\int_0^{\pi/4}\frac{\sec^2\theta}{\sec^3\theta}\,d\theta=\int_0^{\pi/4}\cos\theta\,d\theta=\Big[\sin\theta\Big]_0^{\pi/4}=\frac{\sqrt2}{2}\approx0.7071.$$
Check Going back instead: the antiderivative is $\sin\theta=\dfrac{x}{\sqrt{1+x^2}}$, and $\dfrac{1}{\sqrt2}-0=\dfrac{\sqrt2}{2}$. ✓
⚠️ Common mistakes
  • Forgetting $dx$. $x=a\sin\theta$ also changes $dx$ into $a\cos\theta\,d\theta$; leaving $dx$ unchanged gives nonsense.
  • Mixing variables. A final answer containing both $x$ and $\theta$ — or a definite integral with $x$-limits on a $\theta$-integral — is always wrong.
  • Wrong sign of the root. $\sqrt{a^2\cos^2\theta}=a|\cos\theta|$; it equals $a\cos\theta$ only because Theorem 5.4 restricts $\theta$. Keep track of that restriction when you change limits.
  • Using a sledgehammer. $\displaystyle\int\frac{x\,dx}{\sqrt{1-x^2}}$ is $-\sqrt{1-x^2}+C$ by $u=1-x^2$; trigonometric substitution works but takes four times as long.

Completing the Square First

A quadratic with a linear term, such as $x^2+4x+13$ or $3-2x-x^2$, is not yet in one of the three forms. Completing the square, $x^2+bx+c=\left(x+\tfrac b2\right)^2+\left(c-\tfrac{b^2}{4}\right)$, and then substituting $u=x+\tfrac b2$ fixes this.

✏️ Example 5 — Completing the square
Evaluate $\displaystyle\int\frac{x\,dx}{\sqrt{3-2x-x^2}}$.
Complete the square $3-2x-x^2=3-\left(x^2+2x\right)=3-\left[(x+1)^2-1\right]=4-(x+1)^2$. So the form is $a^2-u^2$ with $a=2$, $u=x+1$.
Substitute $x+1=2\sin\theta$: $x=2\sin\theta-1$, $dx=2\cos\theta\,d\theta$, $\sqrt{4-(x+1)^2}=2\cos\theta$. $$\int\frac{(2\sin\theta-1)\,2\cos\theta}{2\cos\theta}\,d\theta=\int(2\sin\theta-1)\,d\theta=-2\cos\theta-\theta+C.$$
Back to $x$ $\sin\theta=\tfrac{x+1}{2}$, so $\cos\theta=\tfrac{\sqrt{4-(x+1)^2}}{2}=\tfrac{\sqrt{3-2x-x^2}}{2}$: $$\int\frac{x\,dx}{\sqrt{3-2x-x^2}}=-\sqrt{3-2x-x^2}-\sin^{-1}\frac{x+1}{2}+C.$$
Check $\dfrac{d}{dx}\left(-\sqrt{3-2x-x^2}\right)=\dfrac{1+x}{\sqrt{3-2x-x^2}}$ and $\dfrac{d}{dx}\left(-\sin^{-1}\tfrac{x+1}{2}\right)=-\dfrac{1}{\sqrt{4-(x+1)^2}}=-\dfrac{1}{\sqrt{3-2x-x^2}}$; the sum is $\dfrac{x}{\sqrt{3-2x-x^2}}$. ✓

Areas of Circles, Ellipses and Segments

With the sine substitution we can finally compute curved areas that geometry alone only states.

✏️ Example 6 — Area of an ellipse
Find the area enclosed by the ellipse $\dfrac{x^2}{a^2}+\dfrac{y^2}{b^2}=1$, where $a,b\gt0$.
Set up The upper half is $y=\tfrac ba\sqrt{a^2-x^2}$. By symmetry the area is four times the first-quadrant part: $$A=4\cdot\frac ba\int_0^a\sqrt{a^2-x^2}\,dx.$$
Substitute $x=a\sin\theta$; $x=0\Rightarrow\theta=0$, $x=a\Rightarrow\theta=\tfrac\pi2$: $$\int_0^a\sqrt{a^2-x^2}\,dx=\int_0^{\pi/2}a^2\cos^2\theta\,d\theta=\frac{a^2}{2}\left[\theta+\frac{\sin2\theta}{2}\right]_0^{\pi/2}=\frac{\pi a^2}{4}.$$
Result $A=4\cdot\dfrac ba\cdot\dfrac{\pi a^2}{4}=\pi ab$. When $a=b=r$ this is the circle, $\pi r^2$. ✓
Segment The same antiderivative, $\int\sqrt{r^2-y^2}\,dy=\tfrac12\left(y\sqrt{r^2-y^2}+r^2\sin^{-1}\tfrac yr\right)$, gives the area of the part of a disc of radius $r$ lying below the horizontal line at height $h$ ($-r\le h\le r$): $$A(h)=\int_{-r}^{h}2\sqrt{r^2-y^2}\,dy=h\sqrt{r^2-h^2}+r^2\sin^{-1}\frac hr+\frac{\pi r^2}{2}.$$ Interactive 2 uses this to gauge a fuel tank.
Interactive 2 — How Much Fuel Is in the Tank? A Circular Segment, Live

A horizontal cylindrical tank has radius $r=1$ m and length $L=4$ m. A dipstick reads the depth $d$; the liquid's cross-section is a circular segment. Its area is approximated by thin horizontal strips of width $2\sqrt{r^2-y^2}$ and computed exactly by the trigonometric-substitution formula $A(h)$ with $h=d-r$. Notice that equal steps in depth do not add equal volumes.

8
depth $d$ (m)—
strip sum (m²)—
exact area $A$ (m²)—
volume $L\cdot A$ (litres)—
fraction full—

Exercises

I
Evaluate each integral by a trigonometric substitution (or a simpler method if you spot one).
  • 1 $\displaystyle\int\frac{dx}{\sqrt{4-x^2}}$
  • 2 $\displaystyle\int\frac{dx}{x^2+9}$
  • 3 $\displaystyle\int\sqrt{16-x^2}\,dx$
  • 4 $\displaystyle\int\frac{x^2}{\sqrt{1-x^2}}\,dx$
  • 5 $\displaystyle\int\frac{dx}{x^2\sqrt{9-x^2}}$
  • 6 $\displaystyle\int\frac{dx}{\left(x^2+4\right)^{3/2}}$
  • 7 $\displaystyle\int\frac{dx}{\sqrt{x^2+16}}$
  • 8 $\displaystyle\int\frac{\sqrt{x^2-4}}{x}\,dx$, $x\gt2$
  • 9 $\displaystyle\int x^3\sqrt{1-x^2}\,dx$
  • 10 $\displaystyle\int\frac{dx}{\left(x^2-1\right)^{3/2}}$, $x\gt1$
  • 11 $\displaystyle\int\frac{x^2}{\sqrt{x^2+1}}\,dx$
Check: the derivative of the answer (right panel) must retrace the integrand
$F$ (the answer) with its tangent
$F'$ being traced — the integrand
$x$—
$F(x)$—
$F'(x)$—
$F$ is…—
1 $x=2\sin\theta$: $\displaystyle\int\frac{2\cos\theta}{2\cos\theta}\,d\theta=\theta+C$, so $$\int\frac{dx}{\sqrt{4-x^2}}=\sin^{-1}\frac x2+C.$$
2 $x=3\tan\theta$: $\displaystyle\int\frac{3\sec^2\theta}{9\sec^2\theta}\,d\theta=\frac\theta3+C$, so $$\int\frac{dx}{x^2+9}=\frac13\tan^{-1}\frac x3+C.$$
3 As in Example 1 with $a=4$: $16\displaystyle\int\cos^2\theta\,d\theta=8(\theta+\sin\theta\cos\theta)$, so $$\int\sqrt{16-x^2}\,dx=8\sin^{-1}\frac x4+\frac x2\sqrt{16-x^2}+C.$$
4 $x=\sin\theta$: $\displaystyle\int\frac{\sin^2\theta\cos\theta}{\cos\theta}\,d\theta=\int\sin^2\theta\,d\theta=\frac12(\theta-\sin\theta\cos\theta)$, so $$\int\frac{x^2\,dx}{\sqrt{1-x^2}}=\frac12\sin^{-1}x-\frac x2\sqrt{1-x^2}+C.$$
5 $x=3\sin\theta$: $\displaystyle\int\frac{3\cos\theta}{9\sin^2\theta\cdot3\cos\theta}\,d\theta=\frac19\int\csc^2\theta\,d\theta=-\frac19\cot\theta$. From the triangle $\cot\theta=\tfrac{\sqrt{9-x^2}}{x}$: $$\int\frac{dx}{x^2\sqrt{9-x^2}}=-\frac{\sqrt{9-x^2}}{9x}+C.$$
6 $x=2\tan\theta$: $\displaystyle\int\frac{2\sec^2\theta}{8\sec^3\theta}\,d\theta=\frac14\int\cos\theta\,d\theta=\frac14\sin\theta$, and $\sin\theta=\tfrac{x}{\sqrt{x^2+4}}$: $$\int\frac{dx}{\left(x^2+4\right)^{3/2}}=\frac{x}{4\sqrt{x^2+4}}+C.$$
7 $x=4\tan\theta$: $\displaystyle\int\sec\theta\,d\theta=\ln|\sec\theta+\tan\theta|=\ln\left|\tfrac{\sqrt{x^2+16}+x}{4}\right|$, so (Theorem 5.5) $$\int\frac{dx}{\sqrt{x^2+16}}=\ln\left(x+\sqrt{x^2+16}\right)+C.$$
8 $x=2\sec\theta$: $\displaystyle\int\frac{2\tan\theta}{2\sec\theta}\cdot2\sec\theta\tan\theta\,d\theta=2\int\tan^2\theta\,d\theta=2\tan\theta-2\theta$. With $\tan\theta=\tfrac{\sqrt{x^2-4}}{2}$ and $\theta=\sec^{-1}\tfrac x2$: $$\int\frac{\sqrt{x^2-4}}{x}\,dx=\sqrt{x^2-4}-2\sec^{-1}\frac x2+C.$$
9 A plain substitution is quicker: $u=1-x^2$, $du=-2x\,dx$, $x^2=1-u$: $-\tfrac12\displaystyle\int(1-u)u^{1/2}\,du=-\tfrac13u^{3/2}+\tfrac15u^{5/2}$, so $$\int x^3\sqrt{1-x^2}\,dx=-\frac13\left(1-x^2\right)^{3/2}+\frac15\left(1-x^2\right)^{5/2}+C.$$
10 $x=\sec\theta$: $\displaystyle\int\frac{\sec\theta\tan\theta}{\tan^3\theta}\,d\theta=\int\frac{\cos\theta}{\sin^2\theta}\,d\theta=-\frac{1}{\sin\theta}$, and $\sin\theta=\tfrac{\sqrt{x^2-1}}{x}$: $$\int\frac{dx}{\left(x^2-1\right)^{3/2}}=-\frac{x}{\sqrt{x^2-1}}+C.$$
11 $x=\tan\theta$: $\displaystyle\int\tan^2\theta\sec\theta\,d\theta=\int\left(\sec^3\theta-\sec\theta\right)d\theta=\tfrac12\sec\theta\tan\theta-\tfrac12\ln|\sec\theta+\tan\theta|$ (5.1, Ex. II.10). With $\sec\theta=\sqrt{x^2+1}$, $\tan\theta=x$: $$\int\frac{x^2\,dx}{\sqrt{x^2+1}}=\frac x2\sqrt{x^2+1}-\frac12\ln\left(x+\sqrt{x^2+1}\right)+C.$$
II
Definite integrals. Change the limits to $\theta$ where convenient, and give exact values with decimals.
  • 1 $\displaystyle\int_0^2\sqrt{4-x^2}\,dx$ (then explain the answer geometrically)
  • 2 $\displaystyle\int_0^3\frac{dx}{9+x^2}$
  • 3 $\displaystyle\int_0^{\sqrt3}\frac{dx}{\left(1+x^2\right)^{3/2}}$
  • 4 $\displaystyle\int_0^1\frac{x^3}{\sqrt{x^2+1}}\,dx$
  • 5 $\displaystyle\int_1^2\frac{\sqrt{x^2-1}}{x}\,dx$
  • 6 $\displaystyle\int_0^1x^2\sqrt{1-x^2}\,dx$
  • 7 $\displaystyle\int_0^1\sqrt{1+x^2}\,dx$
  • 8 $\displaystyle\int_3^6\frac{dx}{x^2\sqrt{x^2-9}}$
1 $x=2\sin\theta$, $\theta:0\to\tfrac\pi2$: $\displaystyle\int_0^{\pi/2}4\cos^2\theta\,d\theta=2\left[\theta+\tfrac12\sin2\theta\right]_0^{\pi/2}=\pi\approx3.1416$ — a quarter of a disc of radius $2$, $\tfrac14\pi\cdot2^2$.
2 $\Big[\tfrac13\tan^{-1}\tfrac x3\Big]_0^3=\tfrac13\cdot\tfrac\pi4=\dfrac{\pi}{12}\approx0.2618$.
3 $x=\tan\theta$, $\theta:0\to\tfrac\pi3$: $\displaystyle\int_0^{\pi/3}\cos\theta\,d\theta=\sin\tfrac\pi3=\dfrac{\sqrt3}{2}\approx0.8660$.
4 $u=x^2+1$ ($u:1\to2$), $x^3\,dx=\tfrac12(u-1)\,du$: $\tfrac12\displaystyle\int_1^2\left(u^{1/2}-u^{-1/2}\right)du=\tfrac12\Big[\tfrac23u^{3/2}-2u^{1/2}\Big]_1^2=\dfrac{2-\sqrt2}{3}\approx0.1953$. (Trigonometric substitution $x=\tan\theta$ gives the same.)
5 By Ex. I.8 with $a=1$: $\Big[\sqrt{x^2-1}-\sec^{-1}x\Big]_1^2=\sqrt3-\dfrac\pi3\approx0.6849$.
6 $x=\sin\theta$, $\theta:0\to\tfrac\pi2$: $\displaystyle\int_0^{\pi/2}\sin^2\theta\cos^2\theta\,d\theta=\Big[\tfrac\theta8-\tfrac{\sin4\theta}{32}\Big]_0^{\pi/2}=\dfrac{\pi}{16}\approx0.1963$ (5.1, Ex. I.7).
7 $x=\tan\theta$, $\theta:0\to\tfrac\pi4$: $\displaystyle\int_0^{\pi/4}\sec^3\theta\,d\theta=\Big[\tfrac12\sec\theta\tan\theta+\tfrac12\ln|\sec\theta+\tan\theta|\Big]_0^{\pi/4}=\dfrac{\sqrt2+\ln\left(1+\sqrt2\right)}{2}\approx1.1478$.
8 $x=3\sec\theta$: $\displaystyle\int\frac{3\sec\theta\tan\theta}{9\sec^2\theta\cdot3\tan\theta}\,d\theta=\frac19\int\cos\theta\,d\theta$; $\theta:0\to\tfrac\pi3$ (since $\sec\theta=2$): $\tfrac19\sin\tfrac\pi3=\dfrac{\sqrt3}{18}\approx0.0962$.
III
Complete the square, then evaluate.
  • 1 $\displaystyle\int\frac{dx}{\sqrt{x^2+2x+5}}$
  • 2 $\displaystyle\int\frac{dx}{x^2-6x+13}$
  • 3 $\displaystyle\int\sqrt{2x-x^2}\,dx$
  • 4 $\displaystyle\int\frac{dx}{\sqrt{8+2x-x^2}}$
  • 5 $\displaystyle\int\frac{x\,dx}{\sqrt{x^2+4x+8}}$
  • 6 $\displaystyle\int_1^3\sqrt{3+2x-x^2}\,dx$
1 $x^2+2x+5=(x+1)^2+4$. With $u=x+1$ and Theorem 5.5: $$\int\frac{dx}{\sqrt{x^2+2x+5}}=\ln\left(x+1+\sqrt{x^2+2x+5}\right)+C.$$
2 $x^2-6x+13=(x-3)^2+4$; $x-3=2\tan\theta$: $$\int\frac{dx}{x^2-6x+13}=\frac12\tan^{-1}\frac{x-3}{2}+C.$$
3 $2x-x^2=1-(x-1)^2$; $x-1=\sin\theta$: $\displaystyle\int\cos^2\theta\,d\theta=\tfrac12(\theta+\sin\theta\cos\theta)$, so $$\int\sqrt{2x-x^2}\,dx=\frac12\sin^{-1}(x-1)+\frac{x-1}{2}\sqrt{2x-x^2}+C.$$
4 $8+2x-x^2=9-(x-1)^2$; $x-1=3\sin\theta$: $$\int\frac{dx}{\sqrt{8+2x-x^2}}=\sin^{-1}\frac{x-1}{3}+C.$$
5 $x^2+4x+8=(x+2)^2+4$; let $u=x+2$, $x=u-2$: $\displaystyle\int\frac{u\,du}{\sqrt{u^2+4}}-2\int\frac{du}{\sqrt{u^2+4}}$. The first is $\sqrt{u^2+4}$ (plain substitution), the second uses Theorem 5.5: $$\int\frac{x\,dx}{\sqrt{x^2+4x+8}}=\sqrt{x^2+4x+8}-2\ln\left(x+2+\sqrt{x^2+4x+8}\right)+C.$$
6 $3+2x-x^2=4-(x-1)^2$; $x-1=2\sin\theta$, $\theta:0\to\tfrac\pi2$: $\displaystyle\int_0^{\pi/2}4\cos^2\theta\,d\theta=\pi\approx3.1416$ — a quarter of the disc of radius $2$ centred at $(1,0)$.
IV
Applications and understanding.
  • 1 Applied (landscape design). An ornamental pond is an ellipse with semi-axes $40$ m and $25$ m. Use Example 6 to find its surface area.
  • 2 Applied (fuel storage). A horizontal cylindrical diesel tank has radius $1$ m and length $5$ m. The dipstick reads a depth of $0.5$ m. How many litres of diesel are in the tank, and what fraction of capacity is that?
  • 3 Find the area of the region of the disc $x^2+y^2\le25$ that lies to the right of the line $x=3$.
  • 4 Applied (physics). A thin rod carries uniform charge density $\lambda$ along the $x$-axis from $x=-L$ to $x=L$. The electric field at the point $(0,d)$ has magnitude $E=k\lambda d\displaystyle\int_{-L}^{L}\frac{dx}{\left(x^2+d^2\right)^{3/2}}$. Show that $E=\dfrac{2k\lambda L}{d\sqrt{L^2+d^2}}$, and find its limit as $L\to\infty$.
  • 5 Conceptual. Why does Theorem 5.4 restrict $\theta$ to $\left[-\tfrac\pi2,\tfrac\pi2\right]$ for the substitution $x=a\sin\theta$? What would go wrong with $\theta\in[0,\pi]$?
  • 6 Conceptual. Evaluate $\displaystyle\int\frac{x\,dx}{\sqrt{1-x^2}}$ twice — by $x=\sin\theta$ and by $u=1-x^2$ — and confirm the answers agree.
1 $A=\pi ab=\pi(40)(25)=1000\pi\approx3141.6$ m².
2 $h=d-r=-0.5$: $A=(-0.5)\sqrt{1-0.25}+\sin^{-1}(-0.5)+\tfrac\pi2=-\tfrac{\sqrt3}{4}-\tfrac\pi6+\tfrac\pi2=\tfrac\pi3-\tfrac{\sqrt3}{4}\approx0.6142$ m². Volume $=5A\approx3.071$ m³ $\approx3071$ litres. Capacity $=5\pi\approx15.708$ m³, so the tank is about $19.6\%$ full — although the depth is a quarter of the diameter.
3 Area $=\displaystyle\int_3^52\sqrt{25-x^2}\,dx=\Big[x\sqrt{25-x^2}+25\sin^{-1}\tfrac x5\Big]_3^5=\tfrac{25\pi}{2}-\left(12+25\sin^{-1}\tfrac35\right)\approx11.18$ square units.
4 $x=d\tan\theta$: $\displaystyle\int\frac{d\sec^2\theta\,d\theta}{d^3\sec^3\theta}=\frac{\sin\theta}{d^2}=\frac{x}{d^2\sqrt{x^2+d^2}}$. Between $-L$ and $L$ this is $\dfrac{2L}{d^2\sqrt{L^2+d^2}}$, so $E=\dfrac{2k\lambda L}{d\sqrt{L^2+d^2}}$. As $L\to\infty$, $\dfrac{L}{\sqrt{L^2+d^2}}\to1$ and $E\to\dfrac{2k\lambda}{d}$ — the field of an infinite line charge.
5 On $\left[-\tfrac\pi2,\tfrac\pi2\right]$, $\sin\theta$ takes every value in $[-1,1]$ exactly once (so $\theta=\sin^{-1}\tfrac xa$ undoes the substitution) and $\cos\theta\ge0$ (so $\sqrt{a^2-x^2}=a\cos\theta$). On $[0,\pi]$, $\sin\theta$ is not one-to-one and never negative (so $x\lt0$ is missed), and $\cos\theta\lt0$ on $\left(\tfrac\pi2,\pi\right]$, where the formula would give a negative square root.
6 $x=\sin\theta$: $\displaystyle\int\frac{\sin\theta\cos\theta}{\cos\theta}\,d\theta=-\cos\theta+C=-\sqrt{1-x^2}+C$. With $u=1-x^2$: $-\tfrac12\displaystyle\int u^{-1/2}\,du=-\sqrt u+C=-\sqrt{1-x^2}+C$. The same — but the second method is far quicker.
🔬 Research–Teaching NexusResearch-tutored · optional, about 30 minutes

Research question. How should the dipstick for a horizontal cylindrical tank be marked, and how wrong is a simple linear scale?

Why it matters. Horizontal cylindrical tanks store fuel at petrol stations, heating oil in European homes, irrigation and drinking water on farms in Africa and Asia, and milk on dairy lorries. Owners and tax authorities need to know the volume from a single depth reading.

What to do.

  1. Using Example 6, show that a tank of radius $r$ and length $L$ filled to depth $d$ holds $V(d)=L\left[h\sqrt{r^2-h^2}+r^2\sin^{-1}\frac hr+\frac{\pi r^2}{2}\right]$ with $h=d-r$.
  2. Take a typical farm tank with $r=0.9$ m and $L=3$ m. Find the capacity in litres, then build a calibration table of $V$ every $10$ cm of depth.
  3. A naive gauge marks volume in proportion to depth: $V_{\text{lin}}=\text{capacity}\times\frac{d}{2r}$. Tabulate the error $V-V_{\text{lin}}$ and find the depth where it is largest (hint: set $V'(d)$ equal to the slope of the linear scale).
  4. Check one value of your table with a strip sum (as in Interactive 2) in a spreadsheet.

Tools: Calculator, spreadsheet

Hand in: A half-page note with the calibration table, the maximum error of the linear scale, and one practical recommendation.

Going further. Many real tanks have hemispherical or dished ends. How would those change $V(d)$? Look up a manufacturer's calibration chart and compare.

Instructor note: capacity $=\pi(0.81)(3)\approx7.634$ m³ $\approx7634$ L. The linear scale is worst where $\sqrt{r^2-h^2}=\tfrac{\pi r}{4}$, i.e. $|h|\approx0.619r$ ($d\approx0.34$ m or $1.46$ m), with an error of about $441$ L: the linear scale over-states the contents in the lower half of the tank and under-states them in the upper half.

🧪 Self-check quiz

0/5 correct

Q1. Which substitution suits $\displaystyle\int\frac{dx}{x\sqrt{16+x^2}}$?

Q2. With $x=3\sin\theta$ and $-\tfrac\pi2\le\theta\le\tfrac\pi2$, $\sqrt{9-x^2}=$

Q3. If $x=2\sec\theta$ with $0\le\theta\lt\tfrac\pi2$, the reference triangle gives $\tan\theta=$

Q4. $\displaystyle\int_0^1\sqrt{1-x^2}\,dx=$

Q5. Completing the square, $x^2+6x+13=$