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.

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

Thanks

Rick66

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.

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

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

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

$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 $2 \pi$:

$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 $\frac{\pi}{ 2}$. ie when:

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

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

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

Which gives:

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

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

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

So these are all equal to each other:

$At=Bt=Ct$

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

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.

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

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

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).

$t_0 = (a+b)/2$
$t_{k+1} = t_k - \frac {f'(t_k)} {f''(t_k)}$