Hey Neverthelessified.
I'm having a little trouble understanding your question: Can you ask what you are looking for in one or two sentences?
Hi all,
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! )
Thanks!!
Hi. I had the same problem with those kinds of function until I started seeing it this way:
Since cosine is an even function and sine an odd function, you know that: and , you may find two areas that cancel themselves (let's say -1 and 1) because of the symmetry of the function itself. But, when does it cancels or not? Well, in this case (since I'm not 100% sure that happens with every single function), the integral of an even function is an odd one and viceversa. Having that in mind, you can see that:
(1)
(2)
That's one example when trigonometric integrals may be equal to zero.
In your case, your bounds are 0 and . Now, if you plot both cosine and sine functions, you'll notice that the total area is equal to two times the area below the curve between 0 and . Again, there's symmetry right there but, in this case, both integrals will alway be zero because one area cancels the other. We can use the previous example to prove that while playing a little bit with the functions.
Now we can replace in (1) using any a.
Same thing with cos(x) but, in this case, . Notice that the new t will change the bounds. In your case, it will be from to . If we replace in (1) and (2) both will be equal to zero.
Finally, we get to the conclusion that we can't integrate trigonometric functions directly from 0 to . So we need to integrate the possitive curve which is the first half.
In a nutshell, my answer is: everytime you're in front of a symmetric function, separate it in half and take the positive part and multiply it by two, four, eight or whatever is needed. Also you could think it with that ceiling-floor way to calculate an integral:
I think that's all. I hope I was clear enough since this is my first post. Anything you don't understand, ask me and I'll try to clarify it.
Hi russo,
thank you very much for the time you put in the detailed answer you gave me.
I now do understand where the problem lies, even though I am not entirely sure about how to deal with it. A few questions, if you have a little time left:
- You say "Everytime you have a symmetric function [..]", I assume that you thereby mean odd or even (or any sum or product of these, at least with sines and cosines). What do you call the "positive" part if we have bounds from 0 to 2*pi? Are we to change the bounds as you did, from -pi to pi everytime, and then take the positive part from 0 to pi and multiply that by two? But then there would be a problem since if we have an odd function, multiplying the positive (x>0) area by two will not be correct since the negative part will cancel the positive part up, no..?
- In the last integral you wrote, why do you have a *(-1) in the second part from 0 to pi? If you separate an integral (which you call ceiling-floor way), aren't we supposed to simply separate one integral into two identical integrals but with different bounds?
--> Maybe I'm getting a little messed up because I'm doing too much of this. If when you read my post you say "Oh my god he really doesn't understand anything, I have to start from the beginning", then you can just wait a few days before answering and I'll let my mind rest a little before writing another post here when it will be a little more clear..
1) I call positive part where so the integral will be positive. About changing the bounds was only to show you about the symmetry easily because we measure symmetry around the axes. If you try to do it both ways you'll see it's the same because, doing the substitution, you will have to integrate a displaced function with its displaced bounds (imagine moving the function to the left, the bounds will also move to the left and the area keeps the same). While solving an exercise you just draw the function in order to see if there's a negative area that might cancel the positive one and assume both areas will be equal. Next, you calculate only one and multiply it by two. Same thing with circles for example. It's kind of a general rule and I tried not to think much about it, just divide it in half but if you want to analyze it everytime, the best way is to draw it. Finally, for your last question, it would never be zero even if you displace it. I'll attach one graph to avoid terminology confusions (which I still don't know how you call some things in English). The first one is from to and the second one from to . As you can see, it's just moved to the side but, again, don't worry about the displacement, everytime there's a complete period of a sin or cos just take the positive half and multiply it by 2.
(1)
2) What I meant with ceiling-floor is a method to solve integrals with two functions. I'll also attach a picture showing an example.
(2)
My red function is my roof and the blue function is the floor. If I want to get the area between them I should integrate first the upper curve and then substract the area of the lower curve. Let the red curve be f and the red one g:
It can be proven for any f and g greater than zero or lower than zero. Now, what I've done before was using and (which is the x axis). Using this method, (please check the picture (1) ), you can see that in the first half my roof is the sine and in the second part the x axis.
I always found this stuff kind of confusing (to this day every math exam that involved integrals, couldn't make it right in one shot). The only way I could start understanding it is doing exercises and think about different situations. However, integrals with graphics have to be done with complete concentration and patience (or at least for me haha)
Hope I could clarify your doubts.
Oh wow this was very clear. Intuitively though I would have said that if a negative part cancels the positive part, then we indeed find that the integral equals zero. Apparently it isn't like that and we have to multiply the positive area by two. This is a big change though! It means for example that the integral of sin(x) from 0 to 2*pi equals 4 and not 0.. How come Wolframalpha gives us 0?
Because Wolfram calculate the integral you give. Actually the result of the sin(x) integral IS zero but they're not asking you its value but the area below the curve. That's a different thing. For example if you want to calculate the mean value of a complete period of a sin(x), ( ) the result is zero. However, what means that the integral is zero shows that there's negative area which we consider illogical and we make the negative positive.
I'm glad you understood. Good luck
Thank you very much for the patience you had to explain this
I guess the only problem now is to know when we have to calculate the integral and when we have to calculate the total area (thus respectively 0 and 4 for the sine from 0 to 2*pi).