We have
In=∫−ππ(1+2x)sinxsinnxdx=∫0π(1+2x)sinxsinnxdx+∫−π0(1+2x)sinxsinnxdx.
In the second integral we make the change of variable x=−x and
obtain
In=∫0π(1+2x)sinxsinnxdx+∫0π(1+2−x)sinxsinnxdx=∫0π(1+2x)sinx(1+2x)sinnxdx=∫0πsinxsinnxdx.
For n≥2 we have
In−In−2=∫0πsinxsinnx−sin(n−2)xdx=2∫0πcos(n−1)xdx=0.
The answer
In={0πif n is even,if n is odd
follows from the above formula and I0=0, I1=π.