Find the following indefinite integral Let $n$ be a positive integer. Find a general expression for $$\int x^n\cos(x)~dx$$ None of the standard integration techniques or the standard tricks I've seen for difficult integrals seem to apply to this one. I guess it is some type of reduction, but how to get a closed form?
 A: Use repeated integration by parts. Take the antiderivate of the cos(x) or sin(x)-function and differentiate the polynomial term. The degree decreases in each step.
A: This integral is explicitly explained here.
A: Probably as you did, integrating twice by parts, you arrived to a simple recurrence relation between I(n) and I(n-2). You can check your results at
http://en.wikipedia.org/wiki/Integration_by_reduction_formulae
as mentioned by Spock.  
In practice, it is always a good idea for this kind of integrals, to use the form using cos(x) and the form using sin(x).  
These recurrence relations are sufficient for almost any purpose I know, but I agree, they do not give you closed forms ... which exist; however, I am not sure you would enjoy them since, for your integral, the result is 
-x^(1 + n) (ExpIntegralE[-n, -I x] + ExpIntegralE[-n, I x]) / 2
A: http://en.wikipedia.org/wiki/List_of_integrals_of_trigonometric_functions#Integrands_involving_only_cosine can find the reduction formula and also the final result.
