In calculus, and more generally in mathematical analysis, integration by parts or partial integration is a process that finds the integral of a product of functions in terms of the integral of the product of their derivative and antiderivative. It is frequently used to transform the antiderivative of a product of functions into an antiderivative for which a solution can be more easily found. The rule can be thought of as an integral version of the product rule of differentiation; it is indeed derived using the product rule. The integration by parts formula states:
∫ a b u ( x ) v ′ ( x ) d x = [ u ( x ) v ( x ) ] a b − ∫ a b u ′ ( x ) v ( x ) d x = u ( b ) v ( b ) − u ( a ) v ( a ) − ∫ a b u ′ ( x ) v ( x ) d x . {\displaystyle {\begin{aligned}\int _{a}^{b}u(x)v'(x)\,dx&={\Big [}u(x)v(x){\Big ]}_{a}^{b}-\int _{a}^{b}u'(x)v(x)\,dx\\&=u(b)v(b)-u(a)v(a)-\int _{a}^{b}u'(x)v(x)\,dx.\end{aligned}}}
Or, letting u = u ( x ) {\displaystyle u=u(x)} and d u = u ′ ( x ) d x {\displaystyle du=u'(x)\,dx} while v = v ( x ) {\displaystyle v=v(x)} and d v = v ′ ( x ) d x , {\displaystyle dv=v'(x)\,dx,} the formula can be written more compactly:
∫ u d v = u v − ∫ v d u . {\displaystyle \int u\,dv\ =\ uv-\int v\,du.}
The former expression is written as a definite integral and the latter is written as an indefinite integral. Applying the appropriate limits to the latter expression should yield the former, but the latter is not necessarily equivalent to the former. Mathematician Brook Taylor discovered integration by parts, first publishing the idea in 1715. More general formulations of integration by parts exist for the Riemann–Stieltjes and Lebesgue–Stieltjes integrals. The discrete analogue for sequences is called summation by parts.
Theorem
Product of two functions The theorem can be derived as follows. For two continuously differentiable functions u ( x ) {\displaystyle u(x)} and v ( x ) {\displaystyle v(x)} , the product rule states:
( u ( x ) v ( x ) ) ′ = u ′ ( x ) v ( x ) + u ( x ) v ′ ( x ) . {\displaystyle {\Big (}u(x)v(x){\Big )}'=u'(x)v(x)+u(x)v'(x).}
Integrating both sides with respect to x {\displaystyle x} ,
∫ ( u ( x ) v ( x ) ) ′ d x = ∫ u ′ ( x ) v ( x ) d x + ∫ u ( x ) v ′ ( x ) d x , {\displaystyle \int {\Big (}u(x)v(x){\Big )}'\,dx=\int u'(x)v(x)\,dx+\int u(x)v'(x)\,dx,}
and noting that an indefinite integral is an antiderivative gives
u ( x ) v ( x ) = ∫ u ′ ( x ) v ( x ) d x + ∫ u ( x ) v ′ ( x ) d x , {\displaystyle u(x)v(x)=\int u'(x)v(x)\,dx+\int u(x)v'(x)\,dx,}
where we neglect writing the constant of integration. This yields the formula for integration by parts:
∫ u ( x ) v ′ ( x ) d x = u ( x ) v ( x ) − ∫ u ′ ( x ) v ( x ) d x , {\displaystyle \int u(x)v'(x)\,dx=u(x)v(x)-\int u'(x)v(x)\,dx,}
or in terms of the differentials d u = u ′ ( x ) d x {\displaystyle du=u'(x)\,dx} , d v = v ′ ( x ) d x , {\displaystyle dv=v'(x)\,dx,\quad }
∫ u ( x ) d v = u ( x ) v ( x ) − ∫ v ( x ) d u . {\displaystyle \int u(x)\,dv=u(x)v(x)-\int v(x)\,du.}
This is to be understood as an equality of functions with an unspecified constant added to each side. Taking the difference of each side between two values x = a {\displaystyle x=a} and x = b {\displaystyle x=b} and applying the fundamental theorem of calculus gives the definite integral version:
∫ a b u ( x ) v ′ ( x ) d x = u ( b ) v ( b ) − u ( a ) v ( a ) − ∫ a b u ′ ( x ) v ( x ) d x . {\displaystyle \int _{a}^{b}u(x)v'(x)\,dx=u(b)v(b)-u(a)v(a)-\int _{a}^{b}u'(x)v(x)\,dx.}
The original integral ∫ u v ′ d x {\displaystyle \int uv'\,dx} contains the derivative v'; to apply the theorem, one must find v, the antiderivative of v', then evaluate the resulting integral ∫ v u ′ d x . {\displaystyle \int vu'\,dx.}
Validity for less smooth functions It is not necessary for u {\displaystyle u} and v {\displaystyle v} to be continuously differentiable. Integration by parts works if u {\displaystyle u} is absolutely continuous and the function designated v ′ {\displaystyle v'} is Lebesgue integrable (but not necessarily continuous). (If v ′ {\displaystyle v'} has a point of discontinuity then its antiderivative v {\displaystyle v} may not have a derivative at that point.) If the interval of integration is not compact, then it is not necessary for u {\displaystyle u} to be absolutely continuous in the whole interval or for v ′ {\displaystyle v'} to be Lebesgue integrable in the interval, as a couple of examples (in which u {\displaystyle u} and v {\displaystyle v} are continuous and continuously differentiable) will show. For instance, if
u ( x ) = e x / x 2 , v ′ ( x ) = e − x {\displaystyle u(x)=e^{x}/x^{2},\,v'(x)=e^{-x}}
u {\displaystyle u} is not absolutely continuous on the interval [1, ∞), but nevertheless:
∫ 1 ∞ u ( x ) v ′ ( x ) d x = [ u ( x ) v ( x ) ] 1 ∞ − ∫ 1 ∞ u ′ ( x ) v ( x ) d x {\displaystyle \int _{1}^{\infty }u(x)v'(x)\,dx={\Big [}u(x)v(x){\Big ]}_{1}^{\infty }-\int _{1}^{\infty }u'(x)v(x)\,dx}
so long as [ u ( x ) v ( x ) ] 1 ∞ {\displaystyle \left[u(x)v(x)\right]_{1}^{\infty }} is taken to mean the limit of u ( L ) v ( L ) − u ( 1 ) v ( 1 ) {\displaystyle u(L)v(L)-u(1)v(1)} as L → ∞ {\displaystyle L\to \infty } and so long as the two terms on the right-hand side are finite. This is only true if we choose v ( x ) = − e − x . {\displaystyle v(x)=-e^{-x}.} Similarly, if
u ( x ) = e − x , v ′ ( x ) = x − 1 sin ( x ) {\displaystyle u(x)=e^{-x},\,v'(x)=x^{-1}\sin(x)}
v ′ {\displaystyle v'} is not Lebesgue integrable on the interval [1, ∞), but nevertheless
∫ 1 ∞ u ( x ) v ′ ( x ) d x = [ u ( x ) v ( x ) ] 1 ∞ − ∫ 1 ∞ u ′ ( x ) v ( x ) d x {\displaystyle \int _{1}^{\infty }u(x)v'(x)\,dx={\Big [}u(x)v(x){\Big ]}_{1}^{\infty }-\int _{1}^{\infty }u'(x)v(x)\,dx}
with the same interpretation. One can also easily come up with similar examples in which u {\displaystyle u} and v {\displaystyle v} are not continuously differentiable. Further, if f ( x ) {\displaystyle f(x)} is a function of bounded variation on the segment [ a , b ] , {\displaystyle [a,b],} and φ ( x ) {\displaystyle \varphi (x)} is differentiable on [ a , b ] , {\displaystyle [a,b],} then
∫ a b f ( x ) φ ′ ( x ) d x = − ∫ − ∞ ∞ φ ~ ( x ) d ( χ ~ [ a , b ] ( x ) f ~ ( x ) ) , {\displaystyle \int _{a}^{b}f(x)\varphi '(x)\,dx=-\int _{-\infty }^{\infty }{\widetilde {\varphi }}(x)\,d({\widetilde {\chi }}_{[a,b]}(x){\widetilde {f}}(x)),}
where d ( χ [ a , b ] ( x ) f ~ ( x ) ) {\displaystyle d(\chi _{[a,b]}(x){\widetilde {f}}(x))} denotes the signed measure corresponding to the function of bounded variation χ [ a , b ] ( x ) f ( x ) {\displaystyle \chi _{[a,b]}(x)f(x)} , and functions f ~ , φ ~ {\displaystyle {\widetilde {f}},{\widetilde {\varphi }}} are extensions of f , φ {\displaystyle f,\varphi } to R , {\displaystyle \mathbb {R} ,} which are respectively of bounded variation and differentiable.
Product of many functions Integrating the product rule for three multiplied functions, u ( x ) {\displaystyle u(x)} , v ( x ) {\displaystyle v(x)} , w ( x ) {\displaystyle w(x)} , gives a similar result:
∫ a b u v d w = [ u v w ] a b − ∫ a b u w d v − ∫ a b v w d u . {\displaystyle \int _{a}^{b}uv\,dw\ =\ {\Big [}uvw{\Big ]}_{a}^{b}-\int _{a}^{b}uw\,dv-\int _{a}^{b}vw\,du.}
In general, for n {\displaystyle n} factors
( ∏ i = 1 n u i ( x ) ) ′ = ∑ j = 1 n u j ′ ( x ) ∏ i ≠ j n u i ( x ) , {\displaystyle \left(\prod _{i=1}^{n}u_{i}(x)\right)'\ =\ \sum _{j=1}^{n}u_{j}'(x)\prod _{i\neq j}^{n}u_{i}(x),}
which leads to
[ ∏ i = 1 n u i ( x ) ] a b = ∑ j = 1 n ∫ a b u j ′ ( x ) ∏ i ≠ j n u i ( x ) . {\displaystyle \left[\prod _{i=1}^{n}u_{i}(x)\right]_{a}^{b}\ =\ \sum _{j=1}^{n}\int _{a}^{b}u_{j}'(x)\prod _{i\neq j}^{n}u_{i}(x).}
Visualization
Consider a parametric curve ( x , y ) = ( f ( t ) , g ( t ) ) {\displaystyle (x,y)=(f(t),g(t))} . Assuming that the curve is locally one-to-one and integrable, we can define
x ( y ) = f ( g − 1 ( y ) ) y ( x ) = g ( f − 1 ( x ) ) {\displaystyle {\begin{aligned}x(y)&=f(g^{-1}(y))\\y(x)&=g(f^{-1}(x))\end{aligned}}}
The area of the blue region is
A 1 = ∫ y 1 y 2 x ( y ) d y {\displaystyle A_{1}=\int _{y_{1}}^{y_{2}}x(y)\,dy}
Similarly, the area of the red region is
A 2 = ∫ x 1 x 2 y ( x ) d x {\displaystyle A_{2}=\int _{x_{1}}^{x_{2}}y(x)\,dx}
The total area A1 + A2 is equal to the area of the bigger rectangle, x2y2, minus the area of the smaller one, x1y1:
∫ y 1 y 2 x ( y ) d y ⏞ A 1 + ∫ x 1 x 2 y ( x ) d x ⏞ A 2 = x ( y 2 ) ⋅ y ( x 2 ) ⏞ f i n a l − x ( y 1 ) ⋅ y ( x 1 ) ⏞ i n i t i a l = x ⋅ y ( x ) | x 1 x 2 = y ⋅ x ( y ) | y 1 y 2 {\displaystyle \overbrace {\int _{y_{1}}^{y_{2}}x(y)\,dy} ^{A_{1}}+\overbrace {\int _{x_{1}}^{x_{2}}y(x)\,dx} ^{A_{2}}\ =\ \overbrace {x(y_{2})\cdot y(x_{2})} ^{final}-\overbrace {x(y_{1})\cdot y(x_{1})} ^{initial}=\ {\biggl .}x\cdot y(x){\biggl |}_{x_{1}}^{x_{2}}\ =\ {\biggl .}y\cdot x(y){\biggl |}_{y_{1}}^{y_{2}}}
Or, in terms of t,
∫ t 1 t 2 x ( t ) d y ( t ) + ∫ t 1 t 2 y ( t ) d x ( t ) = x ( t ) y ( t ) | t 1 t 2 {\displaystyle \int _{t_{1}}^{t_{2}}x(t)\,dy(t)+\int _{t_{1}}^{t_{2}}y(t)\,dx(t)\ =\ {\biggl .}x(t)y(t){\biggl |}_{t_{1}}^{t_{2}}}
Or, in terms of indefinite integrals, this can be written as
∫ x d y + ∫ y d x = x y {\displaystyle \int x\,dy+\int y\,dx\ =\ xy}
Rearranging:
∫ x d y = x y − ∫ y d x {\displaystyle \int x\,dy\ =\ xy-\int y\,dx}
Thus integration by parts may be thought of as deriving the area of the blue region from the area of rectangles and that of the red region. This visualization also explains why integration by parts may help find the integral of an inverse function f−1(x) when the integral of the function f(x) is known. Indeed, the functions x(y) and y(x) are inverses, and the integral ∫ x dy may be calculated as above from knowing the integral ∫ y dx. In particular, this explains use of integration by parts to integrate logarithm and inverse trigonometric functions. In fact, if f {\displaystyle f} is a differentiable one-to-one function on an interval, then integration by parts can be used to derive a formula for the integral of f − 1 {\displaystyle f^{-1}} in terms of the integral of f {\displaystyle f} . This is demonstrated in the article, Integral of inverse functions.
Applications
Finding antiderivatives Integration by parts is a heuristic rather than a purely mechanical process for solving integrals; given a single function to integrate, the typical strategy is to carefully separate this single function into a product of two functions u(x)v(x) such that the residual integral from the integration by parts formula is easier to evaluate than the single function. The following form is useful in illustrating the best strategy to take:
∫ u v d x = u ∫ v d x − ∫ ( u ′ ∫ v d x ) d x . {\displaystyle \int uv\,dx=u\int v\,dx-\int \left(u'\int v\,dx\right)\,dx.}
On the right-hand side, u is differentiated and v is integrated; consequently it is useful to choose u as a function that simplifies when differentiated, or to choose v as a function that simplifies when integrated. As a simple example, consider:
∫ ln ( x ) x 2 d x . {\displaystyle \int {\frac {\ln(x)}{x^{2}}}\,dx\,.}
Since the derivative of ln(x) is 1/x, one makes (ln(x)) part u; since the antiderivative of 1/x2 is −1/x, one makes 1/x2 part v. The formula now yields:
∫ ln ( x ) x 2 d x = − ln ( x ) x − ∫ ( 1 x ) ( − 1 x ) d x . {\displaystyle \int {\frac {\ln(x)}{x^{2}}}\,dx=-{\frac {\ln(x)}{x}}-\int {\biggl (}{\frac {1}{x}}{\biggr )}{\biggl (}-{\frac {1}{x}}{\biggr )}\,dx\,.}
The antiderivative of −1/x2 can be found with the power rule and is 1/x, making the final integral
∫ ln ( x ) x 2 d x = − ( ln ( x ) + 1 x ) + C , {\displaystyle \int {\frac {\ln(x)}{x^{2}}}\,dx=-{\biggl (}{\frac {\ln(x)+1}{x}}{\biggr )}+C,}
where C is a constant of integration. Alternatively, one may choose u and v such that the product u′ (∫v dx) simplifies due to cancellation. For example, suppose one wishes to integrate:
∫ sec 2 ( x ) ⋅ ln ( | sin ( x ) | ) d x . {\displaystyle \int \sec ^{2}(x)\cdot \ln {\Big (}{\bigl |}\sin(x){\bigr |}{\Big )}\,dx.}
If we choose u(x) = ln(|sin(x)|) and v(x) = sec2x, then u differentiates to 1 tan x {\displaystyle {\frac {1}{\tan x}}} using the chain rule and v integrates to tan x; so the formula gives:
∫ sec 2 ( x ) ⋅ ln ( | sin ( x ) | ) d x = tan ( x ) ⋅ ln ( | sin ( x ) | ) − ∫ tan ( x ) ⋅ 1 tan ( x ) d x . {\displaystyle \int \sec ^{2}(x)\cdot \ln {\Big (}{\bigl |}\sin(x){\bigr |}{\Big )}\,dx=\tan(x)\cdot \ln {\Big (}{\bigl |}\sin(x){\bigr |}{\Big )}-\int \tan(x)\cdot {\frac {1}{\tan(x)}}\,dx\ .}
The integrand simplifies to 1, so the antiderivative is x. Finding a simplifying combination frequently involves experimentation. In some applications, it may not be necessary to ensure that the integral produced by integration by parts has a simple form; for example, in numerical analysis, it may suffice that it has small magnitude and so contributes only a small error term. Some other special techniques are demonstrated in the examples below.
Polynomials and trigonometric functions In order to calculate
I = ∫ x cos ( x ) d x , {\displaystyle I=\int x\cos(x)\,dx\,,}
let:
u = x ⇒ d u = d x d v = cos ( x ) d x ⇒
