this is something I should know by now but I always get messed up.
Sometimes, in trigonometric integrals, once the integral has been calculated and we just have to insert the bounds in the cosines or sines, we have to change these bounds (mostly divide by two and therefore multiply by two the integral), so that the integral does not give us 0.
I wonder when we are allowed to do that, and when we cannot because the integral actually DOES equal 0..?
For example, take the integral of (2 (cos(n t)-n t sin(n t)))/n^2 dt between 0 and 2*pi, with t as variable. Easier to read with this link:
integrate (2 (cos(n t)-n t sin(n t)))/n^2 dt - Wolfram|Alpha
This gives us an integral with ntcos(nt) in the answer (check the wolfram link). In this case we had a sum of cosines and sines which should give us a non-zero answer. If we check with wolframalpha and insert the bounds, we get
integrate (2 (cos(n t)-n t sin(n t)))/n^2 dt from 0 to 2*pi - Wolfram|Alpha
Which indeed does not give us zero if we insert an integer n.
However, if we inserted the bounds in the integral we found with the first link, and: leave the bounds as they are we get 0 because cos(2*pi)-cos(0)=(1-1)=0.
--> If we do not change the bounds we get 0, because we will get (preceding term)*(cos(2*pi)-cos(0)=(1-1)=0
--> If we write 2*(preceding term)*cos(nt) and change the bounds from 0 tp pi, we get (cos(pi)-cos(0))=(-1-1)=-2
This considerably changes the answer and I would therefore like to undersand when and when not we have to do that.
Any help VERY appreciated! )