Integration by parts In a nutshell Integration by parts is mainly used to integrate products of functions, and it is particularly useful when the functions making up the product are of different forms (e.g. one is algebraic whereas the other is trigonometric).
The formula for integration by parts To derive the formula for integration by parts, consider the product rule for differentiation on two functions: u ( x ) u(x) u ( x ) and v ( x ) v(x) v ( x ) .
d d x ( u v ) = u ′ v + u v ′ = v d u d x + u d v d x \begin{aligned}\dfrac{d}{dx} (uv) &= u'v + uv' \\&=v\dfrac{du}{dx}+u\dfrac{dv}{dx}\end{aligned} d x d ( uv ) = u ′ v + u v ′ = v d x d u + u d x d v
Rearrange this to make u d v d x u\dfrac{dv}{dx} u d x d v the subject:
u d v d x = d d x ( u v ) − v d u d x u\dfrac{dv}{dx} = \dfrac{d}{dx} (uv) - v\dfrac{du}{dx} u d x d v = d x d ( uv ) − v d x d u
Integrate both sides of this equation, noting that ∫ ( d d x ( u v ) ) d x = u v \int \left(\dfrac{d}{dx}(uv)\right) \,dx = uv ∫ ( d x d ( uv ) ) d x = uv :
∫ ( u d v d x ) d x = ∫ ( d d x ( u v ) − v d u d x ) d x = ∫ ( d d x ( u v ) ) d x − ∫ ( v d u d x ) d x = u v − ∫ ( v d u d x ) d x \begin{aligned} \int \left(u\dfrac{dv}{dx}\right)\, dx &= \int \left(\dfrac{d}{dx} (uv) - v\dfrac{du}{dx}\right)\,dx \\&=\int \left( \dfrac{d}{dx}(uv)\right) \, dx - \int \left(v\dfrac{du}{dx}\right)\,dx\\&=uv - \int \left(v \dfrac{du}{dx}\right)\,dx \end{aligned} ∫ ( u d x d v ) d x = ∫ ( d x d ( uv ) − v d x d u ) d x = ∫ ( d x d ( uv ) ) d x − ∫ ( v d x d u ) d x = uv − ∫ ( v d x d u ) d x
This is the integration by parts formula:
∫ ( u d v d x ) d x = u v − ∫ ( v d u d x ) d x \boxed{\int \left(u\dfrac{dv}{dx}\right)\, dx =uv - \int \left(v \dfrac{du}{dx}\right)\,dx } ∫ ( u d x d v ) d x = uv − ∫ ( v d x d u ) d x
Note: After using this formula, you will still have to integrate a product of functions, but the purpose of integrating by parts is to make this second integration easier than the original one. It is however possible that you will require integration by parts to integrate this second integral.
Using the formula To integrate a product of two functions using integration by parts, follow this procedure:
procedure 1.
Pick one of the functions to be u u u and the other function to be d v d x \dfrac{dv}{dx} d x d v .
2.
Differentiate and integrate the functions respectively to find d u d x \dfrac{du}{dx} d x d u and v v v .
3.
Substitute into the formula.
Choosing u u u and d v d x \dfrac{dv}{dx} d x d v Unlike the product rule, the order of choice is important. The function picked to be d v d x \dfrac{dv}{dx} d x d v should be the one that is the easiest to integrate out of the two. A simple way to decide what to pick as u u u is LATE.
letter stands for... examples L
Logarithmic
ln ( x ) \ln(x) ln ( x )
A
Algebraic
x n x^n x n
T
Trigonometric
sin ( x ) , cos ( x ) , sec ( x ) , . . . \sin(x), \cos(x),\sec(x),... sin ( x ) , cos ( x ) , sec ( x ) , ...
E
Exponential
a k x , e k x a^{kx},e^{kx} a k x , e k x
If you have two of these types of functions, pick the earlier function in LATE to be u u u .
Example 1 Evaluate ∫ x e x d x \int xe^x\,dx ∫ x e x d x .
Let u = x u=x u = x as Algebraic comes before Exponential. This means that d v d x = e x \dfrac{dv}{dx}=e^x d x d v = e x .
Find d u d x \dfrac{du}{dx} d x d u and v v v :
u = x → d u d x = 1 d v d x = e x → v = e x \begin{aligned}u=x &\rightarrow \dfrac{du}{dx}=1\\ \dfrac{dv}{dx}=e^x &\rightarrow v=e^x \end{aligned} u = x d x d v = e x → d x d u = 1 → v = e x
Use the formula for integration by parts:
∫ ( u d v d x ) d x = u v − ∫ ( v d u d x ) d x ∫ x e x d x = x e x − ∫ ( 1 ) ( e x ) d x = x e x − e x \begin{aligned} \int \left(u\dfrac{dv}{dx}\right)\, dx &=uv - \int \left(v \dfrac{du}{dx}\right)\,dx \\ \int xe^x \, dx &= xe^x - \int \left(1)(e^x\right)\,dx\\&=xe^x-e^x \end{aligned} ∫ ( u d x d v ) d x ∫ x e x d x = uv − ∫ ( v d x d u ) d x = x e x − ∫ ( 1 ) ( e x ) d x = x e x − e x
Notice that the second integral that came through using the formula was a straightforward integral to calculate. Thus:
∫ x e x d x = x e x − e x + C ‾ \int xe^x \, dx =\underline{xe^x-e^x+C} ∫ x e x d x = x e x − e x + C
Example 2 Evaluate ∫ x 2 cos ( 2 x ) d x \int x^2 \cos(2x)\,dx ∫ x 2 cos ( 2 x ) d x :
Let u = x 2 u=x^2 u = x 2 as Algebraic comes before Trigonometric. This means that d v d x = cos ( 2 x ) \dfrac{dv}{dx}=\cos(2x) d x d v = cos ( 2 x ) .
Find d u d x \dfrac{du}{dx} d x d u and v v v :
u = x 2 → d u d x = 2 x d v d x = cos ( 2 x ) → v = 1 2 sin ( 2 x ) \begin{aligned}u=x^2 &\rightarrow \dfrac{du}{dx}=2x\\\dfrac{dv}{dx}=\cos(2x) &\rightarrow v=\dfrac12\sin(2x)\end{aligned} u = x 2 d x d v = cos ( 2 x ) → d x d u = 2 x → v = 2 1 sin ( 2 x )
Use the formula for integration by parts:
∫ ( u d v d x ) d x = u v − ∫ ( v d u d x ) d x ∫ x 2 cos ( 2 x ) d x = ( x 2 ) ( 1 2 sin ( 2 x ) ) − ∫ ( 2 x ) ( 1 2 sin ( 2 x ) ) d x = 1 2 x 2 sin ( 2 x ) − ∫ x sin ( 2 x ) d x ( ⋆ ) \begin{aligned} \int \left(u\dfrac{dv}{dx}\right)\, dx &=uv - \int \left(v \dfrac{du}{dx}\right)\,dx \\ \int x^2 \cos(2x) \,dx &=(x^2)\left(\dfrac12\sin(2x)\right)- \int (2x)\left(\dfrac12 \sin(2x)\right)\,dx\\&=\dfrac12 x^2\sin(2x) - \int x\sin(2x)\, dx \ \ \ (\star) \end{aligned} ∫ ( u d x d v ) d x ∫ x 2 cos ( 2 x ) d x = uv − ∫ ( v d x d u ) d x = ( x 2 ) ( 2 1 sin ( 2 x ) ) − ∫ ( 2 x ) ( 2 1 sin ( 2 x ) ) d x = 2 1 x 2 sin ( 2 x ) − ∫ x sin ( 2 x ) d x ( ⋆ )
Use integration by parts a second time to find ∫ x sin ( 2 x ) d x \int x \sin(2x)\, dx ∫ x sin ( 2 x ) d x :
u = x → d u d x = 1 d v d x = sin ( 2 x ) → v = − 1 2 cos ( 2 x ) \begin{aligned}u=x &\rightarrow \dfrac{du}{dx}=1\\\dfrac{dv}{dx}=\sin(2x) &\rightarrow v=-\dfrac12\cos(2x) \end{aligned} u = x d x d v = sin ( 2 x ) → d x d u = 1 → v = − 2 1 cos ( 2 x )
∫ ( u d v d x ) d x = u v − ∫ ( v d u d x ) d x ∫ x sin ( 2 x ) d x = ( x ) ( − 1 2 cos ( 2 x ) ) − ∫ ( 1 ) ( − 1 2 cos ( 2 x ) ) d x = − x 2 cos ( 2 x ) + 1 2 ∫ cos ( 2 x ) d x = − x 2 cos ( 2 x ) + 1 2 ( 1 2 sin ( 2 x ) ) = − x 2 cos ( 2 x ) + 1 4 sin ( 2 x ) \begin{aligned} \int \left(u\dfrac{dv}{dx}\right)\, dx &=uv - \int \left(v \dfrac{du}{dx}\right)\,dx\\ \int x\sin(2x)\,dx &=(x)\left(-\dfrac12 \cos(2x)\right) - \int (1)\left(-\dfrac12 \cos(2x)\right)\,dx\\&=-\dfrac{x}{2}\cos(2x) + \dfrac12\int\cos(2x)\,dx\\&=-\dfrac{x}{2}\cos(2x) + \dfrac12 \left(\dfrac12 \sin(2x)\right)\\&= -\dfrac{x}{2}\cos(2x)+\dfrac14 \sin(2x) \end{aligned} ∫ ( u d x d v ) d x ∫ x sin ( 2 x ) d x = uv − ∫ ( v d x d u ) d x = ( x ) ( − 2 1 cos ( 2 x ) ) − ∫ ( 1 ) ( − 2 1 cos ( 2 x ) ) d x = − 2 x cos ( 2 x ) + 2 1 ∫ cos ( 2 x ) d x = − 2 x cos ( 2 x ) + 2 1 ( 2 1 sin ( 2 x ) ) = − 2 x cos ( 2 x ) + 4 1 sin ( 2 x )
Substitute this into (⋆ \star ⋆ ):
∫ x 2 cos ( 2 x ) d x = 1 2 x 2 sin ( 2 x ) − ∫ x sin ( 2 x ) d x = 1 2 x 2 sin ( 2 x ) − ( − x 2 cos ( 2 x ) + 1 4 sin ( 2 x ) ) = 1 2 x 2 sin ( 2 x ) + x 2 cos ( 2 x ) − 1 4 sin ( 2 x ) \begin{aligned} \int x^2 \cos(2x) \,dx &=\dfrac12 x^2\sin(2x) - \int x\sin(2x)\, dx \\&= \dfrac12 x^2\sin(2x) -\left(-\dfrac{x}{2}\cos(2x)+\dfrac14 \sin(2x)\right)\\&=\dfrac12 x^2\sin(2x) + \dfrac{x}{2}\cos(2x) - \dfrac{1}{4}\sin(2x) \end{aligned} ∫ x 2 cos ( 2 x ) d x = 2 1 x 2 sin ( 2 x ) − ∫ x sin ( 2 x ) d x = 2 1 x 2 sin ( 2 x ) − ( − 2 x cos ( 2 x ) + 4 1 sin ( 2 x ) ) = 2 1 x 2 sin ( 2 x ) + 2 x cos ( 2 x ) − 4 1 sin ( 2 x )
∫ x 2 cos ( 2 x ) d x = 1 2 x 2 sin ( 2 x ) + x 2 cos ( 2 x ) − 1 4 sin ( 2 x ) + C ‾ \int x^2 \cos(2x) \,dx =\underline{\dfrac12 x^2\sin(2x) + \dfrac{x}{2}\cos(2x) - \dfrac{1}{4}\sin(2x)+C} ∫ x 2 cos ( 2 x ) d x = 2 1 x 2 sin ( 2 x ) + 2 x cos ( 2 x ) − 4 1 sin ( 2 x ) + C
Integration by parts for definite integrals To use integrate by parts for definite integration, consider the product rule again, rearranged into the following form:
u d v d x = d d x ( u v ) − v d u d x u\dfrac{dv}{dx} = \dfrac{d}{dx} (uv) - v\dfrac{du}{dx} u d x d v = d x d ( uv ) − v d x d u
Instead of integrating both sides indefinitely, integrate both sides between the limits b b b and a a a :
∫ b a ( u d v d x ) d x = ∫ b a ( d d x ( u v ) ) d x − ∫ b a ( v d u d x ) d x \int_b^a \left(u\dfrac{dv}{dx}\right)\,dx = \int_b^a\left(\dfrac{d}{dx} (uv)\right)\, dx - \int_b^a \left(v\dfrac{du}{dx}\right)\,dx ∫ b a ( u d x d v ) d x = ∫ b a ( d x d ( uv ) ) d x − ∫ b a ( v d x d u ) d x
Note that ∫ b a ( d d x ( u v ) ) d x \int_b^a\left(\dfrac{d}{dx} (uv)\right)\, dx ∫ b a ( d x d ( uv ) ) d x is a case of the fundamental theorem of calculus, meaning that:
∫ b a ( d d x ( u v ) ) d x = [ u ( x ) v ( x ) ] b a = u ( a ) v ( a ) − u ( b ) v ( b ) \begin{aligned} \int_b^a\left(\dfrac{d}{dx} (uv)\right)\, dx &= \left[u(x)v(x)\right]_b^a \\&= u(a)v(a)-u(b)v(b) \end{aligned} ∫ b a ( d x d ( uv ) ) d x = [ u ( x ) v ( x ) ] b a = u ( a ) v ( a ) − u ( b ) v ( b )
Substituting this into the equation above, the formula for definite integration by parts is given to be:
∫ b a ( u d v d x ) d x = [ u v ] b a − ∫ b a ( v d u d x ) d x = ( u ( a ) v ( a ) − u ( b ) v ( b ) ) − ∫ b a ( v d u d x ) d x \boxed{\begin{aligned}\int_b^a \left(u\dfrac{dv}{dx}\right)\,dx &= \left[uv\right]_b^a - \int_b^a \left(v\dfrac{du}{dx}\right)\,dx \\&=(u(a)v(a)-u(b)v(b)) - \int_b^a \left(v\dfrac{du}{dx}\right)\,dx \end{aligned}} ∫ b a ( u d x d v ) d x = [ uv ] b a − ∫ b a ( v d x d u ) d x = ( u ( a ) v ( a ) − u ( b ) v ( b )) − ∫ b a ( v d x d u ) d x
Example 3 Evaluate ∫ 1 e x ln ( x ) d x \int_1^e x\ln(x)\,dx ∫ 1 e x ln ( x ) d x .
Let u = ln ( x ) u=\ln(x) u = ln ( x ) because Logarithmic comes before Algebraic in LATE. This means that d v d x = x \dfrac{dv}{dx}=x d x d v = x .
Find d u d x \dfrac{du}{dx} d x d u and v v v :
u = ln ( x ) → d u d x = 1 x d v d x = x → v = 1 2 x 2 \begin{aligned}u=\ln(x) &\rightarrow \dfrac{du}{dx}=\dfrac1x\\\dfrac{dv}{dx}=x &\rightarrow v=\dfrac12 x^2 \end{aligned} u = ln ( x ) d x d v = x → d x d u = x 1 → v = 2 1 x 2
Use the formula for definite integration by parts:
∫ b a ( u d v d x ) d x = [ u v ] b a − ∫ b a ( v d u d x ) d x ∫ 1 e x ln ( x ) d x = [ ln ( x ) ( 1 2 x 2 ) ] 1 e − ∫ 1 e ( 1 x ) ( 1 2 x 2 ) d x = ( 1 2 ln ( e ) ⏟ = 1 ( e ) 2 ) − ( 1 2 ln ( 1 ) ⏟ = 0 ( 1 ) 2 ) − ∫ 1 e 1 2 x d x = 1 2 e 2 − [ 1 4 x 2 ] 1 e = 1 2 e 2 − ( ( 1 4 ( e ) 2 ) − ( 1 4 ( 1 ) 2 ) ) = 1 2 e 2 − 1 4 e 2 + 1 4 = 1 4 e 2 + 1 4 \begin{aligned}\int_b^a \left(u\dfrac{dv}{dx}\right)\,dx &= \left[uv\right]_b^a - \int_b^a \left(v\dfrac{du}{dx}\right)\,dx \\ \int_1^e x\ln(x) \, dx &= \left[\ln(x) \left(\dfrac12 x^2\right)\right]_1^e - \int_1^e \left(\dfrac1x\right)\left(\dfrac12 x^2\right)\,dx\\&=\left(\dfrac12 \underbrace{\ln(e)}_{=1}(e)^2\right)-\left(\dfrac12 \ \underbrace{\ln(1)}_{=0}(1)^2\right)- \int_1^e \dfrac12x \,dx\\&=\dfrac12e^2 - \left[\dfrac14 x^2\right]_1^e\\&=\dfrac12 e^2 - \left(\left(\dfrac14 (e)^2\right)-\left(\dfrac14 (1)^2\right)\right)\\&=\dfrac12e^2 - \dfrac14e^2 + \dfrac14 \\&=\dfrac14e^2 +\dfrac14 \end{aligned} ∫ b a ( u d x d v ) d x ∫ 1 e x ln ( x ) d x = [ uv ] b a − ∫ b a ( v d x d u ) d x = [ ln ( x ) ( 2 1 x 2 ) ] 1 e − ∫ 1 e ( x 1 ) ( 2 1 x 2 ) d x = 2 1 = 1 ln ( e ) ( e ) 2 − 2 1 = 0 ln ( 1 ) ( 1 ) 2 − ∫ 1 e 2 1 x d x = 2 1 e 2 − [ 4 1 x 2 ] 1 e = 2 1 e 2 − ( ( 4 1 ( e ) 2 ) − ( 4 1 ( 1 ) 2 ) ) = 2 1 e 2 − 4 1 e 2 + 4 1 = 4 1 e 2 + 4 1
∫ 1 e x ln ( x ) d x = 1 4 ( e 2 + 1 ) ‾ \int_1^e x\ln(x) \, dx=\underline{\dfrac14 (e^2+1)} ∫ 1 e x ln ( x ) d x = 4 1 ( e 2 + 1 )