What is the integral of x sin(x) dx?

Find the following integral: ∫ x sin(x) dx

This question is a good candidate for the integration by parts method, as it is the product of two different 'parts'.

Recall that if you have an integral of the form

∫ u(dv/dx) dx

it can be written as

uv – ∫ v(du/dx) dx.

We need to decide which part we will differentiate (as in, which part is u), and which part we will integrate (as in, which part is dv/dx). 

We can note that continuously differentiating sin(x) results in a loop of cos(x), –sin(x), –cos(x), sin(x)..., whereas differentiating x once gives 1.

From this, it seems to make sense that we would want to differentiate the x part (so u is x) and therefore integrate the sin(x) part (so dv/dx is sin(x) ). So, let

u = x, which implies du/dx = 1

and let

dv/dx = sin(x). Integrating this to get v gives v = –cos(x).

So our integral is now of the form required for integration by parts.

∫ x sin(x) dx 

=  ∫ u(dv/dx) dx

= uv –  ∫ v(du/dx) dx

= –x cos(x) –  ∫ –cos(x)*1 dx

= –x cos(x) –  ∫ –cos(x) dx

= –x cos(x) +  ∫ cos(x) dx

The integral of cos(x) is equal to sin(x). We can check this by differentiating sin(x), which does indeed give cos(x). Finally, as with all integration without limits, there must be a constant added, which I'll call c. So the final answer is 

∫ x sin(x) dx = –x cos(x) +  sin(x) + c

Shaun F. GCSE Maths tutor, A Level Maths tutor

9 months ago

Answered by Shaun, an A Level Maths tutor with MyTutor

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


Robert L. GCSE Maths tutor, A Level Maths tutor, GCSE Geography tutor...
View profile
£20 /hr

Robert L.

Degree: Geophysics (Masters) - University College London University

Subjects offered: Maths, Physics+ 1 more


“Hi, my name is Robert and I'm studying Geophysics at University College London, currently in my second year, with an interest in hazard and disaster reduction. Having been tutored myself in the past I know the importance of an underst...”

MyTutor guarantee

Alex W. A Level Maths tutor, GCSE Maths tutor, A Level Further Mathem...
View profile
£20 /hr

Alex W.

Degree: Mathematics (Masters) - Warwick University

Subjects offered: Maths, Physics+ 1 more

Further Mathematics

“Hi i'm Alex. I am currently a first year Maths student at Warwick University, and can tutor you in Maths, Further Maths and Physics at both GCSE and A-Level. I have had plenty of teaching experience before so I can hopefully help you ...”

MyTutor guarantee

PremiumAdam D. GCSE Maths tutor, A Level Economics tutor, A Level Maths tutor
View profile
£30 /hr

Adam D.

Degree: Economics and Management (Bachelors) - Bristol University

Subjects offered: Maths, Economics


“I am a second year undergraduate student at the University of Bristol, studying Economics and Management. I achieved A* in Economics and Maths A-levels and an A* at maths GCSE so would be very happy to help any students who are studyi...”

About the author

Shaun F. GCSE Maths tutor, A Level Maths tutor
View profile
£20 /hr

Shaun F.

Degree: Mathematics with International Study (Masters) - Exeter University

Subjects offered: Maths


“Hi, I'm Shaun! I'm currently studying for a masters in Mathematics at the University of Exeter..”

MyTutor guarantee

You may also like...

Other A Level Maths questions

Can you differentiate the following function using two methods:- y = e^(2x+1)

Given that dy/dx=6-8x+x^4 and that x=1 when y=4. Find an expression for y in terms of x.

f(x) = (4x + 1)/(x - 2). Find f'(x)

Given that y = 5x^2 - 4/(x^3), x not equal to 0, find dy/dx.

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