How do you integrate by parts?

To integrate the product of two functions - say f(x) = xsinx, the product of g(x) = x and h(x) = sin(x) - the we use integration by parts. 

Since integration is the inverse of differentiation, we'll appeal to the Product Rule for differentiation to find a rule for integration. The Product Rule says that (fg)' = f'g + g'f. Rearranging giives:

f'g = (fg)' - g'f.

Integrating we have:

Integral(f'g) = Integral((fg)') - Integral(g'f), or:

Integral(f'g) = fg - Integral(g'f).

This is integration by parts. We designate one of the functions to be f' and one to be g. You can see on the far right we have another integral! For the method to be of use, we need to make the new integral simpler (or at least no more complicated) than the one we began with. So, we want g'f to be simpler then f'g: in other words, when we assign functions f' and g we want g to be the one that gets simpler when differentiated. Let's try an example: let's try and integrate xsinx dx. First, we will choose g to equal x, since x becomes 1 under differentiation, but sinx goes to cosx.

I = Integral(xsinx) = xIntegral(sinx) - Integral(x'Integral(sinx))

I = -xcosx - Integral(-cosx)

I = sinx - xcosx +C

So as long as we choose f' and g with some forethought, it's easy enough to integrate products of functions. Note: Ususally we denote the rule with f' = dv and g = du, so 

Integral u dv  = uv - Integral v du.

This is just a fancy way of stating what we've already established.

Patrick K. A Level Maths tutor, Mentoring Maths tutor, GCSE Maths tutor

8 months ago

Answered by Patrick, an A Level Maths tutor with MyTutor

Still stuck? Get one-to-one help from a personally interviewed subject specialist


Sam M. A Level Maths tutor, GCSE Maths tutor, A Level Further Mathema...
View profile
£20 /hr

Sam M.

Degree: Mathematics (Masters) - Warwick University

Subjects offered: Maths, Further Mathematics

Further Mathematics

“Hi! I am a second year mathematics student at the University of Warwick, with a love for pure maths - in fact since 14 I've been set on becoming a mathematician. My intense fascination with this field not only motivated me to study ne...”

MyTutor guarantee

PremiumSam  G. A Level Maths tutor, A Level Further Mathematics  tutor, GCSE...
View profile
£24 /hr

Sam G.

Degree: Mathematics (Bachelors) - Durham University

Subjects offered: Maths, Science+ 3 more

Further Mathematics

“Hi, I'm Sam, a mathematics student at Durham. Although I will mainly focus on A level and GCSE if people have other questions or more challenging questions (perhaps STEP or MAT) I will be more than happy to help!”

Aidan T. GCSE Maths tutor, A Level Maths tutor
View profile
£22 /hr

Aidan T.

Degree: Chemical Engineering (Masters) - Edinburgh University

Subjects offered: Maths


“Hi! I am currently studying Chemical Engineering at The University of Edinburgh. I tutor in Edinburgh 6-7 times per week currently, and joined MyTutor as a way of sumplimenting that with the convenience of being able to stay in my ...”

About the author

Patrick K. A Level Maths tutor, Mentoring Maths tutor, GCSE Maths tutor
View profile

Patrick K.

Currently unavailable: for new students

Degree: Mathematics (Masters) - Edinburgh University

Subjects offered: Maths


“I am a student of mathematics at the University of Edinburgh. I'm passionate about my subject and want to help you discovera love for maths too!In my sessions we'll use extensive examples to explore the benefits and drawbacks of diff...”

You may also like...

Other A Level Maths questions

How do I do integration by parts?

Express (2x-1)/(x-1)(2x-3) in partial fractions.

C1 - Simplifying a fraction that has a root on the denominator

Differentiate y = (6x-13)^3 with respect to x

View A Level Maths tutors


We use cookies to improve our service. By continuing to use this website, we'll assume that you're OK with this. Dismiss