Math IIIIntegration by parts
Integration by parts handles products of functions. The key decision is which factor to differentiate and which to integrate.
Basic, Standard: Grade 12 · Term 2 / Advanced: Grade 12 · Exam prep
Math problem generator
Choosing f and g'
Choose so that ∫f′(x)g(x)dx is simpler than the original integral. A useful order (the further left, the better as the part to differentiate, f):
Rule of thumb
logx > polynomials (x, x2, ...) > trig and exponential functions
For xex take f=x (its derivative 1 disappears); for xlogx take f=logx (its derivative is x1).
∫xexdx=xex−∫exdx=xex−ex+C=(x−1)ex+C
∫logxdx=∫(x)′logxdx=xlogx−∫x⋅x1dx=xlogx−x+C Integrating by parts twice
For a quadratic factor, as in x2ex or x2sinx, integrate by parts twice: the power drops 2→1→0.
∫x2exdx=x2ex−2∫xexdx=x2ex−2(x−1)ex+C=(x2−2x+2)ex+C When the original integral comes back
For ∫exsinxdx, integrating by parts twice brings the original integral I back on the right-hand side. Solve the equation for I.
I=∫exsinxdx=exsinx−∫excosxdx=exsinx−excosx−I
So 2I=ex(sinx−cosx) and I=21ex(sinx−cosx)+C.
Common mistakes
- Signs: the formula has "−∫". Use parentheses carefully the second time.
- The coefficient of g: if g′(x)=e2x, then g(x)=21e2x.
- Choosing the wrong way round: for xex, taking f=ex and g′=x gives ∫2x2exdx, which is worse.
Worked examples
Find the indefinite integral.
∫xlogxdx
Hint
logx is hard to integrate, so make it the part you differentiate (f).
Answer
∫xlogxdx=21x2logx−41x2+C (C is the constant of integration)
Solution
Let f(x)=logx and g′(x)=x. Then f′(x)=x1 and g(x)=21x2. Use integration by parts, ∫f(x)g′(x)dx=f(x)g(x)−∫f′(x)g(x)dx.
∫xlogxdx=21x2logx−∫21x2⋅x1dx=21x2logx−21∫xdx=21x2logx−41x2+C
Find the indefinite integral.
∫x2exdx
Hint
Integrate by parts twice; the power drops as x2→x→1.
Answer
∫x2exdx=(x2−2x+2)ex+C (C is the constant of integration)
Solution
Take f(x)=x2 and g′(x)=ex, and integrate by parts twice. Use integration by parts, ∫f(x)g′(x)dx=f(x)g(x)−∫f′(x)g(x)dx.
∫x2exdx=x2ex−2∫xexdx=x2ex−2{xex−∫exdx}=x2ex−2xex+2ex+C=(x2−2x+2)ex+C
Find the indefinite integral.
∫x3ex2dx
Hint
First substitute t=x2, then integrate by parts.
Answer
∫x3ex2dx=21(x2−1)ex2+C (C is the constant of integration)
Solution
Let t=x2. Then dt=2xdx, so x3ex2dx=x2ex2⋅xdx=21tetdt. Then integrate by parts:
∫x3ex2dx=21∫tetdt=21(tet−∫etdt)=21(t−1)et+C=21(x2−1)ex2+C
Practice problems
Find the indefinite integral.
∫xcosxdx
Hint
Differentiate x and integrate cosax.
Answer
∫xcosxdx=xsinx+cosx+C (C is the constant of integration)
Solution
Let f(x)=x and g′(x)=cosx. Then g(x)=sinx. Use integration by parts, ∫f(x)g′(x)dx=f(x)g(x)−∫f′(x)g(x)dx.
∫xcosxdx=xsinx−∫sinxdx=xsinx+cosx+C
Find the indefinite integral.
∫log(x+3)dx
Hint
Using (x+3)′=1 makes the calculation neat.
Answer
∫log(x+3)dx=(x+3)log(x+3)−x+C (C is the constant of integration)
Solution
Write log(x+3)=(x+3)′log(x+3) and integrate by parts with g(x)=x+3. Use integration by parts, ∫f(x)g′(x)dx=f(x)g(x)−∫f′(x)g(x)dx.
∫log(x+3)dx=(x+3)log(x+3)−∫(x+3)⋅x+31dx=(x+3)log(x+3)−∫dx=(x+3)log(x+3)−x+C
Taking g(x)=x instead gives xlog(x+3)−x+3log(x+3), which is the same expression.
Find the indefinite integral.
∫cos2xxdx
Hint
Integrate by parts using (tanx)′=cos2x1.
Answer
∫cos2xxdx=xtanx+log∣cosx∣+C (C is the constant of integration)
Solution
Since (tanx)′=cos2x1, integrate by parts with f(x)=x and g(x)=tanx. Also, ∫tanxdx=−log∣cosx∣+C.
∫cos2xxdx=xtanx−∫tanxdx=(xtanx+log∣cosx∣)+C