1. ## Trig integral

I need to do an integral for my quantum mechanics homework but it has been a while since I've taken calc so my math is a bit rusty.
$\frac{4}{L^2}\int^L_0\sin^2(\frac{m\pi x_2}{L})\int^L_0x_1^2\sin^2(\frac{n\pi x_1}{L})dx_1dx_2$ $=\frac{4}{L^2}\int^L_0\sin^2(\frac{m\pi x_2}{L})dx_2\int^L_0x_1^2\sin^2(\frac{n\pi x_1}{L})dx_1$
The first integral I can do, it's the second one that I'm having trouble with. I tried by parts and know that I can do it with brute force, but the it involves using by parts multiple times. In physics, we are usually given less involve math problems, so I was just wondering whether there is a more elegant way to do this.

2. ## Trig Integral

Hello synclastica_86
Originally Posted by synclastica_86
I need to do an integral for my quantum mechanics homework but it has been a while since I've taken calc so my math is a bit rusty.
$\frac{4}{L^2}\int^L_0\sin^2(\frac{m\pi x_2}{L})\int^L_0x_1^2\sin^2(\frac{n\pi x_1}{L})dx_1dx_2$ $=\frac{4}{L^2}\int^L_0\sin^2(\frac{m\pi x_2}{L})dx_2\int^L_0x_1^2\sin^2(\frac{n\pi x_1}{L})dx_1$
The first integral I can do, it's the second one that I'm having trouble with. I tried by parts and know that I can do it with brute force, but the it involves using by parts multiple times. In physics, we are usually given less involve math problems, so I was just wondering whether there is a more elegant way to do this.
When you replace $\sin^2kx$ by $\tfrac{1}{2}(1-\cos 2kx)$, where $k =\frac{n\pi}{L}$, and then separate off the cosine term the only bit that needs any work is an integral of the form $\int x^2\cos 2kx \,dx$. As far as I know, the only way is to use Parts twice, to reduce the $x^2$ term to a constant, and then finally integrate the remaining trig term. You end up with

$\int x^2\cos 2kx \,dx = \frac{1}{4k^3}\left(2k^2x^2\sin 2kx + 2kx\cos 2kx -\sin 2kx\right)$