Free lesson · Integral calculus
Integration techniques: substitution and integration by parts
Open interactive lessonPractice calculationsExplore labs
Start with the idea
- Substitution reverses the chain rule.
- Integration by parts reverses the product rule.
- Both techniques transform an integral into a form you already know rather than changing its mathematical value.
Symbols, units & horizon
- u=g(x): substituted inner variable, or the chosen factor in integration by parts
- du=g′(x)dx: its differential
- dv=v′(x)dx: differential of the other factor
- [uv]ₐᵇ: u(b)v(b)−u(a)v(a)
- a,b: original bounds
- g(a),g(b): transformed bounds
- f: outer integrand after substitution
When and why to use this
Use substitution when an inner function and its derivative appear together; use integration by parts for products such as a polynomial times an exponential. Verify the transformed domain.
- For substitution, choose an inner expression u=g(x) whose derivative appears as another factor.
- Change the differential and, for a definite integral, the bounds too.
- Do not mix x-bounds with a u-integrand.
- For integration by parts, choose u and dv so that differentiating u simplifies it and integrating dv is feasible.
- The technique rearranges one unknown integral into a boundary term and another integral.
- It does not guarantee the new integral is easier.
Integration techniques: substitution and integration by parts
- For , set and . The transformed endpoints are still 0 and 1.
- Substitute and integrate: . Differentiate to check the original integrand.
- The product rule is . Integrating yields . Subtract the first integral to obtain integration by parts.
- For , choose , , so , . Substitute: .
Check the indefinite answers by differentiation: derivative of exp(x²) is 2x exp(x²), and derivative of (x−1)exp(x) is x exp(x).
An analogy to remember
Substitution is changing the unit on a ruler while also changing the interval labels. Integration by parts transfers some of the work from one factor to the other.
How this becomes a building block
Substitution underlies transformations between distributions and simplifications of discounting integrals. Integration by parts appears in expectation identities and continuous cash-flow manipulations. These operations often simplify one term within a larger pricing or risk calculation.
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.
from math import exp
def integrate_2x_exp_square(a,b):
return exp(b*b)-exp(a*a)
def integrate_x_exp(a,b):
primitive=lambda x:(x-1)*exp(x)
return primitive(b)-primitive(a)
print(integrate_2x_exp_square(0,1),integrate_x_exp(0,1))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
Quantitative finance and development glossary · Python resources and libraries · Research sources and limitations