Educerie

Educerie · IB Diploma · Mathematics: analysis and approaches

IB Mathematics AA 5.16 · SL and HL

Integration by substitution and by parts

When an integral is not on the standard list, how do you change it into one that is, either by renaming the variable or by trading one integral for an easier one?

What you will learn

  • HL Understand substitution as the chain rule reversed, and know when the substitution must be spotted and when it will be given
  • HL Know how to rewrite every x, the dx and the limits when a substitution is made
  • HL Understand integration by parts as the product rule reversed, and how to choose which factor to differentiate
  • HL Know how to apply parts repeatedly, and how to solve for an integral that returns after two rounds

You must be able to

  1. HL Integrate a product by parts, choosing u so the new integral is simpler
  2. HL Find an integral using a given substitution, rewriting the whole integrand and changing the limits
  3. HL Integrate ln x, arcsin x or arctan x by writing it as 1 times the function
  4. HL Show a result by repeated parts, such as the integral of e to the x times sin x
  5. HL Integrate by inspection when the integrand is a function of g(x) times a multiple of g'(x)
  6. HL Use a substitution to evaluate an integral of an unknown function from a given integral

In the exam. across recent papers the subtopic turns up in roughly equal measure on Paper 1 (no calculator) and Paper 3, and only occasionally on Paper 2. Expect "Find" and "Show that" questions: a given substitution with a spare factor to deal with, a definite integral where the limits must change, a single round of parts, a lone ln⁡x\ln x or inverse trig function, and a repeated or cyclic integral set as "show that". On Paper 3 both techniques are tools inside a longer problem, such as a differential equation (5.18).

1Spotting a substitution: the form you must see yourself (SL and HL)

At SL you met ∫2xcos⁡(x2) dx\int 2x\cos(x^{2})\,dx. The inside function is x2x^{2}, its derivative 2x2x sits outside, and the answer is sin⁡(x2)+C\sin(x^{2}) + C. Written as a substitution, the working is:

