Evaluate this integral

90 Views Asked by At

Evaluate this integral:

$$a_{n} = \dfrac{1}{\pi}\int^{\pi}_{-\pi} \left(\dfrac{T}{2\pi}\right)^2y^2\cos ny ~dy$$

I understand this needs to be integrated by parts, so far I have

$a_{n} = \dfrac{T^2}{4\pi^3}\int^{\pi}_{-\pi} y^2\cos ny dy$

After some workings, I get to,

$a_{n} = \dfrac{-T^2}{2n\pi^3} \left[\left[\dfrac{-y\cos ny}{n}\right]^{\pi}_{-\pi}+\dfrac{1}{n}\int^{\pi}_{-\pi} \cos ny dy\right]$

However at this step I get $a_{n} = 0$

3

There are 3 best solutions below

2
On BEST ANSWER

For my own benefit, I need to write out all the steps

Ignoring the constant factor out front, integrating $\int^\pi_{-\pi} y^2 \cos(ny) dy$ by parts, we see \begin{align*} \int^\pi_{-\pi} y^2 \cos(ny) dy &= \left[\frac{y^2\sin(ny)}{n}\right]^\pi_{-\pi} - \frac{2}{n}\int^\pi_{-\pi} y\sin(ny) dy\\ &=\left[\frac{y^2\sin(ny)}{n}\right]^\pi_{-\pi} - \frac{2}{n}\left(\left[ \frac{-y\cos(ny)}{n} \right]^\pi_{-\pi} + \frac{1}{n}\int^{\pi}_{-\pi} \cos(ny) dy \right) \\ &=\left[\frac{y^2\sin(ny)}{n}\right]^\pi_{-\pi} - \frac{2}{n}\left(\left[ \frac{-y\cos(ny)}{n} \right]^\pi_{-\pi} + \frac{1}{n}\left[\frac{\sin(ny)}{n} \right]^\pi_{-\pi}\right) \\ &= \frac{1}{n^3}(2n^2\pi^2 \sin(n\pi) +4\pi n\cos(n\pi) -2\sin(n\pi)) \end{align*} so if $n$ is a natural number (so $\sin(n\pi)=0$, $\cos(n\pi) = (-1)^n)$, I get $$\int^\pi_{-\pi} y^2 \cos(ny) dy = \frac{4\pi (-1)^n}{n^2}.$$ Edit: fixed a sign based on the below comment.

1
On

Ignoring constants: $$ \int y^2\cos ny\,dy = {{\left(n^2\,y^2-2\right)\,\sin \left(n\,y\right)+2\,n\,y\,\cos \left(n\,y\right)}\over{n^3}}, $$ $$ \int^{\pi}_{-\pi}y^2\cos ny\,dy = {{4\,\pi\,\left(-1\right)^{n}}\over{n^2}}. $$

2
On

I did nothing more that Martin. Just note you a qiute fast way to do such that integral. See the illustrate way below:

enter image description here

I am sure you can find out what was done in the first column and in the second one. After doing each terms in each rows, multiply the terms as you can see through skew dots. Then add the resulted terms as $$\color{red}{+}[y^2/n^2\times \sin(ny)]\color{blue}{-}[-2y/n^2\cos(ny)]\color{red}{+}[-2/n^3\sin(ny)]$$

Note that the integrand is an even function taken on a symmetric interval.