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

170 Views Asked by At

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,

2

There are 2 best solutions below

0
On BEST ANSWER

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.

0
On

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}$$