u=x2  ⇒  dudx=2x  ⇒  du=2x dxu = x^{2} \;\Rightarrow\; \frac{du}{dx} = 2x \;\Rightarrow\; du = 2x\,dx∫2xcos⁡(x2) dx=∫cos⁡u duthe 2x dx has become du=sin⁡u+C=sin⁡(x2)+Calways return to x\begin{aligned}\int 2x\cos(x^{2})\,dx &= \int \cos u\,du && \textcolor{#838c91}{\text{the }2x\,dx\text{ has become }du} \\[6pt] &= \sin u + C \\[6pt] &= \sin(x^{2}) + C && \textcolor{#838c91}{\text{always return to }x}\end{aligned}
  • The step du=2x dxdu = 2x\,dx says a small change in xx changes uu by 2x2x times as much.
  • Figure 1 shows the definite version from 0 to 1. On the left is the area under y=2xcos⁡(x2)y = 2x\cos(x^{2}). On the right, after u=x2u = x^{2}, is the area under y=cos⁡uy = \cos u. The curves look nothing alike, yet each strip keeps its area. Both totals are sin⁡1≈0.841\sin 1 \approx 0.841.
Figure 1 · A substitution changes the variable, not the area (a) In x: ∫ 2x cos(x²) dx from 0 to 1 area = sin 1 y = 2x cos(x²) x y 0.5 1 0.5 1 (b) In u: ∫ cos u du from 0 to 1 area = sin 1 y = cos u u y 0.5 1 0.5 1 u = x² turns the strip [0, 1] on the x-axis into [0, 1] on the u-axis. Both shaded areas are sin 1 ≈ 0.841.
Figure 1 · A substitution changes the variable, not the area
  • The guide describes this SL shape as ∫k g′(x) f(g(x)) dx\int k\,g'(x)\,f(g(x))\,dx: some function of an inside function g(x)g(x), times a constant times the derivative of that inside.
  • On an exam paper no substitution is given for this shape. You must see it yourself. The test: pick the inside, differentiate it, and check that only a number is left over.

Example 1. Find ∫x4(2x5−3)4 dx\int x^{4}(2x^{5}-3)^{4}\,dx.

  • The inside is 2x5−32x^{5}-3 with derivative 10x410x^{4}. The integrand has x4x^{4}, which is 110\tfrac{1}{10} of that.
  • So take u=2x5−3u = 2x^{5}-3, giving du=10x4 dxdu = 10x^{4}\,dx and x4 dx=110 dux^{4}\,dx = \tfrac{1}{10}\,du.
∫x4(2x5−3)4 dx=110∫u4 du=110⋅u55+C=(2x5−3)550+C\begin{aligned}\int x^{4}(2x^{5}-3)^{4}\,dx &= \tfrac{1}{10}\int u^{4}\,du \\[6pt] &= \tfrac{1}{10}\cdot\frac{u^{5}}{5} + C \\[6pt] &= \frac{(2x^{5}-3)^{5}}{50} + C\end{aligned}
  • Differentiating the answer returns x4(2x5−3)4x^{4}(2x^{5}-3)^{4}, which is your Paper 1 check.

One more standard pattern belongs here.

  • When the numerator is the derivative of the denominator, the integral is a logarithm: ∫f′(x)f(x) dx=ln⁡∣f(x)∣+C\displaystyle\int \frac{f'(x)}{f(x)}\,dx = \ln\lvert f(x)\rvert + C.
    • For example, ∫2x+3x2+3x+5 dx=ln⁡(x2+3x+5)+C\displaystyle\int \frac{2x+3}{x^{2}+3x+5}\,dx = \ln(x^{2}+3x+5) + C. No modulus is needed, because x2+3x+5>0x^{2}+3x+5 > 0 always.
  • If the leftover is not a constant (a spare xx, say), inspection fails, and the question will give you the substitution.

2Using a substitution you are given

The method is always the same four moves.

Substitution: (1) differentiate the substitution to link dudu and dxdx; (2) replace every xx and the dxdx, so that no xx is left; (3) integrate in uu; (4) put xx back (or, for a definite integral, change the limits instead and stay in uu).

  • Every xx must go in move (2), not only the inside function: rearrange the substitution to write a spare xx in terms of uu.

Example 2. Use u=3−xu = 3-x to find ∫x3−x dx\displaystyle\int \frac{x}{\sqrt{3-x}}\,dx.

  • Here du=−dxdu = -dx, so dx=−dudx = -du.
  • The spare xx becomes 3−u3-u.
u=3−x  ⇒  dx=−duandx=3−uu = 3-x \;\Rightarrow\; dx = -du \quad\text{and}\quad x = 3-u∫x3−x dx=∫3−uu1/2 (−du)=−∫(3u−1/2−u1/2)dusplit into powers before integrating=−6u1/2+23u3/2+C=23(3−x)3/2−6(3−x)1/2+C\begin{aligned}\int \frac{x}{\sqrt{3-x}}\,dx &= \int \frac{3-u}{u^{1/2}}\,(-du) \\[6pt] &= -\int \left(3u^{-1/2} - u^{1/2}\right)du && \textcolor{#838c91}{\text{split into powers before integrating}} \\[6pt] &= -6u^{1/2} + \tfrac{2}{3}u^{3/2} + C \\[6pt] &= \tfrac{2}{3}(3-x)^{3/2} - 6(3-x)^{1/2} + C\end{aligned}
  • The minus sign from dx=−dudx = -du is easy to drop. Differentiate the final line to check.

Example 3: an exponential substitution. Use u=ex+4u = e^{x}+4 to find ∫e2xex+4 dx\displaystyle\int e^{2x}\sqrt{e^{x}+4}\,dx.

  • Now du=ex dxdu = e^{x}\,dx. Write e2x=ex⋅exe^{2x} = e^{x}\cdot e^{x}.
  • One exe^{x} pairs with the dxdx to make dudu. The other must be in uu, so ex=u−4e^{x} = u-4.
u=ex+4  ⇒  du=ex dxandex=u−4u = e^{x}+4 \;\Rightarrow\; du = e^{x}\,dx \quad\text{and}\quad e^{x} = u-4∫e2xex+4 dx=∫exex+4⋅ex dx=∫(u−4) u1/2 du=∫(u3/2−4u1/2)du=25u5/2−83u3/2+C=25(ex+4)5/2−83(ex+4)3/2+C\begin{aligned}\int e^{2x}\sqrt{e^{x}+4}\,dx &= \int e^{x}\sqrt{e^{x}+4}\cdot e^{x}\,dx \\[6pt] &= \int (u-4)\,u^{1/2}\,du \\[6pt] &= \int \left(u^{3/2}-4u^{1/2}\right)du \\[6pt] &= \tfrac{2}{5}u^{5/2} - \tfrac{8}{3}u^{3/2} + C \\[6pt] &= \tfrac{2}{5}(e^{x}+4)^{5/2} - \tfrac{8}{3}(e^{x}+4)^{3/2} + C\end{aligned}

Example 4: a trigonometric integrand. Use u=cos⁡xu = \cos x to find ∫sin⁡5x dx\int \sin^{5}x\,dx.

  • Here du=−sin⁡x dxdu = -\sin x\,dx takes one factor of sin⁡x\sin x. The sin⁡4x\sin^{4}x left over is rewritten using sin⁡2x=1−cos⁡2x=1−u2\sin^{2}x = 1-\cos^{2}x = 1-u^{2}.
  • This works for any odd power of sin⁡x\sin x or cos⁡x\cos x. Split off one factor for the dudu. Turn the even power left over into the other function.
u=cos⁡x  ⇒  du=−sin⁡x dxu = \cos x \;\Rightarrow\; du = -\sin x\,dxsin⁡5x dx=(sin⁡2x)2sin⁡x dx=(1−u2)2 (−du)\sin^{5}x\,dx = (\sin^{2}x)^{2}\sin x\,dx = (1-u^{2})^{2}\,(-du)∫sin⁡5x dx=−∫(1−2u2+u4)du=−u+23u3−15u5+C=−cos⁡x+23cos⁡3x−15cos⁡5x+C\begin{aligned}\int \sin^{5}x\,dx &= -\int \left(1 - 2u^{2} + u^{4}\right)du \\[6pt] &= -u + \tfrac{2}{3}u^{3} - \tfrac{1}{5}u^{5} + C \\[6pt] &= -\cos x + \tfrac{2}{3}\cos^{3}x - \tfrac{1}{5}\cos^{5}x + C\end{aligned}

Example 5: a substitution that leaves a fraction. Use u=exu = e^{x} to find ∫exe2x−5ex+6 dx\displaystyle\int \frac{e^{x}}{e^{2x}-5e^{x}+6}\,dx.

  • Here du=ex dxdu = e^{x}\,dx, and the denominator becomes u2−5u+6=(u−2)(u−3)u^{2}-5u+6 = (u-2)(u-3).
  • A fraction like this needs partial fractions (1.11) first.
u=ex  ⇒  du=ex dxu = e^{x} \;\Rightarrow\; du = e^{x}\,dx∫exe2x−5ex+6 dx=∫du(u−2)(u−3)\int \frac{e^{x}}{e^{2x}-5e^{x}+6}\,dx = \int \frac{du}{(u-2)(u-3)}1(u−2)(u−3)=1u−3−1u−21=A(u−2)+B(u−3): u=3 gives A=1, u=2 gives B=−1=ln⁡∣u−3∣−ln⁡∣u−2∣+C=ln⁡∣ex−3∣−ln⁡∣ex−2∣+C\begin{aligned}\frac{1}{(u-2)(u-3)} &= \frac{1}{u-3} - \frac{1}{u-2} && \textcolor{#838c91}{1 = A(u-2)+B(u-3)\text{: }u=3\text{ gives }A=1\text{, }u=2\text{ gives }B=-1} \\[6pt] &= \ln\lvert u-3\rvert - \ln\lvert u-2\rvert + C \\[6pt] &= \ln\lvert e^{x}-3\rvert - \ln\lvert e^{x}-2\rvert + C\end{aligned}

Keep the modulus signs: here ex−3e^{x}-3 and ex−2e^{x}-2 can be negative for some xx.

3Definite integrals: change the limits

For a definite integral you can put xx back and use the original limits. Or change the limits into uu-values and never go back to xx. The second is usually shorter and easier to check.

Example 6. Use u=1+xu = 1+\sqrt{x} to find the exact value of ∫141x (1+x)2 dx\displaystyle\int_{1}^{4} \frac{1}{\sqrt{x}\,(1+\sqrt{x})^{2}}\,dx.

  • Differentiating gives du=12x dxdu = \dfrac{1}{2\sqrt{x}}\,dx, so dxx=2 du\dfrac{dx}{\sqrt{x}} = 2\,du.
  • The limits become x=1→u=2x=1 \to u=2 and x=4→u=3x=4 \to u=3.
∫141x (1+x)2 dx=∫232u2 dunew limits=[−2u]23=−23+1=13\begin{aligned}\int_{1}^{4} \frac{1}{\sqrt{x}\,(1+\sqrt{x})^{2}}\,dx &= \int_{2}^{3} \frac{2}{u^{2}}\,du && \textcolor{#838c91}{\text{new limits}} \\[6pt] &= \Big[-\frac{2}{u}\Big]_{2}^{3} \\[6pt] &= -\tfrac{2}{3} + 1 = \tfrac{1}{3}\end{aligned}
  • Once the limits are in uu, never put an xx-value into an expression in uu.

Example 7: an unknown function. Given that ∫19f(u) du=12\displaystyle\int_{1}^{9} f(u)\,du = 12, find ∫13x f(x2) dx\displaystyle\int_{1}^{3} x\,f(x^{2})\,dx.

  • You do not know ff, so you cannot integrate it. Only a substitution connects the two integrals.
  • Take u=x2u = x^{2}, so du=2x dxdu = 2x\,dx and x dx=12 dux\,dx = \tfrac{1}{2}\,du; the limits x=1,3x=1,3 become u=1,9u=1,9.
∫13x f(x2) dx=12∫19f(u) du=12×12=6\int_{1}^{3} x\,f(x^{2})\,dx = \tfrac{1}{2}\int_{1}^{9} f(u)\,du = \tfrac{1}{2}\times 12 = 6
  • The name of the variable inside a definite integral does not matter, so ∫19f(u) du=∫19f(x) dx\int_{1}^{9} f(u)\,du = \int_{1}^{9} f(x)\,dx. Write the new limits down explicitly.

4Substituting for xx itself: trigonometric substitutions

Sometimes the question gives xx as a function of the new variable. The classic case is a2−x2\sqrt{a^{2}-x^{2}}, which x=asin⁡θx = a\sin\theta turns into a clean cosine. The same idea works for a2+x2a^{2}+x^{2} with x=atan⁡θx = a\tan\theta, where 1+tan⁡2θ=sec⁡2θ1+\tan^{2}\theta = \sec^{2}\theta does the cleaning.

Example 8. Find the exact value of ∫011−x2 dx\displaystyle\int_{0}^{1} \sqrt{1-x^{2}}\,dx using x=sin⁡θx = \sin\theta, for 0≤θ≤π20 \le \theta \le \frac{\pi}{2}.

x=sin⁡θ  ⇒  dx=cos⁡θ dθ;x=0→θ=0,x=1→θ=π2x = \sin\theta \;\Rightarrow\; dx = \cos\theta\,d\theta; \qquad x = 0 \to \theta = 0,\quad x = 1 \to \theta = \tfrac{\pi}{2}1−x2=1−sin⁡2θ=cos⁡2θ=cos⁡θcos⁡θ≥0 on this interval\sqrt{1-x^{2}} = \sqrt{1-\sin^{2}\theta} = \sqrt{\cos^{2}\theta} = \cos\theta \qquad \textcolor{#838c91}{\cos\theta \ge 0\text{ on this interval}}∫011−x2 dx=∫0π/2cos⁡2θ dθ=∫0π/212(1+cos⁡2θ) dθdouble-angle identity=[12θ+14sin⁡2θ]0π/2=(π4+0)−0=π4\begin{aligned}\int_{0}^{1} \sqrt{1-x^{2}}\,dx &= \int_{0}^{\pi/2} \cos^{2}\theta\,d\theta \\[6pt] &= \int_{0}^{\pi/2} \tfrac{1}{2}(1+\cos 2\theta)\,d\theta && \textcolor{#838c91}{\text{double-angle identity}} \\[6pt] &= \left[\tfrac{1}{2}\theta + \tfrac{1}{4}\sin 2\theta\right]_{0}^{\pi/2} \\[6pt] &= \left(\tfrac{\pi}{4} + 0\right) - 0 = \tfrac{\pi}{4}\end{aligned}
  • The restriction on θ\theta makes cos⁡2θ\sqrt{\cos^{2}\theta} equal cos⁡θ\cos\theta, not ∣cos⁡θ∣\lvert\cos\theta\rvert. The curve y=1−x2y = \sqrt{1-x^{2}} for 0≤x≤10 \le x \le 1 is a quarter of the unit circle, whose area is π4\frac{\pi}{4}. Figure 6(a) in section 7 draws it.
  • For an indefinite integral you would return to xx with θ=arcsin⁡x\theta = \arcsin x and sin⁡2θ=2x1−x2\sin 2\theta = 2x\sqrt{1-x^{2}}.

Example 9: a "show that". Use x=2sin⁡θx = 2\sin\theta to show that ∫02x24−x2 dx=π\displaystyle\int_{0}^{2} x^{2}\sqrt{4-x^{2}}\,dx = \pi.

  • Here dx=2cos⁡θ dθdx = 2\cos\theta\,d\theta, the limits become θ=0\theta = 0 and π2\frac{\pi}{2}, and 4−x2=2cos⁡θ\sqrt{4-x^{2}} = 2\cos\theta because 4−4sin⁡2θ=4cos⁡2θ4-4\sin^{2}\theta = 4\cos^{2}\theta.
∫02x24−x2 dx=∫0π/24sin⁡2θ⋅2cos⁡θ⋅2cos⁡θ dθ=16∫0π/2sin⁡2θcos⁡2θ dθ=4∫0π/2sin⁡22θ dθsin⁡θcos⁡θ=12sin⁡2θ=2∫0π/2(1−cos⁡4θ)dθ=2[θ−14sin⁡4θ]0π/2=2⋅π2=π\begin{aligned}\int_{0}^{2} x^{2}\sqrt{4-x^{2}}\,dx &= \int_{0}^{\pi/2} 4\sin^{2}\theta\cdot 2\cos\theta\cdot 2\cos\theta\,d\theta \\[6pt] &= 16\int_{0}^{\pi/2} \sin^{2}\theta\cos^{2}\theta\,d\theta \\[6pt] &= 4\int_{0}^{\pi/2} \sin^{2}2\theta\,d\theta && \textcolor{#838c91}{\sin\theta\cos\theta = \tfrac{1}{2}\sin 2\theta} \\[6pt] &= 2\int_{0}^{\pi/2} \left(1-\cos 4\theta\right)d\theta \\[6pt] &= 2\left[\theta - \tfrac{1}{4}\sin 4\theta\right]_{0}^{\pi/2} = 2\cdot\frac{\pi}{2} = \pi\end{aligned}

The answer is given, so show every line.

5Integration by parts: where the formula comes from

For functions uu and vv of xx, the product rule says

ddx(uv)=u dvdx+v dudx \frac{d}{dx}(uv) = u\,\frac{dv}{dx} + v\,\frac{du}{dx}

Integrate both sides with respect to xx. The left side integrates back to uvuv. Rearranging gives the booklet rule:

∫u dvdx dx=uv−∫v dudx dx\displaystyle\int u\,\frac{dv}{dx}\,dx = uv - \int v\,\frac{du}{dx}\,dx · integration by parts. You choose which factor is uu (you will differentiate it) and which is dvdx\frac{dv}{dx} (you will integrate it).

  • The formula is a trade: the integral on the left for the one on the right. The trade is worth making only if the new integral, ∫v dudx dx\int v\,\frac{du}{dx}\,dx, is easier.
  • Figure 2 shows the same fact as areas. Plot vv against uu. The area under the curve is ∫v du\int v\,du. The area to its left is ∫u dv\int u\,dv. Together they fill the large rectangle u2v2u_{2}v_{2} minus the small one u1v1u_{1}v_{1}. Know one area and you know the other.
Figure 2 · Where integration by parts comes from ∫ v du ∫ u dv u₁v₁ the curve u v u₁ u₂ v₁ v₂ The two shaded areas fill the big rectangle once the small one is removed: ∫ v du + ∫ u dv = u₂v₂ − u₁v₁. Knowing one area gives you the other.
Figure 2 · Where integration by parts comes from

Example 10. Find ∫(2x−1)cos⁡4x dx\int (2x-1)\cos 4x\,dx.

  • A polynomial multiplies a trig function. Differentiate 2x−12x-1 and it becomes 2, which is simpler.
  • So u=2x−1u = 2x-1 and dvdx=cos⁡4x\frac{dv}{dx} = \cos 4x.
u=2x−1  ⇒  dudx=2u = 2x-1 \;\Rightarrow\; \frac{du}{dx} = 2dvdx=cos⁡4x  ⇒  v=14sin⁡4xno + C needed inside the working\frac{dv}{dx} = \cos 4x \;\Rightarrow\; v = \tfrac{1}{4}\sin 4x \qquad \textcolor{#838c91}{\text{no }+\,C\text{ needed inside the working}}∫(2x−1)cos⁡4x dx=14(2x−1)sin⁡4x−∫12sin⁡4x dx=14(2x−1)sin⁡4x+18cos⁡4x+C\begin{aligned}\int (2x-1)\cos 4x\,dx &= \tfrac{1}{4}(2x-1)\sin 4x - \int \tfrac{1}{2}\sin 4x\,dx \\[6pt] &= \tfrac{1}{4}(2x-1)\sin 4x + \tfrac{1}{8}\cos 4x + C\end{aligned}
  • Differentiating gives (2x−1)cos⁡4x(2x-1)\cos 4x back.
  • Choose the other way, u=cos⁡4xu = \cos 4x and dvdx=2x−1\frac{dv}{dx} = 2x-1, and the new integral contains (x2−x)sin⁡4x(x^{2}-x)\sin 4x. That has a higher power of xx than you began with. When the trade makes things worse, you chose uu badly. Stop and swap.

6Choosing uu, and the integrals that need a hidden 1

Figure 3 gives an order of preference for the products in this course. Read it from the left: the factor furthest left is uu. (Trig against exponential is the cyclic case of section 8. Either order works there.)

Figure 3 · Which factor to call u Logarithms ln x, log₂ x Inverse trig arcsin x, arctan x Polynomials x, x², 3x − 1 Trig sin x, cos 2x Exponentials eˣ, e³ˣ, 2ˣ best as u (differentiate it) best as dv/dx (integrate it) x sin x: polynomial beats trig, so u = x. ln x alone: u = ln x, dv/dx = 1. Pick u from as far left as you can. u is differentiated, so it should get simpler; dv/dx must be integrable.
Figure 3 · Which factor to call u
  • Logarithms and inverse trig functions have simple derivatives but awkward integrals, so they must be uu.
  • Polynomials shrink when differentiated, so they make a good uu against trig and exponential functions. Those do not grow more complicated when integrated.

Example 11. Find ∫x ln⁡x dx\int \sqrt{x}\,\ln x\,dx.

  • A logarithm beats a power, so u=ln⁡xu = \ln x and dvdx=x1/2\frac{dv}{dx} = x^{1/2}.
u=ln⁡x  ⇒  dudx=1xu = \ln x \;\Rightarrow\; \frac{du}{dx} = \frac{1}{x}dvdx=x1/2  ⇒  v=23x3/2\frac{dv}{dx} = x^{1/2} \;\Rightarrow\; v = \tfrac{2}{3}x^{3/2}∫x ln⁡x dx=23x3/2ln⁡x−∫23x3/2⋅1x dx=23x3/2ln⁡x−23∫x1/2 dx=23x3/2ln⁡x−49x3/2+C\begin{aligned}\int \sqrt{x}\,\ln x\,dx &= \tfrac{2}{3}x^{3/2}\ln x - \int \tfrac{2}{3}x^{3/2}\cdot\frac{1}{x}\,dx \\[6pt] &= \tfrac{2}{3}x^{3/2}\ln x - \tfrac{2}{3}\int x^{1/2}\,dx \\[6pt] &= \tfrac{2}{3}x^{3/2}\ln x - \tfrac{4}{9}x^{3/2} + C\end{aligned}
  • The 1x\frac{1}{x} from ln⁡x\ln x cancels a power of xx, which is why ln⁡x\ln x must be uu.

Example 12: ln⁡x\ln x on its own. With only one factor, write ∫ln⁡x dx\int \ln x\,dx as ∫1×ln⁡x dx\int 1 \times \ln x\,dx, with u=ln⁡xu = \ln x and dvdx=1\frac{dv}{dx} = 1, so v=xv = x.

∫ln⁡x dx=xln⁡x−∫x⋅1x dx=xln⁡x−∫1 dx=xln⁡x−x+C\begin{aligned}\int \ln x\,dx &= x\ln x - \int x\cdot\frac{1}{x}\,dx = x\ln x - \int 1\,dx \\[6pt] &= x\ln x - x + C\end{aligned}
  • This result is not in the formula booklet, so be able to derive it in three lines. Figure 6(b) uses it: the area under y=ln⁡xy = \ln x from 1 to ee is (e−e)−(0−1)=1(e - e) - (0 - 1) = 1.

Example 13: arcsin⁡x\arcsin x on its own, as a definite integral. Find the exact value of ∫01/2arcsin⁡x dx\displaystyle\int_{0}^{1/2}\arcsin x\,dx. The same hidden 1 works: u=arcsin⁡xu = \arcsin x, dvdx=1\frac{dv}{dx} = 1.

dudx=11−x2,v=x\frac{du}{dx} = \frac{1}{\sqrt{1-x^{2}}}, \qquad v = x∫arcsin⁡x dx=xarcsin⁡x−∫x1−x2 dx=xarcsin⁡x+1−x2+Cinspection: the inside 1−x2 has derivative −2x\begin{aligned}\int \arcsin x\,dx &= x\arcsin x - \int \frac{x}{\sqrt{1-x^{2}}}\,dx \\[6pt] &= x\arcsin x + \sqrt{1-x^{2}} + C && \textcolor{#838c91}{\text{inspection: the inside }1-x^{2}\text{ has derivative }-2x}\end{aligned}∫01/2arcsin⁡x dx=[xarcsin⁡x+1−x2]01/2=(12⋅π6+32)−(0+1)=π12+32−1\begin{aligned}\int_{0}^{1/2}\arcsin x\,dx &= \left[x\arcsin x + \sqrt{1-x^{2}}\right]_{0}^{1/2} \\[6pt] &= \left(\tfrac{1}{2}\cdot\tfrac{\pi}{6} + \tfrac{\sqrt{3}}{2}\right) - (0+1) = \frac{\pi}{12} + \frac{\sqrt{3}}{2} - 1\end{aligned}
  • arccos⁡x\arccos x follows the same road: ∫arccos⁡x dx=xarccos⁡x−1−x2+C\int \arccos x\,dx = x\arccos x - \sqrt{1-x^{2}} + C, since ddxarccos⁡x=−11−x2\frac{d}{dx}\arccos x = -\frac{1}{\sqrt{1-x^{2}}}. Example 15 gives arctan⁡x\arctan x.

Example 14: a power of a logarithm. Find ∫x(ln⁡x)2 dx\int x(\ln x)^{2}\,dx.

  • The logarithm is uu, and this time it carries a power: u=(ln⁡x)2u = (\ln x)^{2}, dvdx=x\frac{dv}{dx} = x.
dudx=2ln⁡xx,v=12x2\frac{du}{dx} = \frac{2\ln x}{x}, \qquad v = \tfrac{1}{2}x^{2}∫x(ln⁡x)2 dx=12x2(ln⁡x)2−∫12x2⋅2ln⁡xx dx=12x2(ln⁡x)2−∫xln⁡x dx=12x2(ln⁡x)2−12x2ln⁡x+14x2+Ca second round of parts for ∫xln⁡x dx\begin{aligned}\int x(\ln x)^{2}\,dx &= \tfrac{1}{2}x^{2}(\ln x)^{2} - \int \tfrac{1}{2}x^{2}\cdot\frac{2\ln x}{x}\,dx \\[6pt] &= \tfrac{1}{2}x^{2}(\ln x)^{2} - \int x\ln x\,dx \\[6pt] &= \tfrac{1}{2}x^{2}(\ln x)^{2} - \tfrac{1}{2}x^{2}\ln x + \tfrac{1}{4}x^{2} + C && \textcolor{#838c91}{\text{a second round of parts for }\int x\ln x\,dx}\end{aligned}
  • The case with no xx in front gives a result worth remembering: ∫(ln⁡x)2 dx=x(ln⁡x)2−2xln⁡x+2x+C\int(\ln x)^{2}\,dx = x(\ln x)^{2} - 2x\ln x + 2x + C. Find it by writing the integrand as 1×(ln⁡x)21\times(\ln x)^{2}.
  • If the integrand has the logarithm of a power, such as ln⁡x3\ln x^{3}, pull the power out first: ln⁡x3=3ln⁡x\ln x^{3} = 3\ln x.

Example 15: "differentiate, hence find". Differentiate xarctan⁡xx\arctan x, and use your result to find ∫arctan⁡x dx\int \arctan x\,dx.

The product rule gives ddx(xarctan⁡x)=arctan⁡x+x1+x2\dfrac{d}{dx}\left(x\arctan x\right) = \arctan x + \dfrac{x}{1+x^{2}}. Integrate both sides: xarctan⁡x=∫arctan⁡x dx+12ln⁡(1+x2)x\arctan x = \int \arctan x\,dx + \tfrac{1}{2}\ln(1+x^{2}) (constant absorbed; no modulus, since 1+x2>01+x^{2}>0), so

∫arctan⁡x dx=xarctan⁡x−12ln⁡(1+x2)+C \int \arctan x\,dx = x\arctan x - \tfrac{1}{2}\ln(1+x^{2}) + C

This is parts in disguise. "Hence" tells you to use the first part.

Definite integrals by parts. Evaluate the uvuv term between the limits too. For ∫0πxsin⁡x2 dx\int_{0}^{\pi} x\sin\frac{x}{2}\,dx, with u=xu = x and v=−2cos⁡x2v = -2\cos\frac{x}{2}:

∫0πxsin⁡x2 dx=[−2xcos⁡x2]0π+2∫0πcos⁡x2 dx=(0−0)+2[2sin⁡x2]0π=4cos⁡π2=0 kills the boundary term\begin{aligned}\int_{0}^{\pi} x\sin\tfrac{x}{2}\,dx &= \Big[-2x\cos\tfrac{x}{2}\Big]_{0}^{\pi} + 2\int_{0}^{\pi}\cos\tfrac{x}{2}\,dx \\[6pt] &= (0 - 0) + 2\Big[2\sin\tfrac{x}{2}\Big]_{0}^{\pi} \\[6pt] &= 4 && \textcolor{#838c91}{\cos\frac{\pi}{2} = 0\text{ kills the boundary term}}\end{aligned}

7Repeated integration by parts

When one round leaves an integral that still needs parts, there are two patterns.

Pattern 1: the polynomial runs out. In ∫x2ex dx\int x^{2}e^{x}\,dx, take u=x2u = x^{2}. The new integral ∫2x ex dx\int 2x\,e^{x}\,dx is still a product, but the power has dropped to 1. One more round finishes it.

∫x2ex dx=x2ex−∫2x ex dxround 1: u=x2, v=ex\int x^{2}e^{x}\,dx = x^{2}e^{x} - \int 2x\,e^{x}\,dx \qquad \textcolor{#838c91}{\text{round 1: }u = x^{2}\text{, }v = e^{x}}∫2x ex dx=2x ex−∫2ex dx=2x ex−2exround 2: u=2x, v=ex\int 2x\,e^{x}\,dx = 2x\,e^{x} - \int 2e^{x}\,dx = 2x\,e^{x} - 2e^{x} \qquad \textcolor{#838c91}{\text{round 2: }u = 2x\text{, }v = e^{x}}∫x2ex dx=x2ex−(2x ex−2ex)+C=ex(x2−2x+2)+C\begin{aligned}\int x^{2}e^{x}\,dx &= x^{2}e^{x} - \left(2x\,e^{x} - 2e^{x}\right) + C \\[6pt] &= e^{x}\left(x^{2} - 2x + 2\right) + C\end{aligned}
  • The minus sign in front of the bracket applies to both terms of the second round. That is why −2ex-2e^{x} becomes +2ex+2e^{x}.
  • Figure 4 lays the same calculation out as a table:
    • Differentiate down the left until it reaches 0.
    • Integrate down the right.
    • Multiply along the arrows with alternating signs.
  • Use it to organise and check, but write at least the first round in the formula's form so the method shows.
Figure 4 · Repeated parts, laid out as a table u: differentiate dv/dx: integrate x² eˣ + 2x eˣ − 2 eˣ + 0 eˣ Differentiate down the left until it reaches 0; integrate down the right. Multiply along each arrow with signs +, −, +: x²eˣ − 2xeˣ + 2eˣ + C.
Figure 4 · Repeated parts, laid out as a table
  • A power nn needs nn rounds. For ∫(2x−1)2sin⁡4x dx\int (2x-1)^{2}\sin 4x\,dx, take u=(2x−1)2u = (2x-1)^{2}, so dudx=4(2x−1)\frac{du}{dx} = 4(2x-1) and v=−14cos⁡4xv = -\tfrac{1}{4}\cos 4x:
∫(2x−1)2sin⁡4x dx=−14(2x−1)2cos⁡4x+∫(2x−1)cos⁡4x dxround 1=−14(2x−1)2cos⁡4x+14(2x−1)sin⁡4x+18cos⁡4x+Cround 2 is Example 10\begin{aligned}\int (2x-1)^{2}\sin 4x\,dx &= -\tfrac{1}{4}(2x-1)^{2}\cos 4x + \int (2x-1)\cos 4x\,dx && \textcolor{#838c91}{\text{round 1}} \\[6pt] &= -\tfrac{1}{4}(2x-1)^{2}\cos 4x + \tfrac{1}{4}(2x-1)\sin 4x + \tfrac{1}{8}\cos 4x + C && \textcolor{#838c91}{\text{round 2 is Example 10}}\end{aligned}

Pattern 2: the integral comes back. In ∫exsin⁡x dx\int e^{x}\sin x\,dx neither factor gets simpler. Two rounds bring back the integral you started with. That is not a dead end: call it II and solve for it like an unknown.

I=∫exsin⁡x dx=exsin⁡x−∫excos⁡x dxround 1: u=sin⁡x, dvdx=ex\begin{aligned}I &= \int e^{x}\sin x\,dx \\[6pt] &= e^{x}\sin x - \int e^{x}\cos x\,dx && \textcolor{#838c91}{\text{round 1: }u = \sin x\text{, }\frac{dv}{dx} = e^{x}}\end{aligned}∫excos⁡x dx=excos⁡x+Iround 2: u=cos⁡x, trig again\int e^{x}\cos x\,dx = e^{x}\cos x + I \qquad \textcolor{#838c91}{\text{round 2: }u = \cos x\text{, trig again}}I=exsin⁡x−(excos⁡x+I)I = e^{x}\sin x - \left(e^{x}\cos x + I\right)2I=exsin⁡x−excos⁡x2I = e^{x}\sin x - e^{x}\cos xI=12ex(sin⁡x−cos⁡x)+Cthe constant is added at the endI = \tfrac{1}{2}e^{x}(\sin x - \cos x) + C \qquad \textcolor{#838c91}{\text{the constant is added at the end}}

In the cyclic case, keep the same type of function as uu in both rounds (trig both times, or exponential both times). Switch, and the second round undoes the first, leaving the useless line I=II = I.

Figure 5 shows the area under y=exsin⁡xy = e^{x}\sin x from 0 to π\pi:

∫0πexsin⁡x dx=[12ex(sin⁡x−cos⁡x)]0π=12eπ(0−(−1))−12e0(0−1)=12eπ+12=eπ+12≈12.07the decimal only on Paper 2, or if asked\begin{aligned}\int_{0}^{\pi} e^{x}\sin x\,dx &= \left[\tfrac{1}{2}e^{x}(\sin x - \cos x)\right]_{0}^{\pi} \\[6pt] &= \tfrac{1}{2}e^{\pi}\big(0 - (-1)\big) - \tfrac{1}{2}e^{0}(0 - 1) \\[6pt] &= \tfrac{1}{2}e^{\pi} + \tfrac{1}{2} \\[6pt] &= \frac{e^{\pi}+1}{2} \approx 12.07 && \textcolor{#838c91}{\text{the decimal only on Paper 2, or if asked}}\end{aligned}
Figure 5 · The area under y = eˣ sin x from 0 to π highest at x = 3π/4 (eπ + 1)/2 ≈ 12.07 y = eˣ sin x x y π/2 3π/4 π 2 4 6 8 Two rounds of parts give the exact area, about 12.07. On Paper 2 a GDC agrees.
Figure 5 · The area under y = eˣ sin x from 0 to π

When the exponent has a coefficient, the pattern is the same. The II terms collect with a number in front. For J=∫e−xcos⁡2x dxJ = \int e^{-x}\cos 2x\,dx, take the trig factor as uu both times:

J=−e−xcos⁡2x−2∫e−xsin⁡2x dxround 1: u=cos⁡2x, v=−e−xJ = -e^{-x}\cos 2x - 2\int e^{-x}\sin 2x\,dx \qquad \textcolor{#838c91}{\text{round 1: }u = \cos 2x\text{, }v = -e^{-x}}∫e−xsin⁡2x dx=−e−xsin⁡2x+2Jround 2: u=sin⁡2x\int e^{-x}\sin 2x\,dx = -e^{-x}\sin 2x + 2J \qquad \textcolor{#838c91}{\text{round 2: }u = \sin 2x}J=−e−xcos⁡2x+2e−xsin⁡2x−4JJ = -e^{-x}\cos 2x + 2e^{-x}\sin 2x - 4J5J=e−x(2sin⁡2x−cos⁡2x)5J = e^{-x}\left(2\sin 2x - \cos 2x\right)J=15e−x(2sin⁡2x−cos⁡2x)+CJ = \tfrac{1}{5}e^{-x}\left(2\sin 2x - \cos 2x\right) + C

Figure 6 checks two earlier results: π4\frac{\pi}{4} from Example 8 and ∫1eln⁡x dx=1\int_{1}^{e} \ln x\,dx = 1 from Example 12. On Paper 2 a GDC's integral does the same in seconds.

Figure 6 · Two results you can check with a picture (a) ∫ √(1 − x²) dx from 0 to 1 (sin θ, cos θ) θ area = π/4 x y 0.5 1 0.5 1 (b) ∫ ln x dx from 1 to e area = 1 y = ln x x y 1 2 e 3 0.5 1 (a) x = sin θ turns ∫ √(1 − x²) dx into ∫ cos²θ dθ, and the answer π/4 is a quarter of the unit circle. (b) Parts gives ∫ ln x dx = x ln x − x, so the area from 1 to e is exactly 1.
Figure 6 · Two results you can check with a picture

8Putting the techniques together

Which technique? Three questions, in this order.

  1. Is it on the standard list, or a composite with ax+bax+b? Integrate directly (5.10, 5.15).
  2. Is it a function of an inside function, times (a multiple of) its derivative? Inspection, no hint given. ∫x ex2 dx\int x\,e^{x^{2}}\,dx and ∫ln⁡xx dx\int \frac{\ln x}{x}\,dx are this type. So is ∫f′(x)f(x) dx=ln⁡∣f(x)∣+C\int \frac{f'(x)}{f(x)}\,dx = \ln\lvert f(x)\rvert + C.
  3. A product of two kinds of function, or a lone ln, power of ln or inverse trig? Parts, with uu from Figure 3.

A given substitution must be used, whatever you would have chosen. Some integrals need both techniques, in either order.

Substitution, then parts. Use u=x2u = x^{2} to find ∫x3cos⁡(x2) dx\int x^{3}\cos(x^{2})\,dx. Then x3 dx=x2⋅x dx=12u dux^{3}\,dx = x^{2}\cdot x\,dx = \tfrac{1}{2}u\,du, and parts finishes it.

∫x3cos⁡(x2) dx=12∫ucos⁡u du=12(usin⁡u−∫sin⁡u du)parts: the polynomial u is differentiated=12(usin⁡u+cos⁡u)+C=12(x2sin⁡x2+cos⁡x2)+C\begin{aligned}\int x^{3}\cos(x^{2})\,dx &= \tfrac{1}{2}\int u\cos u\,du \\[6pt] &= \tfrac{1}{2}\left(u\sin u - \int \sin u\,du\right) && \textcolor{#838c91}{\text{parts: the polynomial }u\text{ is differentiated}} \\[6pt] &= \tfrac{1}{2}\left(u\sin u + \cos u\right) + C \\[6pt] &= \tfrac{1}{2}\left(x^{2}\sin x^{2} + \cos x^{2}\right) + C\end{aligned}

Substitution, then the cyclic case. Use t=arcsin⁡xt = \arcsin x to find ∫earcsin⁡x dx\int e^{\arcsin x}\,dx. Here x=sin⁡tx = \sin t and dx=cos⁡t dtdx = \cos t\,dt, so the integral becomes ∫etcos⁡t dt\int e^{t}\cos t\,dt. That is a cyclic integral like the one in section 8. Two rounds with the trig factor as uu give 12et(sin⁡t+cos⁡t)+C\tfrac{1}{2}e^{t}(\sin t + \cos t) + C. Return to xx with sin⁡t=x\sin t = x and cos⁡t=1−x2\cos t = \sqrt{1-x^{2}} (cos⁡t≥0\cos t \ge 0, since −π2≤t≤π2-\frac{\pi}{2} \le t \le \frac{\pi}{2}):

∫earcsin⁡x dx=12earcsin⁡x(x+1−x2)+C \int e^{\arcsin x}\,dx = \tfrac{1}{2}e^{\arcsin x}\left(x + \sqrt{1-x^{2}}\right) + C

A reduction formula. A longer question may link a family of integrals. For In=∫xne2x dxI_{n} = \int x^{n}e^{2x}\,dx, parts with u=xnu = x^{n} and v=12e2xv = \tfrac{1}{2}e^{2x} gives, for n≥1n \ge 1,

In=12xne2x−n2∫xn−1e2x dx=12xne2x−n2In−1I_{n} = \tfrac{1}{2}x^{n}e^{2x} - \tfrac{n}{2}\int x^{n-1}e^{2x}\,dx = \tfrac{1}{2}x^{n}e^{2x} - \tfrac{n}{2}I_{n-1}

and starting from I0=12e2x+CI_{0} = \tfrac{1}{2}e^{2x} + C you can build I1,I2,…I_{1}, I_{2}, \dots one at a time. No new integration is needed.

Practice questions

10 questions on this note, from easy to hard. Each one you get right lights a star of this topic's constellation.