- Practice
- About 20 min
- 5 practice questions
Integration by parts and Bernoulli's formula
Integrate products with ∫ u dv = uv − ∫ v du, choose u wisely, use Bernoulli's formula for repeated parts, and find ∫ eᵃˣ sin bx dx, ∫ eᵃˣ cos bx dx and ∫ eˣ[f(x) + f′(x)] dx.
If something looks wrong, please tell us.
By the end of this lesson you can
- Derive and apply the integration by parts formula ∫ u dv = uv − ∫ v du.
- Choose u by the textbook's guidelines, including for log x and tan⁻¹x on their own.
- Use Bernoulli's formula when u is a power xⁿ.
- Evaluate ∫ eᵃˣ sin bx dx and ∫ eᵃˣ cos bx dx, and spot the pattern ∫ eˣ[f(x) + f′(x)] dx.
There is no product rule for integrals in the simple sense: ∫ x eˣ dx is not (∫ x dx)(∫ eˣ dx). But the product rule for derivatives can be turned round into a method, and that method also integrates single functions such as log x and tan⁻¹x, which have no direct formula.
The formula
For differentiable u and v, d(uv) = u dv + v du, so u dv = d(uv) − v du. Integrating both sides:
∫ u dv = uv − ∫ v du
The formula does not finish the integral; it exchanges ∫ u dv for ∫ v du, which should be simpler. (This is why the method is also called partial integration.) Its success depends on the choice of u. The textbook's guidelines: (i) if the integrand contains a function with no direct integral, such as log x or tan⁻¹x, take it as u and the rest as dv; (ii) if both functions can be integrated and one is xⁿ (n a positive integer), take u = xⁿ, so that differentiating lowers the power; (iii) otherwise the choice is yours. Once a choice of u and dv is made in a problem, keep the same kind of choice in later steps; swapping undoes the work.
Worked example 1: x times a trigonometric function
Find ∫ x sin x dx. Take u = x, so du = dx, and dv = sin x dx, so v = −cos x. Then ∫ x sin x dx = x(−cos x) − ∫ (−cos x) dx = −x cos x + sin x + c. Check: d/dx(−x cos x + sin x) = −cos x + x sin x + cos x = x sin x.
Worked example 2: a logarithm in the product
Find ∫ x² log x dx. log x has no simple integral, so take u = log x, du = dx/x, and dv = x² dx, v = x³/3. Then ∫ x² log x dx = (x³/3) log x − ∫ (x³/3)(1/x) dx = (x³/3) log x − ∫ x²/3 dx = (x³/3) log x − x³/9 + c.
Worked example 3: a single inverse function
Find ∫ tan⁻¹x dx. Take u = tan⁻¹x, du = dx/(1 + x²), and dv = dx, v = x. Then ∫ tan⁻¹x dx = x tan⁻¹x − ∫ x/(1 + x²) dx. The last integral is (1/2) ∫ 2x/(1 + x²) dx = (1/2) log(1 + x²). So the answer is x tan⁻¹x − (1/2) log(1 + x²) + c. In the same way ∫ log x dx = x log x − x + c.
Bernoulli's formula
When u = xⁿ, parts must be applied n times. Bernoulli's formula does all the steps at once:
∫ u dv = u v − u′ v₁ + u″ v₂ − u‴ v₃ + ..., where u′, u″, u‴, ... are successive derivatives of u, and v, v₁, v₂, ... are successive integrals of dv.
The signs alternate +, −, +, −, and the series stops when a derivative of u becomes 0. Arrange the work in two columns, derivatives of u on the left and integrals of dv on the right.
Worked example 4: x² e³ˣ
Find ∫ x² e^(3x) dx. Take u = x², so u′ = 2x, u″ = 2, u‴ = 0. Integrals of e^(3x): v = e^(3x)/3, v₁ = e^(3x)/9, v₂ = e^(3x)/27. Bernoulli: x² (e^(3x)/3) − 2x (e^(3x)/9) + 2 (e^(3x)/27) + c = e^(3x)(x²/3 − 2x/9 + 2/27) + c. Check by differentiating: d/dx[x²e^(3x)/3] = (2x/3 + x²)e^(3x); d/dx[−2x e^(3x)/9] = (−2/9 − 2x/3)e^(3x); d/dx[2e^(3x)/27] = (2/9)e^(3x). The sum is x² e^(3x).
Worked example 5: x³ sin x
Find ∫ x³ sin x dx. Derivatives of u = x³: 3x², 6x, 6, 0. Successive integrals of sin x: v = −cos x, v₁ = −sin x, v₂ = cos x, v₃ = sin x. Bernoulli: x³(−cos x) − 3x²(−sin x) + 6x(cos x) − 6(sin x) + c = −x³ cos x + 3x² sin x + 6x cos x − 6 sin x + c.
Integrals of eᵃˣ sin bx and eᵃˣ cos bx
Here parts never terminates, but after two applications the original integral reappears, and we solve for it. Let I = ∫ eᵃˣ sin bx dx. Take u = sin bx and dv = eᵃˣ dx: I = (eᵃˣ/a) sin bx − (b/a) ∫ eᵃˣ cos bx dx. Apply parts again with u = cos bx (the same kind of choice): ∫ eᵃˣ cos bx dx = (eᵃˣ/a) cos bx + (b/a) I. Substituting, I = (eᵃˣ/a) sin bx − (b/a²) eᵃˣ cos bx − (b²/a²) I. Multiply by a² and collect the I terms: (a² + b²) I = eᵃˣ(a sin bx − b cos bx).
| Integral | Result |
|---|---|
| ∫ eᵃˣ sin bx dx | eᵃˣ (a sin bx − b cos bx)/(a² + b²) + c |
| ∫ eᵃˣ cos bx dx | eᵃˣ (a cos bx + b sin bx)/(a² + b²) + c |
Worked example 6
Find ∫ e^(2x) cos 3x dx. Here a = 2, b = 3 and a² + b² = 13, so the answer is e^(2x)(2 cos 3x + 3 sin 3x)/13 + c. Check: d/dx[e^(2x)(2 cos 3x + 3 sin 3x)] = 2e^(2x)(2 cos 3x + 3 sin 3x) + e^(2x)(−6 sin 3x + 9 cos 3x) = e^(2x)(13 cos 3x), and dividing by 13 gives the integrand.
The pattern ∫ eˣ[f(x) + f′(x)] dx
Split the integral as ∫ eˣ f(x) dx + ∫ eˣ f′(x) dx and apply parts to the first with u = f(x): ∫ eˣ f(x) dx = eˣ f(x) − ∫ eˣ f′(x) dx. The two ∫ eˣ f′(x) dx terms cancel, leaving ∫ eˣ[f(x) + f′(x)] dx = eˣ f(x) + c. The skill is to see the bracket as a function plus its derivative.
Worked example 7
(i) ∫ eˣ (log x + 1/x) dx: f = log x, f′ = 1/x, so the answer is eˣ log x + c. (ii) ∫ eˣ (tan x + sec²x) dx: f = tan x, f′ = sec²x, so the answer is eˣ tan x + c. (iii) ∫ eˣ (x + 1) dx: f = x, f′ = 1, so the answer is x eˣ + c.
Which by-parts tool?
-
log x or an inverse function present
Take it as u.
- ∫ x² log x dx
- ∫ tan⁻¹x dx
-
xⁿ times eᵃˣ, sin or cos
u = xⁿ; Bernoulli for n ≥ 2.
- ∫ x² e³ˣ dx
- ∫ x³ sin x dx
-
eᵃˣ times sin bx or cos bx
Parts twice, solve for I, or use the formula.
- ∫ e²ˣ cos 3x dx
-
eˣ times (f + f′)
Answer eˣ f(x) + c.
- ∫ eˣ(log x + 1/x) dx
Key takeaways: ∫ u dv = uv − ∫ v du; take u = log x or an inverse function when present, otherwise u = xⁿ; Bernoulli's formula handles repeated parts with alternating signs; eᵃˣ sin bx and eᵃˣ cos bx come back after two steps; and eˣ[f + f′] integrates to eˣ f.
Check your understanding
-
1. What is ∫ x e⁻ˣ dx?
- −x e⁻ˣ + e⁻ˣ + c
- x e⁻ˣ − e⁻ˣ + c
- −x e⁻ˣ − e⁻ˣ + c
- (x²/2) e⁻ˣ + c
Show answer
Answer: C. u = x, dv = e⁻ˣ dx, v = −e⁻ˣ. Then ∫ x e⁻ˣ dx = −x e⁻ˣ − ∫ (−e⁻ˣ) dx = −x e⁻ˣ + ∫ e⁻ˣ dx = −x e⁻ˣ − e⁻ˣ + c.
-
2. What is ∫ log x dx (x > 0)?
- 1/x + c
- x log x − x + c
- (log x)²/2 + c
- x log x + c
Show answer
Answer: B. u = log x, dv = dx, v = x: x log x − ∫ x (1/x) dx = x log x − x + c. Check: d/dx(x log x − x) = log x + 1 − 1 = log x.
-
3. For ∫ x² cos x dx by parts, what is the best choice of u?
- u = cos x
- u = x² cos x
- u = sin x
- u = x²
Show answer
Answer: D. Both x² and cos x can be integrated, and one is a power of x, so the textbook's guideline is u = x². Differentiating twice removes the power; taking u = cos x would raise the power to x³.
-
4. What is ∫ eˣ (cos x − sin x) dx?
- eˣ cos x + c
- eˣ sin x + c
- −eˣ sin x + c
- eˣ (sin x + cos x) + c
Show answer
Answer: A. With f(x) = cos x we have f′(x) = −sin x, so the integrand is eˣ[f + f′] and the integral is eˣ cos x + c.
-
5. What is ∫ eˣ sin x dx?
- eˣ cos x + c
- (eˣ/2)(sin x − cos x) + c
- (eˣ/2)(sin x + cos x) + c
- −eˣ cos x + c
Show answer
Answer: B. Use eᵃˣ(a sin bx − b cos bx)/(a² + b²) with a = b = 1: eˣ(sin x − cos x)/2 + c. Check: d/dx gives (eˣ/2)[(sin x − cos x) + (cos x + sin x)] = eˣ sin x.
Sign in to keep track of the lessons you finish.