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
HL Integrate a product by parts, choosing u so the new integral is simpler
HL Find an integral using a given substitution, rewriting the whole integrand and changing the limits
HL Integrate ln x, arcsin x or arctan x by writing it as 1 times the function
HL Show a result by repeated parts, such as the integral of e to the x times sin x
HL Integrate by inspection when the integrand is a function of g(x) times a multiple of g'(x)
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 lnx 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. The inside function is x2, its derivative 2x sits outside, and the answer is sin(x2)+C. Written as a substitution, the working is:
u=x2⇒dxdu=2x⇒du=2xdx∫2xcos(x2)dx=∫cosudu=sinu+C=sin(x2)+Cthe 2xdx has become dualways return to x
The step du=2xdx says a small change in x changes u by 2x times as much.
Figure 1 shows the definite version from 0 to 1. On the left is the area under y=2xcos(x2). On the right, after u=x2, is the area under y=cosu. The curves look nothing alike, yet each strip keeps its area. Both totals are sin1≈0.841.
Figure 1 · A substitution changes the variable, not the area
The guide describes this SL shape as ∫kg′(x)f(g(x))dx: some function of an inside function 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)4dx.
The inside is 2x5−3 with derivative 10x4. The integrand has x4, which is 101 of that.
So take u=2x5−3, giving du=10x4dx and x4dx=101du.
Differentiating the answer returns x4(2x5−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.
For example, ∫x2+3x+52x+3dx=ln(x2+3x+5)+C. No modulus is needed, because x2+3x+5>0 always.
If the leftover is not a constant (a spare x, 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 du and dx; (2) replace every x and the dx, so that no x is left; (3) integrate in u; (4) put x back (or, for a definite integral, change the limits instead and stay in u).
Every x must go in move (2), not only the inside function: rearrange the substitution to write a spare x in terms of u.
Example 2. Use u=3−x to find ∫3−xxdx.
Here du=−dx, so dx=−du.
The spare x becomes 3−u.
u=3−x⇒dx=−duandx=3−u∫3−xxdx=∫u1/23−u(−du)=−∫(3u−1/2−u1/2)du=−6u1/2+32u3/2+C=32(3−x)3/2−6(3−x)1/2+Csplit into powers before integrating
The minus sign from dx=−du is easy to drop. Differentiate the final line to check.
Example 3: an exponential substitution. Use u=ex+4 to find ∫e2xex+4dx.
Now du=exdx. Write e2x=ex⋅ex.
One ex pairs with the dx to make du. The other must be in u, so ex=u−4.
Keep the modulus signs: here ex−3 and ex−2 can be negative for some x.
3Definite integrals: change the limits
For a definite integral you can put x back and use the original limits. Or change the limits into u-values and never go back to x. The second is usually shorter and easier to check.
Example 6. Use u=1+x to find the exact value of ∫14x(1+x)21dx.
Once the limits are in u, never put an x-value into an expression in u.
Example 7: an unknown function. Given that ∫19f(u)du=12, find ∫13xf(x2)dx.
You do not know f, so you cannot integrate it. Only a substitution connects the two integrals.
Take u=x2, so du=2xdx and xdx=21du; the limits x=1,3 become u=1,9.
∫13xf(x2)dx=21∫19f(u)du=21×12=6
The name of the variable inside a definite integral does not matter, so ∫19f(u)du=∫19f(x)dx. Write the new limits down explicitly.
4Substituting for x itself: trigonometric substitutions
Sometimes the question gives x as a function of the new variable. The classic case is a2−x2, which x=asinθ turns into a clean cosine. The same idea works for a2+x2 with x=atanθ, where 1+tan2θ=sec2θ does the cleaning.
Example 8. Find the exact value of ∫011−x2dx using x=sinθ, for 0≤θ≤2π.
x=sinθ⇒dx=cosθdθ;x=0→θ=0,x=1→θ=2π1−x2=1−sin2θ=cos2θ=cosθcosθ≥0 on this interval∫011−x2dx=∫0π/2cos2θdθ=∫0π/221(1+cos2θ)dθ=[21θ+41sin2θ]0π/2=(4π+0)−0=4πdouble-angle identity
The restriction on θ makes cos2θ equal cosθ, not ∣cosθ∣. The curve y=1−x2 for 0≤x≤1 is a quarter of the unit circle, whose area is 4π. Figure 6(a) in section 7 draws it.
For an indefinite integral you would return to x with θ=arcsinx and sin2θ=2x1−x2.
Example 9: a "show that". Use x=2sinθ to show that ∫02x24−x2dx=π.
Here dx=2cosθdθ, the limits become θ=0 and 2π, and 4−x2=2cosθ because 4−4sin2θ=4cos2θ.
5Integration by parts: where the formula comes from
For functions u and v of x, the product rule says
dxd(uv)=udxdv+vdxdu
Integrate both sides with respect to x. The left side integrates back to uv. Rearranging gives the booklet rule:
∫udxdvdx=uv−∫vdxdudx · integration by parts. You choose which factor is u (you will differentiate it) and which is dxdv (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, ∫vdxdudx, is easier.
Figure 2 shows the same fact as areas. Plot v against u. The area under the curve is ∫vdu. The area to its left is ∫udv. Together they fill the large rectangle u2v2 minus the small one u1v1. Know one area and you know the other.
Figure 2 · Where integration by parts comes from
Example 10. Find ∫(2x−1)cos4xdx.
A polynomial multiplies a trig function. Differentiate 2x−1 and it becomes 2, which is simpler.
So u=2x−1 and dxdv=cos4x.
u=2x−1⇒dxdu=2dxdv=cos4x⇒v=41sin4xno +C needed inside the working∫(2x−1)cos4xdx=41(2x−1)sin4x−∫21sin4xdx=41(2x−1)sin4x+81cos4x+C
Differentiating gives (2x−1)cos4x back.
Choose the other way, u=cos4x and dxdv=2x−1, and the new integral contains (x2−x)sin4x. That has a higher power of x than you began with. When the trade makes things worse, you chose u badly. Stop and swap.
6Choosing u, 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 u. (Trig against exponential is the cyclic case of section 8. Either order works there.)
Figure 3 · Which factor to call u
Logarithms and inverse trig functions have simple derivatives but awkward integrals, so they must be u.
Polynomials shrink when differentiated, so they make a good u against trig and exponential functions. Those do not grow more complicated when integrated.
Example 11. Find ∫xlnxdx.
A logarithm beats a power, so u=lnx and dxdv=x1/2.
The x1 from lnx cancels a power of x, which is why lnx must be u.
Example 12: lnx on its own. With only one factor, write ∫lnxdx as ∫1×lnxdx, with u=lnx and dxdv=1, so v=x.
∫lnxdx=xlnx−∫x⋅x1dx=xlnx−∫1dx=xlnx−x+C
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=lnx from 1 to e is (e−e)−(0−1)=1.
Example 13: arcsinx on its own, as a definite integral. Find the exact value of ∫01/2arcsinxdx. The same hidden 1 works: u=arcsinx, dxdv=1.
dxdu=1−x21,v=x∫arcsinxdx=xarcsinx−∫1−x2xdx=xarcsinx+1−x2+Cinspection: the inside 1−x2 has derivative −2x∫01/2arcsinxdx=[xarcsinx+1−x2]01/2=(21⋅6π+23)−(0+1)=12π+23−1
arccosx follows the same road: ∫arccosxdx=xarccosx−1−x2+C, since dxdarccosx=−1−x21. Example 15 gives arctanx.
Example 14: a power of a logarithm. Find ∫x(lnx)2dx.
The logarithm is u, and this time it carries a power: u=(lnx)2, dxdv=x.
dxdu=x2lnx,v=21x2∫x(lnx)2dx=21x2(lnx)2−∫21x2⋅x2lnxdx=21x2(lnx)2−∫xlnxdx=21x2(lnx)2−21x2lnx+41x2+Ca second round of parts for ∫xlnxdx
The case with no x in front gives a result worth remembering: ∫(lnx)2dx=x(lnx)2−2xlnx+2x+C. Find it by writing the integrand as 1×(lnx)2.
If the integrand has the logarithm of a power, such as lnx3, pull the power out first: lnx3=3lnx.
Example 15: "differentiate, hence find". Differentiate xarctanx, and use your result to find ∫arctanxdx.
The product rule gives dxd(xarctanx)=arctanx+1+x2x. Integrate both sides: xarctanx=∫arctanxdx+21ln(1+x2) (constant absorbed; no modulus, since 1+x2>0), so
∫arctanxdx=xarctanx−21ln(1+x2)+C
This is parts in disguise. "Hence" tells you to use the first part.
Definite integrals by parts. Evaluate the uv term between the limits too. For ∫0πxsin2xdx, with u=x and v=−2cos2x:
∫0πxsin2xdx=[−2xcos2x]0π+2∫0πcos2xdx=(0−0)+2[2sin2x]0π=4cos2π=0 kills the boundary term
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 ∫x2exdx, take u=x2. The new integral ∫2xexdx is still a product, but the power has dropped to 1. One more round finishes it.
The minus sign in front of the bracket applies to both terms of the second round. That is why −2ex becomes +2ex.
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
A power n needs n rounds. For ∫(2x−1)2sin4xdx, take u=(2x−1)2, so dxdu=4(2x−1) and v=−41cos4x:
∫(2x−1)2sin4xdx=−41(2x−1)2cos4x+∫(2x−1)cos4xdx=−41(2x−1)2cos4x+41(2x−1)sin4x+81cos4x+Cround 1round 2 is Example 10
Pattern 2: the integral comes back. In ∫exsinxdx neither factor gets simpler. Two rounds bring back the integral you started with. That is not a dead end: call it I and solve for it like an unknown.
I=∫exsinxdx=exsinx−∫excosxdxround 1: u=sinx, dxdv=ex∫excosxdx=excosx+Iround 2: u=cosx, trig againI=exsinx−(excosx+I)2I=exsinx−excosxI=21ex(sinx−cosx)+Cthe constant is added at the end
In the cyclic case, keep the same type of function as u in both rounds (trig both times, or exponential both times). Switch, and the second round undoes the first, leaving the useless line I=I.
Figure 5 shows the area under y=exsinx from 0 to π:
∫0πexsinxdx=[21ex(sinx−cosx)]0π=21eπ(0−(−1))−21e0(0−1)=21eπ+21=2eπ+1≈12.07the decimal only on Paper 2, or if asked
Figure 5 · The area under y = eˣ sin x from 0 to π
When the exponent has a coefficient, the pattern is the same. The I terms collect with a number in front. For J=∫e−xcos2xdx, take the trig factor as u both times:
Figure 6 checks two earlier results: 4π from Example 8 and ∫1elnxdx=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
8Putting the techniques together
Which technique? Three questions, in this order.
Is it on the standard list, or a composite with ax+b? Integrate directly (5.10, 5.15).
Is it a function of an inside function, times (a multiple of) its derivative? Inspection, no hint given. ∫xex2dx and ∫xlnxdx are this type. So is ∫f(x)f′(x)dx=ln∣f(x)∣+C.
A product of two kinds of function, or a lone ln, power of ln or inverse trig? Parts, with u 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=x2 to find ∫x3cos(x2)dx. Then x3dx=x2⋅xdx=21udu, and parts finishes it.
∫x3cos(x2)dx=21∫ucosudu=21(usinu−∫sinudu)=21(usinu+cosu)+C=21(x2sinx2+cosx2)+Cparts: the polynomial u is differentiated
Substitution, then the cyclic case. Use t=arcsinx to find ∫earcsinxdx. Here x=sint and dx=costdt, so the integral becomes ∫etcostdt. That is a cyclic integral like the one in section 8. Two rounds with the trig factor as u give 21et(sint+cost)+C. Return to x with sint=x and cost=1−x2 (cost≥0, since −2π≤t≤2π):
∫earcsinxdx=21earcsinx(x+1−x2)+C
A reduction formula. A longer question may link a family of integrals. For In=∫xne2xdx, parts with u=xn and v=21e2x gives, for n≥1,
In=21xne2x−2n∫xn−1e2xdx=21xne2x−2nIn−1
and starting from I0=21e2x+C you can build I1,I2,… 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.
Practice · 5.16 Integration by substitution and by parts