If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Integral of sine times cosine

Definite integral of the product of sine and cosine. Integrating sin(mt) * cos(nt) over a full period equals zero for any integer m and n. Created by Sal Khan.

Want to join the conversation?

  • blobby green style avatar for user mullachv
    It would be helpful to state and point to the sum rule and difference rule (for sin function) towards the beginning of the video.
    sin(A+B) = sinA cosB + cosA sinB
    sin(A-B) = sinA cosB - cosA sinB

    So the following becomes obvious:
    sin(mt)cos(nt) = 1/2 [ sin((m+n)t) + sin((m-n)t) ]
    (39 votes)
    Default Khan Academy avatar avatar for user
  • male robot hal style avatar for user Grayer
    If there are such thing as long divition is there such thing as long times?
    (5 votes)
    Default Khan Academy avatar avatar for user
  • piceratops ultimate style avatar for user Anitej Banerjee
    At , Sal claims that the integral of sin(mx) dx from 0 to 2pi is 0 for any integer m, even if m is zero.
    Looking at the curve visually, this makes sense as the sin(0) is 0 and constant from 0 to 2pi.

    However, we established in the last video that the integral = -1/m * cos(mx)
    So -1/0 * (cos(0)-cos(0)) = 0
    So -1/0 * 0 = 0
    However the equation above is false! We know that dividing anything by 0 makes it undefined and so -1/0 * 1 = not defined...
    This means there's some faulty logic that I've applied. Can someone please explain which step is wrong? Is it just the idea that "anything multiplied by 0 is 0"?
    Thank you!

    EDIT: I just realized the same "logic" holds for the second integral as well
    Integral of cos(0) from 0 to 2pi is simply the area of the rectangle of sides 1 and 2pi units, so it's 2pi
    Once again, taking the anti-derivative from last video:
    1/m * (sin(m*2pi) - (sin(m*0)) = 2pi
    1/0 * (0-0) = 2pi
    In this case the "anything multiplied by 0 is 0" rule actually seems to be violated...
    (4 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user andreas demetriou
    if integration represents the area under the curve, the answer comes out to be zero, because the graph of sine and cosine are symmetrical, and the one cancel the other out.
    Since the area above the graph is consider positive and the other negative.
    Can you please explain how come to be zero?
    (3 votes)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user andreas demetriou
    With the integral we find the area under the curve, since the area above the x-axis and below the x-axis is symmetrical, and by integration the one above the x-axis is positive and the one below the x-axis is negative the answer comes out to be zero.
    But is the area of the curve zero? Can you please explain the reason why you consider this integral to be zero?
    (2 votes)
    Default Khan Academy avatar avatar for user
    • leaf green style avatar for user Anurag Singh
      You may have realized that integral of sin(mt) and cos(mt) alone, from 0 to 2*pi was zero because the curve was symmetrical under the period of integration i.e., positive area (region under curve above time axis) and negative area (region under curve below time axis) was EQUAL!
      This was possible solely because curves sin(mt) and cos(mt) were periodic in nature, which means they repeat after certain time period.
      Note that, sin(1*t) has period of 2*pi ('1' complete cycle in period of integration), while sin(mt) has period 2*pi/m ('m' complete cycles in period of integration), hence equal no. of positive and negative areas.
      Now, sin(mt)*cos(nt) will also be a periodic function (if you try to plot it) and will contain integral no. of complete cycles in period of integration, and therefore integration of sin(mt)*cos(nt) will be zero.
      (2 votes)
  • aqualine seed style avatar for user dinesh guntur
    How to sin wave signal processing
    (1 vote)
    Default Khan Academy avatar avatar for user
  • piceratops seed style avatar for user Zeeshan Qureshi
    Why don't negative integers work in the cosine property?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user Fatima Yaqub
    When the integration is equal to zero ?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • blobby green style avatar for user ninka.kanska
    I am certain this is not true when m=n though. I think you should mention that. This is because if you take the limit the second integral ends up being cos(0)/0 as m-n=0. Hence you need to use L'Hopitals rule to determine that specific solution right?
    (1 vote)
    Default Khan Academy avatar avatar for user
  • leaf green style avatar for user Genie
    I think there is an error. You can't say "for any integer m" at , because else you divide by zero in the definite integral from 0 to 2pi.
    Can anyone confirm?
    (1 vote)
    Default Khan Academy avatar avatar for user

Video transcript

- [Voiceover] We're in our quest to give ourselves a little bit of a mathematical underpinning of definite integrals of various combinations of trig functions. So, it'll be hopefully straightforward for us to actually find the coefficients, our Fourier coefficients, which we're going to do a few videos from now. And we've already started going down this path. We've established that the definite integral from zero to two pi of sine of mt dt is equal to zero, and that the definite integral of cosine mt dt is equal to zero for any non-zero integer m. And actually, we can generalize that a little bit. For sine of mt, it could be for any m actually. And if you don't believe me, I encourage you, so let me write this, for any, for any integer m, this top interval's going to be zero and this second interval for any for non-zero, non-zero integer, integer m. And you can see, if you had zero in this second case, it would be cosine of zero t, so this would just evaluate to one, so you'd just be integrating the value one from zero to two pi, and so that's going to have a non-zero value. So, with those two out of the way, let's go a little bit deeper, get a little bit more foundations. So, I now want to establish that the definite integral from zero to two pi of sine of mt times cosine of nt dt, that this equals zero for any integers, integers m and n. And they could even be the same. They don't have to necessarily be different, but they could be different. How do we do this? Well, let's just rewrite this part right over here, leveraging some trig identities. And if this is completely unfamiliar to you, I encourage you to review your trig identities on Khan Academy. So, this is the same thing, has a definite integral from zero to two pi. This sine of mt times cosine nt, we can rewrite it using the product to sum formulas. So, that is, let me use a different color here. So, this thing right over here that I've underlined in magenta, or that I'm squaring off in magenta, that can be rewritten as one half times sine of m plus n t, sine of m plus n t, plus sine, sine of m minus n, m minus n t. And then let me just close that with a dt, dt. Now, if we were to just rewrite this using some of our integral properties, we could rewrite it as, so this part over here, we could, and let's assume we distribute the one half, so we're gonna distribute the one half and use some of our integral properties. And so what are we going to get? So, this part roughly, right over here, we could rewrite as one half times the definite integral from zero to two pi of sine of m plus n t dt and then this part, once you distribute the one half and you use some integration properties, this could be plus one half times the definite integral from zero to two pi of sine of m minus n, m minus n t dt. Now, what are each of these things going to be equal to? Well, isn't this right over here, isn't that just some integer? If I have to take the sum of two arbitrary integers, that's going to be some integer. So, that's going to be some integer. And this, too, is going to be some integer right over here. And we've already established that the definite integral of sine of some integer times t dt is zero. So, by this first thing that we already showed, this is going to be equal to zero, that's going to be equal to zero. It doesn't matter that you're multiplying by one half. One half times zero is zero. One half times zero is zero. This whole thing is going to evaluate to zero. So, there you go; we've proven that as well.