Fastest method to calculate the integral: $\int^\pi_0 t^2 \cos(nt)dt$.

Now I am aware that this is done by doing parts twice, however from inspection I see that terms cancel in the method, is there therefore a straight forward formula I can use for integrals of this form (ie period/composition) which would allow me to calculate this faster?

Kind Regards,

  • $\begingroup$ My edition of Rottmann's mathematical formulas says $$\int t^2\cos(nt)dt = \frac2{n^2}t\cos(nt) - \frac{2-n^2t^2}{a^3}\sin(nt) + C$$ Now you can just insert the limits and calculate. $\endgroup$ – Arthur Dec 3 '16 at 15:56
  • $\begingroup$ observe that $\partial^2_n \cos(n t)=-t^2\cos(n t)$ $\endgroup$ – tired Dec 3 '16 at 16:21

Hint. One may start with $$ \int_0^\pi e^{(a+in)t}dt=\left[\frac{e^{(a+in)t}}{a+in}\right]_0^\pi=\frac{e^{(a+in)\pi}-1}{a+in},\qquad a,n\in \mathbb{R}^2,\, an\neq0, $$ then one may differentiate twice with respect to $a$ and take $a=0$ in the real part of each side.


In the same vein as Olivier Oloa's answer and tired's comment, you can start with

$$I(n) = -\int_0^\pi \cos (nt) \,dt = -\left[\frac{\sin(nt)}{n}\right]_0^\pi = -\frac{\sin(n\pi)}{n}$$

and take the derivative with respect to $n$ twice to get

$$I''(n) = \int_0^\pi t^2 \cos (nt) \,dt = \frac{n^2\pi^2 \sin(n\pi) + 2n\pi\cos(n\pi) - 2\sin(n\pi)}{n^3}$$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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