1. Integration

Hi, can someone help me find the following integration

exp(x)sin^2(n*pi*x/L)

the limits of integraion is [0,L]

Thanks for you help.

2. In: $\int _0^Le^x \text{Sin}\left[\frac{n*\pi * x}{L}\right]^2dx$ Out: $\frac{-4 n^2 \pi ^2+e^L \left(L^2+4 n^2 \pi ^2-L (L \text{Cos}[2 n \pi ]+2 n \pi \text{Sin}[2 n \pi ])\right)}{2 \left(L^2+4 n^2 \pi ^2\right)}$.

3. Thanks for giving me the answer but i need to know how to get it. I don't understand how to do the working out.

4. Originally Posted by Louise
Hi, can someone help me find the following integration

exp(x)sin^2(n*pi*x/L)

the limits of integraion is [0,L]

Thanks for you help.
Firstly using double angle trig formulas you have
$\frac{1}{2}\int_{0}^{L}e^{x}\left(1-cos\left(\frac{2n\pi x}{L}\right)\right)dx$

This can now be split into 2 integrals
$\frac{1}{2}\int_{0}^{L}e^{x}dx-\frac{1}{2}\int_{0}^{L}e^{x}cos\left(\frac{2n\pi x}{L}\right)dx$

The first integral gives $\frac{1}{2}(e^{L}-1)$ the second integral needs the use of integration by parts twice as follows
$I=\frac{1}{2}\int_{0}^{L}e^{x}cos\left(\frac{2n\pi x}{L}\right)dx$
$= \frac{1}{2}\left[e^{x}cos\left(\frac{2n\pi x}{L}\right)\right]_{0}^{L}+\frac{n\pi}{L}\int_{0}^{L}e^{x}sin\left(\ frac{2n\pi x}{L}\right)dx$
$=\frac{1}{2}(e^{L}-1)+\frac{n\pi}{L}\left[e^{x}sin\left(\frac{2n\pi x}{L}\right)\right]_{0}^{L}-\frac{4n^{2}\pi^{2}}{L^{2}}I$
$\implies I=\frac{1}{2}\frac{L^{2}}{L^{2}+4n^{2}\pi^{2}}(e^{ L}-1)$

Putting this all together we get a final solution
$\frac{1}{2}\frac{4n^{2}\pi^{2}}{L^{2}+4n^{2}\pi^{2 }}\left(e^{L}-1\right)$

PS. I have assumed that n is an integer and thus that $sin(2n\pi)=0, \ cos(2n\pi)=1$