Integration by Parts#
A Gentle but Thorough Walkthrough
Integration by parts is one of those techniques that shows up everywhere: differential equations, signal processing, probability, and even physics. It’s the calculus equivalent of a Swiss‑army knife. The idea is simple, but using it well takes practice — and that’s exactly what this guide is for.
Below, I’ll walk through the intuition, the formula, and a series of worked examples. These examples come from a set of class notes in ECE 346, but I’ve expanded them with explanations, commentary, and checks so that anyone reading your blog can follow along.
1. Where Integration by Parts Comes From#
(Starting from the Product Rule)#
Most students memorize the formula
without ever seeing where it comes from. But it’s nothing more than the product rule written in reverse. Start with the product rule:
Integrate both sides:
The left side simplifies:
So we have:
Rearrange:
Now rewrite:
Then:
This is the integration‑by‑parts formula.
2. A Second Derivation#
(Using Differentials)#
The product rule can also be written as:
Integrate both sides:
The left side simplifies:
So:
Rearrange:
Same formula, different viewpoint.
3. What Integration by Parts Actually Does#
When you apply:
you are:
Differentiating \(u\) → it should get simpler
Integrating \(dv\) → it should be easy
Trading the original integral for a new one
The whole technique is about making the new integral easier.
4. Fully Worked Examples#
(With Explanations for Students Who Struggle)#
Example 1#
\(\int x e^x\,dx\)#
Choose:
\(u = x\)
\(dv = e^x dx\)
Then:
\(du = dx\)
\(v = e^x\)
Apply:
Factor:
Example 2#
\(\int x\cos x\,dx\)#
Choose:
\(u = x\)
\(dv = \cos x\,dx\)
Then:
\(du = dx\)
\(v = \sin x\)
Apply:
Example 3:#
\(\int \ln x\,dx\)#
Rewrite:
Choose:
\(u = \ln x\)
\(dv = dx\)
Then:
\(du = \frac{1}{x}dx\)
\(v = x\)
Apply:
Example 4#
\(\int \ln(x+2)\,dx\)#
Rewrite:
Choose:
\(u = \ln(x+2)\)
\(dv = dx\)
Then:
\(du = \frac{1}{x+2}dx\)
\(v = x\)
Apply:
Rewrite:
So:
Factor:
Example 5#
\(\int x^2 e^x\,dx\)#
Choose:
\(u = x^2\)
\(dv = e^x dx\)
Then:
\(du = 2x dx\)
\(v = e^x\)
Apply:
We already know:
So:
Example 6#
\(\int e^x \cos x\,dx\)#
Let:
Choose:
\(u = \cos x\)
\(dv = e^x dx\)
Then:
\(du = -\sin x dx\)
\(v = e^x\)
Apply:
Let:
Now integrate \(J\) by parts:
Choose:
\(u = \sin x\)
\(dv = e^x dx\)
Then:
\(du = \cos x dx\)
\(v = e^x\)
Apply:
Substitute back:
Solve:
5. Final Thoughts#
Integration by parts becomes much easier once you understand:
where the formula comes from,
how to choose \(u\) and \(dv\),
and what the formula is trying to do.
6. Practice Problem Set#
Part A — Basic Integration by Parts#
\(\int x e^{2x}\,dx\)
\(\int x\sin x\,dx\)
\(\int \ln x\,dx\)
\(\int x\cos(3x)\,dx\)
\(\int e^x (x+1)\,dx\)
Part B — Repeated Integration by Parts#
\(\int x^2 e^x\,dx\)
\(\int x^3 \cos x\,dx\)
\(\int x^2 \ln x\,dx\)
Part C — Looping Integrals#
\(\int e^x \sin x\,dx\)
\(\int e^{2x}\cos(3x)\,dx\)
Part D — Simplify First#
\(\int \frac{x}{x+1}\,dx\)
\(\int x\ln(x^2+1)\,dx\)
\(\int \frac{\ln x}{x}\,dx\)
Part E — Challenge Problems#
\(\int x e^{-x^2}\,dx\)
\(\int x^2 e^{-x^2}\,dx\)
\(\int \ln(\sin x)\,dx\)