Free lesson · Integral calculus
Integration by parts: transfer a derivative
Open interactive lessonPractice calculationsExplore labs
Start with the idea
- Integration by parts moves the differentiation from one factor to another. Keep the end-minus-start term as well as the remaining integral.
Symbols, units & horizon
- u,v: differentiable factors of the same integration variable
- du,dv: their differentials
- a,b: lower and upper bounds
- [uv]_a^b: u(b)v(b)−u(a)v(a)
- x: dimensionless input
- e: exponential base
- the example has no time horizon
When and why to use this
Use integration by parts for moments of continuous distributions, discounted time-weighted cash flows and analytic benchmarks for numerical integration.
Start here · the same idea in everyday words
| Technical term | Everyday meaning | Concrete example |
|---|---|---|
| Antiderivative | A function whose derivative returns the original integrand. | An antiderivative of 2x is x squared; differentiating x squared gives 2x. |
| Boundary term | An expression evaluated at the end minus its value at the start. | For x times exp(x) from 0 to 1, the product at the bounds gives e minus zero. |
| Rearrange | Move terms to isolate the part you want, while preserving equality. | Subtract the other integral from both sides of the integrated product rule. |
Unpack a technical sentence
Technical wording: Retain the boundary contribution when transferring the derivative.
Read it as: Integration by parts moves the differentiation from one factor to another. Keep the end-minus-start term as well as the remaining integral.
A slower worked example · one step at a time
- Integrate x times exp(x) from 0 to 1, using dimensionless values.
- Choose the factor x to differentiate: its derivative is 1. Choose exp(x) to integrate: its antiderivative is exp(x).
- The product at the upper bound is 1 times e. At the lower bound it is 0 times 1. Their difference is e.
- The remaining integral of exp(x) from 0 to 1 is e minus 1. Subtract it from the boundary term.
- You get e minus (e minus 1), which is 1. The parentheses matter: subtracting the whole quantity changes both signs.
Self-assessed: Why is the answer not just the boundary term e?
The rearranged product rule also contains a remaining integral. Omitting it changes the result.
Study loop: predict the result, work through the arithmetic, run the Python, then explain which assumption would make the result unreliable.
- Write one factor as u and the other as dv, then find du and an antiderivative v. This is a choice of roles, not a substitution of variables.
- Integrate the product rule for uv and rearrange. For definite integrals, the boundary term is evaluated at both endpoints.
- Polynomial times exponential is a useful first case: differentiating the polynomial reduces its degree. Repeated integration by parts handles higher powers.
Before reading the working, evaluate 1. Give the result in dimensionless area.
The exact area is 1. Keeping only the boundary term e would overstate the result by e−1.
Integration by parts: transfer a derivative
- Choose u=x, dv=exp(x) dx, so du=dx and v=exp(x).
- The boundary term is 1×e−0×1=e. The remaining integral is e−1.
- Subtract e−(e−1)=1. The antiderivative (x−1)exp(x) differentiates back to x exp(x).
The exact area is 1. Keeping only the boundary term e would overstate the result by e−1.
An analogy to remember
Transfer one task between two factors: differentiating a polynomial makes it simpler, while integrating an exponential leaves it familiar.
How this becomes a building block
An analytic moment or discounted-flow integral can become a reference case for a numerical pricing engine.
Python · run and reuse
Architecture pseudocode
# Python 3.10+; standard library only unless NumPy is imported.
# Synthetic teaching inputs; no historical performance claim.
from math import exp
def polynomial_exponential_integral(a,b):
# Dimensionless bounds; signed integral when b < a.
def primitive(x): return (x-1)*exp(x)
return primitive(b)-primitive(a)
print(polynomial_exponential_integral(0,1))
# Replay the slower, synthetic example above. Units are stated in its steps.
def plain_language_example():
from math import exp, e # Standard library; no extra dependency.
return {
"boundary": e,
"remaining": e-1,
"answer": e-(e-1),
}
print(plain_language_example())Self-assessed: explain the calculation, its output units, and one condition under which it fails.
Use integration by parts for moments of continuous distributions, discounted time-weighted cash flows and analytic benchmarks for numerical integration. Boundary terms matter. On an infinite domain, justify their limiting values and convergence before discarding them.
For current applications and implementation limits, see the research checkpoint in Differential Equations.
Research sources, review dates and limitations
Extend the research question
Distinguish accumulated realized funding from extrapolating the most recent quoted rate. Build a time ledger before annualizing an observed return.
Continue with the connected research module →
Python implementation
Self-contained teaching example. Python 3.10+; dependencies and input conventions are shown in the code and notation. Run in your own Python environment.
# Python 3.10+; standard library only unless NumPy is imported.
# Synthetic teaching inputs; no historical performance claim.
from math import exp
def polynomial_exponential_integral(a,b):
# Dimensionless bounds; signed integral when b < a.
def primitive(x): return (x-1)*exp(x)
return primitive(b)-primitive(a)
print(polynomial_exponential_integral(0,1))
# Replay the slower, synthetic example above. Units are stated in its steps.
def plain_language_example():
from math import exp, e # Standard library; no extra dependency.
return {
"boundary": e,
"remaining": e-1,
"answer": e-(e-1),
}
print(plain_language_example())Continue learning
Integral Calculus: Accumulation & Area — all lessons- Start with rectangles: rate × time = amount
- Definite integrals: adding many small contributions
- Core integral rules: undo a derivative, then check
- Antiderivatives and the fundamental theorem
- Integration techniques: substitution and integration by parts
- Improper integrals, densities and continuous expectations
- Numerical integration and a continuous cash-flow building block
- Substitution: reverse the chain rule without losing the bounds
- Integration by parts: transfer a derivative
Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations