Please help to solve; 2piAcos(2piAt) +2piBcos(2piBt) +2piCcos(2piCt) = 0.

Hello everyone,

I'm new to this forum so thanks for having me. I'm a musician and wave theorist currently working on a problem relating to tonality in music.

I need to find the extrema of the sum of 3 sine waves of whole-numbered frequencies A, B and C in lowest form i.e. f(t) = sin(2piAt) +sin(2piBt) +sin(2piCt) is periodic with a GCD of 1Hz.

The 1st derivative test for extrema gives

f'(t) = 2piAcos(2piAt) +2piBcos(2piBt) +2piCcos(2piCt) = 0

where I need to solve for t. Since the wave is periodic we can restrict the domain to 0 <= t <= 1. I've tried finding trig substitutions, reframing the problem in complex form etc but this one truly has me stumped. I would have pulled all my hair out by now if I had any. (Headbang)

If somebody could help me with this it would be greatly appreciated.

Thanks

Rick66

Re: Please help to solve; 2piAcos(2piAt) +2piBcos(2piBt) +2piCcos(2piCt) = 0.

Quote:

Originally Posted by

**Rick66** Hello everyone,

I'm new to this forum so thanks for having me. I'm a musician and wave theorist currently working on a problem relating to tonality in music.

I need to find the extrema of the sum of 3 sine waves of whole-numbered frequencies A, B and C in lowest form i.e. f(t) = sin(2piAt) +sin(2piBt) +sin(2piCt) is periodic with a GCD of 1Hz.

The 1st derivative test for extrema gives

f'(t) = 2piAcos(2piAt) +2piBcos(2piBt) +2piCcos(2piCt) = 0

where I need to solve for t. Since the wave is periodic we can restrict the domain to 0 <= t <= 1. I've tried finding trig substitutions, reframing the problem in complex form etc but this one truly has me stumped. I would have pulled all my hair out by now if I had any. (Headbang)

If somebody could help me with this it would be greatly appreciated.

Thanks

Rick66

Unless there is a geometry I'm not seeing here I think you are going to have to resort to numeric approximation.

-Dan

Re: Please help to solve; 2piAcos(2piAt) +2piBcos(2piBt) +2piCcos(2piCt) = 0.

Thanks Dan,

Yes I think you're right. Do you have any suggested methods of approximation I should look at? I've been thinking Taylor series of cos but I'm not sure if it would give other than the few points around zero.

-Rick

Re: Please help to solve; 2piAcos(2piAt) +2piBcos(2piBt) +2piCcos(2piCt) = 0.

PS: Taking the 2nd degree Taylor for each cos term gave me only the two points at both sides of the origin.

Re: Please help to solve; 2piAcos(2piAt) +2piBcos(2piBt) +2piCcos(2piCt) = 0.

This may be really stupid, but what about this:

$\displaystyle 2 \pi A \cos (2 \pi A t) + 2 \pi B \cos (2\pi Bt)+ 2 \pi C \cos ( 2 \pi Ct)=0$

So then we can divide through by $\displaystyle 2 \pi$:

$\displaystyle A \cos (2 \pi A t) + B \cos (2\pi Bt)+ C \cos ( 2 \pi Ct)=0$

This is 0 when each of the cos terms is $\displaystyle \frac{\pi}{ 2}$. ie when:

$\displaystyle 2 \pi At = \frac{\pi}{2}$

$\displaystyle 2 \pi Bt = \frac{\pi}{2}$

$\displaystyle 2 \pi Ct = \frac{\pi}{2}$

Which gives:

$\displaystyle At= \frac{1}{4}$

$\displaystyle Bt= \frac{1}{4}$

$\displaystyle Ct= \frac{1}{4}$

So these are all equal to each other:

$\displaystyle At=Bt=Ct$

So $\displaystyle A=B=C$ which makes things a bit easier.

Re: Please help to solve; 2piAcos(2piAt) +2piBcos(2piBt) +2piCcos(2piCt) = 0.

