Why This Matters
Many integrals cannot be solved by basic antiderivative rules alone. When you encounter the integral of a product of two functions -- such as x times e to the x, or x times sin(x) -- direct integration fails. Integration by parts gives you a systematic way to transform these products into simpler integrals that you can evaluate.
The technique is essentially the product rule for derivatives run in reverse. If you know that the derivative of u times v equals u prime times v plus u times v prime, then you can rearrange that into the uv formula: the integral of u dv equals uv minus the integral of v du. Choosing u and dv wisely is the art of the method. For repeated applications, the tabular method organizes the work into a compact table of successive derivatives and integrals, letting you read off the answer line by line.
Integration by parts appears throughout engineering, physics, and applied mathematics. It is how you derive formulas for Fourier coefficients, solve differential equations via reduction of order, and establish integration identities that underpin signal processing and probability theory.
Define Terms
Visual Model
The full process at a glance. Click Start tour to walk through each step.
Integration by parts transforms a product integral into uv minus a simpler integral, using the product rule in reverse.
Code Example
// Integration by Parts: numerical verification
// Integral of x * e^x dx from 0 to 1
// Exact answer: (x * e^x - e^x) from 0 to 1 = 1*e - e - (0 - 1) = 1
// Numerical integration using the trapezoidal rule
function trapezoid(f, a, b, n) {
const h = (b - a) / n;
let sum = 0.5 * (f(a) + f(b));
for (let i = 1; i < n; i++) {
sum += f(a + i * h);
}
return sum * h;
}
// The integrand: x * e^x
function integrand(x) {
return x * Math.exp(x);
}
// Numerical result with 10000 subintervals
const numerical = trapezoid(integrand, 0, 1, 10000);
console.log("Numerical:", numerical.toFixed(6));
// Exact result via integration by parts
// integral = [x*e^x - e^x] from 0 to 1 = (e - e) - (0 - 1) = 1
const exact = 1.0;
console.log("Exact:", exact.toFixed(6));
console.log("Error:", Math.abs(numerical - exact).toFixed(8));
// Tabular method example: integral of x^2 * e^x dx from 0 to 1
// Derivatives of x^2: x^2, 2x, 2, 0
// Integrals of e^x: e^x, e^x, e^x
// Result: x^2*e^x - 2x*e^x + 2*e^x
function exact2(x) {
return (x * x - 2 * x + 2) * Math.exp(x);
}
const exactVal = exact2(1) - exact2(0);
console.log("x^2 * e^x from 0 to 1:", exactVal.toFixed(6));Interactive Experiment
Try these exercises:
- Change the integrand to x * sin(x) and verify numerically that the integral from 0 to pi equals pi. What are u and dv here?
- Apply integration by parts to ln(x) from 1 to e. What do you choose as u and dv when only one function is visible?
- Use the tabular method on x^3 * e^x. How many rows does the table need before the derivative column reaches zero?
- Increase the number of trapezoid subintervals from 100 to 100000. How does the error shrink?
- Try integrating e^x * sin(x). You need to apply parts twice and solve for the integral algebraically. Can you verify numerically?
Quick Quiz
Coding Challenge
Write a function called `verifyIBP` that takes no arguments. It should numerically integrate x * e^x from 0 to 1 using the trapezoidal rule with 10000 subintervals, then compare to the exact answer of 1.0. Return the string 'PASS' if the absolute error is less than 0.001, otherwise return 'FAIL'.
Real-World Usage
Integration by parts is used extensively in science and engineering:
- Fourier analysis: Computing Fourier coefficients requires integrating products of functions with sines and cosines, which is done by integration by parts.
- Probability and statistics: Deriving the mean and variance of continuous distributions (like the gamma distribution) relies on integration by parts.
- Signal processing: Transfer functions and Laplace transforms are computed using integration by parts on exponential-product integrals.
- Physics: Work-energy calculations, electromagnetic field integrals, and quantum mechanical expectation values all use integration by parts.
- Differential equations: Reduction of order and variation of parameters both depend on integration by parts to simplify higher-order equations.