Calculation of an integral with square cosine

77 Views Asked by At

How can I calculate this integral? I've already tried changing the variable inside the cosine, calculating by parts and applying trigonometric relationships, but it does not give me the right result. $$\int_0^Lx^2\cos^2\left(\frac{2\pi x}{L}\right)\,dx$$

1

There are 1 best solutions below

1
On

$$I=\int_0^Lx^2\cos^2\frac{2\pi x}{L}\,dx$$ Change variable $x\mapsto \dfrac{tL}{2\pi}$ $$I=\underbrace{\frac{L}{2\pi}}_k\int_0^{2\pi}t^2\cos^2t\,dt$$

$\cos^2 t=\frac12(\cos 2t+1),$ $\int\cos^2 t\,dt=\frac14\sin 2t+\frac12t$

So

$$\begin{align}I&=k\left[t^2\left(\frac14\sin2t+\frac12t\right)\right]_0^{2\pi}-2k\int_0^{2\pi}t\left(\frac14\sin2t+\frac12t\right)\,dt\\ &=k\cdot4\pi^2\cdot\pi-2k\left[t\left(-\frac18\cos 2t+\frac14t^2\right)\right]_0^{2\pi}+2k\int_0^{2\pi}-\frac18\cos 2t+\frac14t^2\,dt\\ &=4k\pi^3-2k\cdot2\pi\cdot\pi^2-2k\cdot2\pi\cdot\left(-\frac18\right)+2k\left[-\frac1{16}\sin2t+\frac1{12}t^3\right]_0^{2\pi}\\ &=\frac43k\pi^3+k\frac\pi2\\&=\frac{L}{2}\left(\frac12+\frac43\pi^2\right)\end{align}$$