Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know how to integrate, for example $x^2\sin x$ via integration by parts. But how would one approach $x^n\sin x$, where $n$ is an arbitrary natural number? Do I have have to use integration by parts $n$ times? How do I do this?

share|cite|improve this question
Do it by parts twice and you will then have a recurrence relation between $I_n$ and $I_{n-2}$, I bet. – Claude Leibovici Jun 28 '14 at 13:55
And since you know the first two terms, yo are done. You can check since you know the result for $n=2$. – Claude Leibovici Jun 28 '14 at 14:05
This answer might be useful:… – Hans Lundmark Jun 28 '14 at 14:17
up vote 2 down vote accepted

Integrating two times by parts one can find the recursive relation $$\begin{array}{rcl} I_{n}(t)&=& \int^t x^n \sin(x)dx \\ &=& -t^{n}\cos(t)+n\int^t x^{n-1} \cos(x)dx\\ &=& -t^n\cos(t)+nt^{n-1}\sin(t)-n(n-1)I_{n-2}(t)\end{array}$$

share|cite|improve this answer
I did the integration by parts twice and I have the recursive relation. Now what do I do with it? Am supposed to solve it for n? – Adam Jun 28 '14 at 14:16
You know $I_1$ and $I_2$, so there is no problem, you just apply the formula recursively until one of these terms appears (depending on the parity of $n$). Here's a general closed form: – Surb Jun 28 '14 at 14:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.