Integration by parts, and the general integral ∫R(x,X)dx
§§141–14240 min
The product rule read backwards, seen as two areas that fill a rectangle; its use for ∫Xdx; and Hardy's plan for integrating any rational function of x and the square root of a quadratic.
Substitution is the chain rule read backwards. Integration by parts is the product rule read backwards, and it is the second great tool of practical integration. It handles products such as xcosx and xnlogx, it integrates inverse functions (next lesson), and it produces reduction formulas that step an integral down from one exponent to the next. In this lesson Hardy uses it to finish the integrals of §140, ∫t2±α2dt and ∫α2−t2dt, and then sketches how every integral ∫R(x,ax2+2bx+c)dx can be computed.
The idea
The product rule says (uv)′=u′v+uv′. Integrating both sides,
uv=∫u′vdx+∫uv′dx,that is∫u′vdx=uv−∫uv′dx.
The integral we want, ∫u′v, is traded for another one, ∫uv′, which we hope is easier. For ∫xcosxdx, take v=x and u=sinx: then u′=cosx, v′=1, and
∫xcosxdx=xsinx−∫sinxdx=xsinx+cosx.
There is a picture behind the formula. Plot the points (u,v) as x varies. Then ∫vdu is the area under this curve and ∫udv the area to its left. Together they fill a rectangle of area uv (minus the small rectangle at the starting point).
ExploreTwo areas that fill a rectangle
Try this.The curve is (u,v)=(sinx,x) for x from 0 to b. Its blue area is ∫vdu=∫xcosxdx, and its ochre area is ∫udv=∫sinxdx. Drag b and watch both areas and the dashed rectangle. Then try the other examples.
∫vdu+∫udv=uv
u = sin xv = x
area below the curve: ∫ v du
area left of the curve: ∫ u dv
rectangle u·v
Blue: ∫0bxcosxdx≈0.4808. Ochre: ∫0bsinxdx=1−cosb≈0.6376. Together: 1.118, and the rectangle is bsinb=1.118. So ∫0bxcosxdx=bsinb+cosb−1.
What to notice
However the curve bends, the two areas always fill the rectangle u(b)v(b) exactly: that is integration by parts. If one area is easy to compute (here the ochre one, 1−cosb), the other follows by subtraction: ∫0bxcosxdx=bsinb−(1−cosb).
Precise statements
TheoremIntegration by partsHardy: §141
If f and F are differentiable, then
∫f′(x)F(x)dx=f(x)F(x)−∫f(x)F′(x)dx,
in the sense that if Ψ is an integral of fF′, then fF−Ψ is an integral of f′F.
Repeating the process gives a formula that Hardy records as Ex. XLIX. 10:
§142 gives a plan for any real rational function R of x and X, X=ax2+2bx+c. It is constructive, but long, and we summarise it.
Separate the square root. Since (X)2=X is rational, any rational expression in x and X can be written as E+FX with E,F rational in x (multiply numerator and denominator by the “conjugate” C−DX). The part E is done by §133, and FX=FX/X. So it is enough to integrate G/X with G rational.
Split G into partial fractions. Three kinds of integral can appear.
(i) ∫Xxmdx, m=0,1,2,… For m=0,1 this was §139. For larger m use the identity
dxd(xm−1X)=Xmaxm+(2m−1)bxm−1+(m−1)cxm−2,
which links three consecutive integrals: a reduction formula. Starting from m=0,1 we reach every m.
(ii) ∫(x−p)mXdx with p real: the substitution x−p=1/t turns it into an integral of type (i) in t.
(iii) Terms from a pair of complex roots of the denominator of G, such as ∫(Ax2+2Bx+C)XLx+Mdx. Hardy removes the cross terms of both quadratics at once by a substitution x=(μt+ν)/(t+1), and then rationalises the two resulting integrals by t/γt2+δ=u and 1/γt2+δ=v.
So, in principle, every such integral can be expressed by algebraic functions, logarithms and inverse tangents. In practice one looks for shortcuts first.
Proofs
ProofIntegration by parts
Strategy
Differentiate the proposed answer fF−Ψ, using the product rule.
Since Ψ′=fF′, we get (fF−Ψ)′=f′F+fF′−fF′=f′F. So fF−Ψ is an integral of f′F.
∎
ProofThe integral of X
Strategy
Integrate by parts with f=ax+b and F=y, rewrite (ax+b)2 in terms of y2, and solve the resulting equation for the unknown integral.
Parts
F′=2yX′=yax+b, so a∫ydx=(ax+b)y−∫y(ax+b)2dx.
An identity
aX=a2x2+2abx+ac=(ax+b)2+(ac−b2), so (ax+b)2=ay2−(ac−b2), and y(ax+b)2=ay−yac−b2.
Substitute
a∫ydx=(ax+b)y−a∫ydx+(ac−b2)∫ydx.
Solve
Move a∫ydx to the left and divide by 2a. (Read as a statement about integrals: if Φ is an integral of 1/y, the right-hand side with Φ in place of ∫dx/y has derivative y, as differentiation confirms.)
∎
The three standard forms follow by putting a=1, b=0, c=±α2 (so ac−b2=±α2) or a=−1, b=0, c=α2, and using §138. For α2−x2: (ax+b)y/2a=21xy and (ac−b2)/2a=21α2.
Worked examples and exercises
ExerciseThe area of a circle, in advance●●○Hardy: Examples XLIX, 1
Derive ∫α2−x2dx=21xα2−x2+21α2arcsin(x/α) directly by parts, without the general formula. What is the increase of this integral from x=−α to x=α?
Hint
Take f(x)=x, F(x)=α2−x2. Then ∫α2−x2=xα2−x2+∫α2−x2x2dx.
Hint
Write x2=α2−(α2−x2) in the last numerator.
Solution
Let I=∫α2−x2dx. Parts with f=x:
I=xα2−x2+∫α2−x2x2dx=xα2−x2+α2∫α2−x2dx−I.
So 2I=xα2−x2+α2arcsin(x/α), which is the formula. From −α to α the first term vanishes at both ends and the second goes from −21π to 21π, so the increase is 21πα2. Once we know (§148) that this is the area under the semicircle, the area of the circle is πα2.
ExerciseA reduction formula at work●●○Hardy: §142 (i)
Find ∫x2+1x2dx.
Hint
Use the identity for dxd(xm−1X) with m=2, a=1, b=0, c=1.
(The last step uses x−p>0.) To find the answer rather than check it, use §142 (ii): x−p=1/t reduces the integral to −∫dt/1+(p−q)t, an elementary integral.
ExerciseRepeated integration by parts●●○Hardy: Examples XLIX, 10
Use the formula for ∫f(n)Fdx with F(x)=x2 to find ∫x2cosxdx.
Hint
Take n=3, so that F′′′=0 and no integral is left. You need f′′′=cosx: work backwards, f′′=sinx, f′=−cosx, f=−sinx.
Solution
With f′′=sinx, f′=−cosx, f=−sinx and F=x2, F′=2x, F′′=2, F′′′=0, the formula for n=3 reads ∫f′′′F=f′′F−f′F′+fF′′−∫fF′′′, so
∫x2cosxdx=x2sinx+2xcosx−2sinx.
Check: the derivative is 2xsinx+x2cosx+2cosx−2xsinx−2cosx=x2cosx.
Exercise∫dx/y3●○○Hardy: Examples XLIX, 3
With y2=ax2+2bx+c and Δ=ac−b2=0, verify that ∫y3dx=Δyax+b.
Hint
Differentiate (ax+b)/y by the quotient rule, using y′=(ax+b)/y.
Solution
dxdyax+b=y2ay−(ax+b)y′=y3ay2−(ax+b)2=y3Δ, using ay2−(ax+b)2=ac−b2 from the proof above. Divide by Δ.
Check yourself
Check yourselfChoose one
To find ∫xlogxdx by parts (x>0), which choice works?
Why
With F=logx, f′=x: ∫xlogx=21x2logx−∫21x2⋅x1dx=21x2logx−41x2. The other choice needs ∫logx first and leaves a harder integral. The rule of thumb: differentiate the factor that gets simpler (logarithms, inverse functions, polynomials).
Check yourselfEnter a number
Using ∫xcosxdx=xsinx+cosx, find the increase of this integral from 0 to 21π (to three decimals). Check it in the widget with b at its maximum.
Why
At 21π: 21π+0; at 0: 0+1. The increase is 21π−1≈0.5708.
Check yourselfTrue or false?
Integration by parts always replaces an integral by a simpler one.
Why
False. It replaces ∫f′F by ∫fF′, which may be harder (try ∫xcosx with F=cosx: you get ∫21x2sinx). Sometimes it returns the same integral, which can be useful: in the derivation of ∫X we solved an equation for the unknown integral.
Check yourselfChoose one
The reduction identity of §142 with m=3 relates which integrals Ik=∫xk/Xdx?
Why
dxd(x2X)=X3ax3+5bx2+2cx, so x2X=3aI3+5bI2+2cI1: three consecutive integrals. Knowing I0 and I1, we get I2 from m=2, then I3 from m=3.
Hardy’s language
Summary
Summary
Integration by parts: ∫f′F=fF−∫fF′, the product rule backwards. Picture: the area under a curve plus the area to its left fill a rectangle.
Choose F to be the factor that gets simpler when differentiated; repeat as needed.
Parts can produce an equation for the unknown integral; solving it gives ∫ax2+2bx+cdx and the three standard forms with x2±α2, α2−x2.
Every ∫R(x,X)dx reduces to integrals of xm/X (reduction formula), of 1/{(x−p)mX} (substitute x−p=1/t), and of quadratic-denominator terms (Hardy’s substitution).