Integration by Parts We develop the formula by considering how to differentiate products. If y uv , dy du dv v u dx dx dx Substituting for y, e.g. If y x sin x , where u and v are both functions of x. d ( uv ) du dv v u dx dx dx d ( x sin x ) sin x 1 x cos x dx Integration by Parts So, d ( x sin x ) sin x 1 x cos x dx Integrating this equation, we get x cos x dx x cos x dx d ( x sin x ) dx sin x dx dx The l.h.s. is just the integral of a derivative, so, since integration is the reverse of differentiation, we get x sin x sin x dx Can you see what this has to do with integrating a product? Integration by Parts x sin x sin x dx x cos x dx Here’s the product . . . if we rearrange, we get x cos x dx x sin x sin x dx The function in the integral on the l.h.s. . . . . . . is a product, but the one on the r.h.s. . . . is a simple function that we can integrate easily. Integration by Parts x sin x sin x dx x cos x dx Here’s the product . . . if we rearrange, we get x cos x dx x sin x So, we’ve sin x dx x sin x ( cos x ) C x sin x cos x C integrated xcos x ! We need to turn this method ( called integration by parts ) into a formula. Integration by Parts Example Generalisation d ( x sin x ) sin x x cos x dx d ( uv ) du dv v u dx dx dx Integrating: d ( x sin x ) dx sin x dx dx Simplifying the l.h.s.: x sinx sinx dx Rearranging: x cos x dx x cos x dx dv u dx dx du uv v dx dx dv u dx dx d ( uv ) du dx v dx dx dx x cos x dx x sinx sinx dx dv du u dx uv v dx dx dx Integration by Parts SUMMARY Integration by Parts To integrate some products we can use the formula dv du u dx uv v dx dx dx Integration by Parts So, dv du u dx uv v dx dx dx Using this formula means that we differentiate one factor, u to get du . . . dx Integration by Parts So, dv du u dx uv v dx dx dx Using this formula means that we differentiate one factor, u to get du . . . dx and integrate the other dv , to get v dx Integration by Parts So, dv du u dx uv v dx dx dx Using this formula means that we differentiate one factor, u to get du . . . dx and integrate the other dv , to get v dx e.g. 1 Find 2 x sin dxformula, notice that the Having substituted in x the dv st 2 x andbut the sin 1 term, uv, is ucompleted 2nd xterm still needs to be integrated. differentiate du dx 2 dx v cos x integrate ( +C comes later ) Integration by Parts So, dv u 2 x and sin x dx du v cos x 2 dx differentiate integrate We can now substitute into the formula dv du u dx uv v dx dx dx 2 x sin x dx 2 x( cos x ) u dv dx u v ( cos x ) 2 dx v du dx Integration by Parts So, dv u 2 x and sin x dx du v cos x 2 dx differentiate integrate We can now substitute into the formula dv du u dx uv v dx dx dx 2 x sin x dx 2 x( cos x ) 2 cos x dx ( cos x ) 2 dx 2 x cos x term 2 sinintegrating x C The 22xndcos x needs Integration by Parts e.g. 2 Find 2x xe dx Solution: differentiate So, xe 2x dv u x and e2x dx 2x du e 1 v dx 2 This is a compound integrate function, so we must e 2 x be careful. 1 dx e2x dx ( x ) 2 xe 2 x 2 dv du u dx uv v dx dx dx e2x dx 2 2 xe 2 x e 2 x C 2 4 Integration by Parts Exercises Find 1. Solutions: 1. xe dx 2. x xe x dx x cos 3 x dx xe e dx x x xe e C x 2. x sin 3 x sin 3 x dx x cos 3 x dx ( x ) 3 3 x sin 3 x cos 3 x C 3 9 Integration by Parts Definite Integration by Parts With a definite integral it’s often easier to do the indefinite integral and insert the limits at the end. We’ll use the question in the exercise you have just done to illustrate. x xe dx 1 0 x xe dx xe x e x dx xe x e x C 1e xe 1 x x 1 e 0 e 1 0e 0 1 1 0 e 0 Integration by Parts Using Integration by Parts Integration by parts cannot be used for every product. It works if we can integrate one factor of the product, the integral on the r.h.s. is easier* than the one we started with. * There is an exception but you need to learn the general rule. Integration by Parts e.g. 3 Find Solution: x ln x dx dv du u dx uv v dx dx dx What’s a possible problem? ANS: We can’t integrate ln x . Can you see what to do? dv If we let u ln x and x , we will need to dx differentiate ln x and integrate x. Tip: Whenever ln x appears in an integration by parts we choose to let it equal u. Integration by Parts e.g. 3 Find So, differentiate x ln x dx u ln x du 1 dx x x2 ln x x ln x dx 2 dv du u dx uv v dx dx dx dv x dx integrate x2 v 2 x2 1 dx 2 x The r.h.s. integral still seems to be a product! BUT . . . x cancels. 2 So, x x dx x ln x dx ln x 2 2 x2 x2 x ln x dx ln x C 2 4 Integration by Parts e.g. 4 2 x x e dx dv du u dx uv v dx dx dx Solution: dv Let x 2 e u x and dx du 2x v e x dx x 2 e x dx x 2 e x 2 xe x dx 2 x 2 x x e dx x e I1 x 2 xe dx I2 The integral on the r.h.s. is still a product but using the method again will give us a simple function. We write I x 2e x I 1 2 Integration by Parts e.g. 4 Solution: 2 x x e dx I 2 2 xe x dx Let I1 x 2e x I 2 . . . . . ( 1 ) u 2x du 2 dx So, Substitute in ( 1 ) dv ex dx v e x and I 2 2 xe x 2e x dx x 2 xe x 2 e dx 2 xe x 2e x C x e dx x e 2 x 2 x 2 xe x 2e x C Integration by Parts Example e.g. 5 Find e sin x dx Solution: x dv du u dx uv v dx dx dx It doesn’t look as though integration by parts will help since neither function in the product gets easier when we differentiate it. However, there’s something special about the 2 functions that means the method does work. Integration by Parts dv du e.g. 5 Find e sin x dx u dx uv v dx dx dx Solution: dv x sin x ue dx du ex v cos x dx e x sin x dx e x cos x e x cos x dx x e cos x x We write this as: x e cos x dx I1 e cos x I 2 x Integration by Parts e.g. 5 Find e sin x dx So, where x dv du u dx uv v dx dx dx I1 e x cos x I 2 I 1 e x sin x dx and I 2 e x cos x dx We next use integration by parts for I2 ue dv cos x dx x du ex dx v sin x x x e cos x dx e sinx x e sin x dx I 2 e sinx I1 x Integration by Parts e.g. 5 Find e sin x dx So, where x dv du u dx uv v dx dx dx I1 e x cos x I 2 I 1 e x sin x dx and I 2 e x cos x dx We next use integration by parts for I2 ue dv cos x dx x du ex dx v sin x x x e cos x dx e sinx x e sin x dx I 2 e sinx I1 x Integration by Parts e.g. 5 Find e sin x dx So, x I1 e x cos x I 2 . . . . . ( 1 ) I 2 e x sinx I1 .....(2) 2 equations, 2 unknowns ( I1 and I2 ) ! Substituting for I2 in ( 1 ) I1 e x cos x dv du u dx uv v dx dx dx Integration by Parts e.g. 5 Find e sin x dx So, x I1 e x cos x I 2 . . . . . ( 1 ) I 2 e x sin x I 1 dv du u dx uv v dx dx dx .....(2) 2 equations, 2 unknowns ( I1 and I2 ) ! Substituting for I2 in ( 1 ) I1 e x cos x e x sin x I 1 Integration by Parts e.g. 5 Find e sin x dx So, x I1 e x cos x I 2 . . . . . ( 1 ) I 2 e x sin x I 1 dv du u dx uv v dx dx dx .....(2) 2 equations, 2 unknowns ( I1 and I2 ) ! Substituting for I2 in ( 1 ) I1 e x cos x e x sin x I 1 2I1 e x cos x e x sinx e x cos x e x sin x I1 C 2 Integration by Parts Exercises 1. x 2 sin x dx 2. 2 1 ln x dx ( Hint: Although 2. is not a product it can be turned into one by writing the function as 1 ln x . ) Integration by Parts Solutions: 1. x 2 sin x dx Let u x 2 and du 2x dx I1 dv sin x dx v cos x I 1 x 2 cos x 2 x cos x dx I 1 x cos x 2 For I2: Let u 2 x and du 2 dx dv 2 x cos x dx . . . . . ( 1 ) I2 cos x dx v sin x I 2 2 x sin x 2 sin x dx 2 x sin x 2 cos x C Subs. in ( 1 ) 2 2 x sin x dx x cos x 2 x sin x 2 cos x C Integration by Parts 2. 2 2 1 ln x dx 1 1 ln x dx This is an important application of integration by parts dv u ln x and 1 dx du 1 vx dx x 1 x ln x 1 ln x dx x dx x Let So, 2 1 ln x dx x ln x 1 dx x ln x x C x ln x x 2 1 2 ln2 2 1 ln1 1 2 ln 2 1 Integration by Parts