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
$\displaystyle \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
$\displaystyle \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 $\displaystyle \frac{1}{2}(e^{L}-1)$ the second integral needs the use of integration by parts twice as follows
$\displaystyle I=\frac{1}{2}\int_{0}^{L}e^{x}cos\left(\frac{2n\pi x}{L}\right)dx$
$\displaystyle = \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$
$\displaystyle =\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$
$\displaystyle \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
$\displaystyle \frac{1}{2}\frac{4n^{2}\pi^{2}}{L^{2}+4n^{2}\pi^{2 }}\left(e^{L}-1\right)$
Hope that's helpful.
PS. I have assumed that n is an integer and thus that $\displaystyle sin(2n\pi)=0, \ cos(2n\pi)=1$