# Evaluate this integral without using integration by parts

How to evaluate the integral $\displaystyle\int_0^r x^2\cos x\,dx$ for $r\in\mathbb{R}$ without using integration by parts?

And the hint is differentiate $\displaystyle\int_0^r\cos(tx)\,dx$ twice with respect to $t$.

The hint does not help. Can someone help me?

-
Well, have you done what the hint tell you to? – fgp Oct 16 '12 at 19:00
Yes. That's why I am asking for help – Frank Lu Oct 16 '12 at 19:01
You might want to take a look at this. – EuYu Oct 16 '12 at 19:01
You might want to put the result you got into the question then. The clearer you make where your problem lies the higher the chance that the answers will be usefull to you. – fgp Oct 16 '12 at 19:03
The second integral is easy to evaluate. Call it $G(t)$. Differentiation under the integral sign shows that the integral you are after is closely related to $G''(1)$. – André Nicolas Oct 16 '12 at 19:05

Let us write $$I(t) = \int_0^r \cos(tx)\ dx$$ Then from the Leibniz rule, we have $$\frac{d^2}{dt^2}I(t) = \int_0^r\frac{\partial^2}{\partial t^2}\cos(tx)\ dx=\int_0^r x^2\cos(tx)\ dx$$ Therefore your original integral is given by $$\frac{d^2}{dt^2}I(t)\Bigg|_{t=1}$$ Can you take it from here?