# computing integrals with sinx and sin(nx)

• Mar 14th 2012, 02:27 PM
computing integrals with sinx and sin(nx)
For a Fourier method problem, I need to solve the following integral for the closed forms of coefficients $\displaystyle c_n$

$\displaystyle \int_0^\pi \! sin^2(x)sin(nx) \, \mathrm{d} x.$

For n even, the integral is 0 since sin(nx) would be odd about $\displaystyle \pi/2$
For n odd, I let n = 2m + 1 and hence my integral with the sin(a+b) identity gives

$\displaystyle \int_0^\pi \! sin^2(x)sin(2mx)cos(x) + sin^2(x)cos(2mx)sin(x) \, \mathrm{d} x.$

but here I'm not sure what to do next. perhaps there is an easier way to approach this problem. any suggestions would be greatly appreciated.
• Mar 14th 2012, 02:56 PM
Kiwi_Dave
Re: computing integrals with sinx and sin(nx)
You could try integrating by parts with:

u = Sin x
v' = Sin x * Sin nx = 0.5[Cos (n-1)x - Cos (n+1)x]

I haven't tried it, but solving for this particular v is a common task in fourier problems.
• Mar 14th 2012, 02:58 PM