Hi Rick66! :)

Since you only have sines with no phase shift, your absolute extreme is at a predictable location.

This is where all the sines simultaneously take their maximum value.

The absolute maximum is where the fractional parts of At, Bt, and Ct are simultaneously 1/4.

I have to think about how to solve that exactly with a neat formula.

A typical approximation method is Newton-Raphson - see wiki.

@Fumbles: I believe that A, B, and C are numbers that are given - they are not supposed to be solved. We want to solve only for t.

Furthermore, you are forgetting the (mod 2pi) term.

Re: Please help to solve; 2piAcos(2piAt) +2piBcos(2piBt) +2piCcos(2piCt) = 0.

Thanks Fumbles,

Unfortunately, the three frequencies of the problem in question are not equal. It is true that setting for eg 2piAt = (2N+1)pi/2, N = 0,1,2..., gives t = (2N+1)/4A which is close to your method. But the problem then is that finding a particular N for each of the three frequencies is not guaranteed i.e. A/B might not equal odd/odd. It also doesn't give the other zero's.

But thanks anyway,

Rick66

Re: Please help to solve; 2piAcos(2piAt) +2piBcos(2piBt) +2piCcos(2piCt) = 0.

Thanks ILikeSerena,

Yes you're correct about the absolute extreme. Since the frequencies are whole then this occurs at every GCD period of 1 sec. Its the other values that are eluding me.

Now when you say "combined frequency is the LCM" do you have something specific in mind? It's just that I tried to work with the LCM and didn't get very far. At any rate, thanks for the heads up concerning Newton-Raphson method which I'll look into right now.

Btw, by "eyeballing" the plots I realised that the zero's of the simpler function cos (2piAt) + cos (2piBt) + cos (2piCt) = 0 would probably work just as well. So if you or anyone knows the solution to this it'd be much appreciated.

Thanks

Rick66

Re: Please help to solve; 2piAcos(2piAt) +2piBcos(2piBt) +2piCcos(2piCt) = 0.

Quote:

Originally Posted by

**Rick66** Thanks ILikeSerena,

Yes you're correct about the absolute extreme. Since the frequencies are whole then this occurs at every GCD period of 1 sec. Its the other values that are eluding me.

Now when you say "combined frequency is the LCM" do you have something specific in mind? It's just that I tried to work with the LCM and didn't get very far. At any rate, thanks for the heads up concerning Newton-Raphson method which I'll look into right now.

Btw, by "eyeballing" the plots I realised that the zero's of the simpler function cos (2piAt) + cos (2piBt) + cos (2piCt) = 0 would probably work just as well. So if you or anyone knows the solution to this it'd be much appreciated.

Thanks

Rick66

I just realized that the sines do not necessarily take on a maximum value simultaneous anywhere.

For instance sin(2pi.3t) and sin(2pi.5t) are never simultaneously both 1.

Now with cosines, that is a different matter.

The sum of 3 cosines take on their *maximum value* at t=0,1,2,...

The sum of 3 sines are simultaneously *zero *at t=0,1,2,...

I deleted the part of comment mentioning LCM, since it's slightly more complex.

What we have is that if the GCD(A,B,C)=1, that the period T is 1.

Generally, the period T = 1 / GCD(A,B,C) = LCM(A,B,C) / (ABC).

Re: Please help to solve; 2piAcos(2piAt) +2piBcos(2piBt) +2piCcos(2piCt) = 0.

To properly find all extrema in the interval [0,1], I think you should divide the interval in 2.A.B.C equal-length sub intervals.

In each sub interval [a,b] you should check if f'(a) and f'(b) have a different sign.

If they do, then f' has a root on [a,b].

With Newton-Raphson you can find the root of the derivative on each sub interval [a,b] as follows:

$\displaystyle t_0 = (a+b)/2$

$\displaystyle t_{k+1} = t_k - \frac {f'(t_k)} {f''(t_k)}$