# Integration by Parts in Calculus

Tutorials with examples and detailed solutions and exercises with answers on how to use the technique of integration by parts to find integrals.
Review
The method of integration by parts may be used to easily integrate products of functions. The main idea of integration by parts starts the derivative of the product of two function u and v as given by

d(u v)/dx = du/dx v + u dv/dx
Rewrite the above as
u dv/dx = d(u v)/dx - du/dx v
Take the integral of both side of the above equation follows
(u dv/dx) dx = (d(u v)/dx) dx - (du/dx v)
Simplify the above to obtain the rule of integration by parts.
u (dv/dx) dx = uv - (du/dx) v dx

In what follows C is a constant of integration.

 Example 1: Evaluate the integral ∫3 x ex dx Solution to Example 1: Let u = x and dv/dx = ex, hence du/dx = 1 and v = ex and using the method of integration by parts, we obtain ∫3 x ex dx = 3 ∫x ex dx = 3 ( x ex - ∫1 . ex dx) = 3 x ex - 3 ex + C Example 2: Evaluate the integral ∫x sin(x) dx Solution to Example 2: Let u = x and dv/dx = sin(x), hence du/dx = 1 and v = - cos(x) ∫x sin(x) dx = x (-cos(x)) - ∫1 . (-cos(x)) dx = - x cos(x) + sin(x) + C Example 3: Evaluate the integral ∫x2 cos(x) dx Solution to Example 3: Let u = x2 and dv/dx = cos(x), hence du/dx = 2x and v = sin(x) ∫x2 cos(x) dx = x2 sin(x) - ∫2x sin(x) dx We now need to apply the method of integration by parts to the integral ∫2x sin(x) dx to obtain the final integral. In example 2 we determined the integral ∫x sin(x) dx and we may use that result. Hence ∫x2 cos(x) dx = x2 sin(x) - 2 (- x cos(x) + sin(x)) + C = x2 sin(x) + 2 x cos(x) - 2 sin(x) + C Example 4: Evaluate the integral ∫x ln(x) dx Solution to Example 4: Let u = ln(x) and dv/dx = x, hence du/dx = 1/x and v = x2 / 2 ∫x2 ln(x) dx = (x2 / 2) ln(x) - ∫ (x2 / 2) (1 / x) dx = (x2 / 2) ln(x) - (1/4) x2 + C Example 5: Evaluate the integral ∫x cos(x/3) dx Solution to Example 5: Let u = x and dv/dx = cos(x/3), hence du/dx = 1 and v = 3 sin(x/3)2 / 2 ∫x cos(x/3) dx = x (3sin(x/3)) - ∫ 1 . 3 sin(x/3) dx = 3 x sin(x/3) + 9 cos(x/3) + C Example 6: Use integration by parts to evaluate the integral ∫ln(x) dx Solution to Example 6: We first rewrite ln(x) as 1 . ln(x), hence ∫ln(x) dx = ∫1 . ln(x) dx Let u = ln(x) and dv/dx = 1, hence du/dx = 1/x and v = x. Using integration by parts, we obtain ∫ 1 . ln(x) dx = x ln(x) - ∫x (1/x) dx = x ln(x) - x + C Example 7: Use integration by parts to evaluate the integral ∫x2 (ln(x))2 dx Solution to Example 7: Let dv/dx = x2 and u = (ln(x))2 and use integration by parts as follows I = ∫x2 (ln(x))2 dx = [x3 / 3 (ln(x))2] - ∫(x3 / 3)(2 ln(x) / x) dx = [x3 / 3 (ln(x))2] - (2/3)∫x2 ln(x) dx We now let dv/dx = x2 and u = ln(x) and use the integration by parts one more time = [x3 / 3 (ln(x))2] - (2/3)[ (x3 / 3 ln(x) - ∫(x3 / 3) (1/x) dx ] = [x3 / 3 (ln(x))2] - (2/9)(x3 ln(x) + (2/9) ∫x2 dx Integrate the last term = [(ln(x))2 x3 / 3 ] - (2/9)(x3 ln(x) + (2/27)x3 + C Example 8: Use integration by parts to evaluate the integral ∫ex sin(2x) dx Solution to Example 8: We first define I = ∫ex sin(2x) dx, v = sin(2x) and du/dx = ex and use integration by parts as follows I = ∫ex sin(2x) dx = [ex sin(2x)] - ∫ex 2 cos(2x) dx We now let V = ex and du/dx = ex and use the integration by parts one more time = [ex sin(2x)] - 2[ex cos(2x)] + 2 ∫ ex 2 (- sin(2x)) dx = [ex sin(2x)] - 2[ex cos(2x)] - 4∫ex sin(2x) dx We can write the integral I as follows I = [ex sin(2x)] - 2[ex cos(2x)] - 4I and solve the last equation for I I = (1/5)( ex sin(2x) - 2ex cos(2x) ) + C Exercises: Use the table of integrals and the method of integration by parts to find the integrals below. [Note that you may need to use the method of integration by parts more than once]. 1. ∫x cos(x) dx 2. ∫x e2x dx 3. ∫x1/3 ln(x) dx 4. ∫ln(x) / (x2) dx 5. ∫x3 cos(x) dx 6. ∫x2 e-3x dx 7. ∫ex cos(2x) dx Answers to Above Exercises 1. x sin(x) + cos(x) + C 2. (x/2)e2x - (1/4)e2x + C 3. (3/4)x3/4 ln(x) - (9/16)x3/4 + C 4. -ln(x) / x - 1/x + C 5. 3(x2 - 2) cos(x) + (x3 - 6 x) sin(x) + C 6. - ( 1/27 )( 9 x2 + 6 x + 2 ) e-3x dx + C 7. (1/5) ( ex cos(2x) + 2 ex sin(2x) ) + C More references on integrals and their applications in calculus.