Integral of Product of Three Cosines

  • Thread starter Thread starter Proofrific
  • Start date Start date
  • Tags Tags
    Integral Product
Proofrific
Messages
12
Reaction score
0
[solved] Integral of Product of Three Cosines

I'm trying to determine the integral of the product of three cosines:
\int_0^\infty \cos \left( \frac{n \pi t}{T} \right) \cos \left( \frac{m \pi t}{T} \right) \cos \left( \frac{l \pi t}{T} \right) dt
for n, m, l integers.

Some of the results are obvious. For example, if n = m = l, then the integral is zero.

I tried various relations between m, n, and l in Mathematica. For example,
Code:
Assuming[{n \[Element] Integers, m \[Element] Integers, 
  l \[Element] Integers, m == n, n != l},
 Integrate[
  Cos[(n \[Pi] \[Tau])/T] Cos[(m \[Pi] \[Tau])/T] Cos[(
    l \[Pi] \[Tau])/T], {\[Tau], 0, T}]
 ]
yields the result 0. But, this is clearly wrong, as
Code:
Integrate[
 Cos[(3 \[Pi] \[Tau])/T]^2 Cos[(6 \[Pi] \[Tau])/T], {\[Tau], 0, T}]
satisfies the previous form of m ==n, n != l, but it evaluates to T/4.

Does anyone know the relationships between n, m, and l, which yield T/4 as the integral of
\int_0^\infty \cos \left( \frac{n \pi t}{T} \right) \cos \left( \frac{m \pi t}{T} \right) \cos \left( \frac{l \pi t}{T} \right) dt
 
Last edited:
Physics news on Phys.org
Well, you have cos(a)*cos(b)=1/2*(cos(a+b)+cos(a-b)).

Thus, we get:
cos(a)*cos(b)*cos(c)=1/4*(cos(a+b+c)+cos(a+b-c)+cos(a-b+c)+cos(a-b-c))
 
arildno said:
Well, you have cos(a)*cos(b)=1/2*(cos(a+b)+cos(a-b)).

Thus, we get:
cos(a)*cos(b)*cos(c)=1/4*(cos(a+b+c)+cos(a+b-c)+cos(a-b+c)+cos(a-b-c))

Thanks! That answered my question.

For others, if a+b+c = 0, or a+b-c=0, or a-b+c=0, or a-b-c=0, then we integrate cos(0) = 1 and get 1/4.
 
Oh come on. This integral AS STATED obviously does not converge! Regardless of the values of l, m and n. You don't integrate a cosine or a product of cosines from 0 to infinity, you integrate it from 0 to some period. Integrating it from 0 to infinity will either be infinite or it will end up being like a cosine itself, hanging around zero and not diverging to infinity but not CONVERGING to anything because it flips between -1 and +1 forever. Like since you say n=l=m, perhaps you might ask, what is it integrated from 0 to 2*pi times the least common multiple of n, l and m. And I'll tell you what you do in that case, you look at the Fourier transform. It is ZERO IF AND ONLY IF there IS no solution to the equation (+/-)l(+/-)m(+/-)n=0. Or in words, positive or negative l plus or minus m plus or minus n is equal to 0. The average DC value will be 2^-n when there are n cosines multiplied together (in this case n=3, so the DC value is one eighth) for each solution to that expression, but of course bear in mind that solutions will always come in pairs. If negative l plus m plus n equals 0, then positive l minus m minus n equals 0, so the average DC value will always be a multiple of one quarter. And actually with only 3 integers, it is impossible to have 2 or more pairs of solutions unless one of these integers is ZERO (and that would just make the cosine of it equal to 1 and would make the whole expression a product of TWO cosines - I'll disregard that case), so the integral from 0 to 2*pi*lcm(l,m,n) will either be exactly 0, or it will be exactly (pi/2)*lcm(l,m,n). If it is zero, because there is no solution to the expression I gave, in that case the Fourier transform has no dc component. Finding the DC value (also known as frequency zero component) like this (integrating over the period, which is 2*pi times the least common multiple of all integers in the set) is in fact precisely the Fourier transform of the partition problem (look up "partition problem" on wikipedia) since the Fourier transform of the convolution of functions in a set is equal to the product of the Fourier transforms of the functions, so interestingly enough doing this with an arbitrary such product of cosines is NP complete, but considering there are only 3 elements in the set, that's not exactly a problem since there are only 4 pairs of frequency components to consider.
 
Back
Top