1. ## Hard integral

Can anyone help with the following integral:

int[sqrt(2/L)*sin((n*Pi*x)/L)]dL

The hint given is to use the trig identity:

sin(alpha)*sin(beta) = (1/2)*cos(alpha - beta) - (1/2)*cos(alpha + beta)

Thanks.

2. Hello, Ideasman!

If no one is responding, it's that the problem makes no sense.
. . I did an autopsy and came up with a COD . . .

int[sqrt(2/L)*sin((n*Pi*x)/L)]dL . ??

The hint given is to use the trig identity:
. . $\sin(\alpha)\cdot\sin(\beta) = \frac{1}{2}\cos(\alpha - \beta) - \frac{1}{2}\cos(\alpha + \beta)$

Could this be the problem?

. . $\int\sin\left(\frac{2}{L}\right)\cdot\sin\left(\fr ac{n\pi}{L}x\right)\,dx$
. . . . . $\uparrow$ . . . . . . . . . . . . $\uparrow$

Apply the identity:
. . $\sin\left(\frac{2}{L}\right)\cdot\sin\left(\frac{n \pi}{L}x\right) \:=\:\frac{1}{2}\cos\left(\frac{2}{L} - \frac{n\pi}{L}x\right) - \frac{1}{2}\cos\left(\frac{2}{L} + \frac{n\pi}{L}x\right)$

The problem becomes:
. . $\frac{1}{2}\int\cos\left(\frac{2}{L} - \frac{n\pi}{L}x\right)\,dx - \frac{1}{2}\int\cos\left(\frac{2}{L} + \frac{n\pi}{L}x\right)\,dx$

Then use substitution: . $u \:=\:\frac{2}{L} - \frac{n\pi}{L}x$ and $v \:=\:\frac{2}{L} + \frac{n\pi}{L}x$

3. Originally Posted by Soroban
Hello, Ideasman!

If no one is responding, it's that the problem makes no sense.
. . I did an autopsy and came up with a COD . . .

Could this be the problem?

. . $\int\sin\left(\frac{2}{L}\right)\cdot\sin\left(\fr ac{n\pi}{L}x\right)\,dx$
. . . . . $\uparrow$ . . . . . . . . . . . . $\uparrow$

Apply the identity:
. . $\sin\left(\frac{2}{L}\right)\cdot\sin\left(\frac{n \pi}{L}x\right) \:=\:\frac{1}{2}\cos\left(\frac{2}{L} - \frac{n\pi}{L}x\right) - \frac{1}{2}\cos\left(\frac{2}{L} + \frac{n\pi}{L}x\right)$

The problem becomes:
. . $\frac{1}{2}\int\cos\left(\frac{2}{L} - \frac{n\pi}{L}x\right)\,dx - \frac{1}{2}\int\cos\left(\frac{2}{L} + \frac{n\pi}{L}x\right)\,dx$

Then use substitution: . $u \:=\:\frac{2}{L} - \frac{n\pi}{L}x$ and $v \:=\:\frac{2}{L} + \frac{n\pi}{L}x$

It's a good thought. I came up with something similar, but I think we would have to leave the integral as "dL" otherwise the first sin function is simply a constant and we wouldn't need the hint. In fact, the integral becomes rather trivial. The problem I had with this is if we are integrating over L then I can't find a way to do the integral, and I suspect it has no closed form. (If I remember correctly anyway.)

But you are definitely right about one thing: this problem makes no sense as it is stated.

-Dan

4. Hello, Dan!

I didn't notice that the first sine is constant . . . *blush*

You're right . . . with $dL$, we can't integrate it:

. . $\frac{1}{2}\int\cos\left[(2-n\pi x)L^{-1}\right]\,dL - \frac{1}{2}\int\cos\left[(2+n\pi x)L^{-1}\right]\,dL$

That's what convinced me that it must be $dx$.

I hope Ideasman clarifies it soon . . .