10

Suppose I have a large number of harmonic oscillators all producing slightly different pitches in a certain range. What is the resulting waveform?

I tried modeling this as $$\lim_{q\to\infty}\frac1q \sum_{i=0}^q \sin\left(\left( 1+\frac iq\right)x\right) $$

and somewhat to my surprise the limit seemed to exist, at least according to Desmos:

enter image description here

Then I thought “oh, this will just be the Fourier transform of the rectangular pulse from 1 to 2” but no, it appears not, that's the sinc function, which is even, and this is odd. (I don't understand Fourier transforms very well.) It looks very similar if I sum from $-q$ to $q$.

  1. Is this real or is it an artifact of floating-point calculations?
  2. If it's real, does this function have a name? Is anything known about it?
  3. If I replace the $1+\frac iq$ with $0+\frac iq$ and sum from $-q$ to $q$ it seems to sum to the everywhere-zero function, which seems less surprising to me. Why does it do this for $0$ but not for $1$?

Here is a link to Desmos: https://www.desmos.com/calculator/jqtilqhv4p

Note that when I originally asked the question I pasted a screenshot of the wrong graph.

MJD
  • 67,568
  • 43
  • 308
  • 617
  • 3
    To a first approximation, your sum represents the violin section of an orchestra when all the violinists play the same note. The slight variations in tuning from one instrument to the others adds a richness to the timbre, compared to an amplified solo player. This comes about from the beat frequencies which simulate vibrato. – Phil Freedenberg May 02 '25 at 13:20
  • 1
    Dan Piponi points out that in that case the waves will all be out of phase, which is not included in my model. When the phases are randomly distributed, the sum is much more like white noise than it is like the singular pulse I found here. – MJD May 03 '25 at 17:00

2 Answers2

10

$$\sin\left(\left(1+\frac iq\right)x\right)=\sin (x) \cos \left(\frac{ix}{q}\right)+\cos (x) \sin \left(\frac{i x}{q}\right)$$ Making the summations $$S_q=\sum_{i=0}^{q}\sin\left(\left(1+\dfrac{i}{q}\right)x\right)=\sin \left(\frac{3 x}{2}\right) \sin \left(\frac{(q+1) x}{2 q}\right) \csc \left(\frac{x}{2 q}\right)$$ Expanding for large $q$ $$\frac {S_q}q=\frac{\cos (x)-\cos (2 x)}{x}+\frac{\sin (x)+\sin (2 x)}{2 q}+\frac{x (\cos (x)-\cos (2 x))}{12 q^2}-\frac{x^3 (\cos (x)-\cos (2 x))}{720 q^3}+O\left(\frac{1}{q^4}\right)$$

7

enter image description here

We have $$s(x) = \dfrac{1}{q}\sum_{i=0}^{q}\sin\left(\left(1+\dfrac{i}{q}\right)x\right)$$

Let $t = \frac{i}{q}$, $\triangle t = \frac{1}{q}$

So, this is like a Riemann sum $$s(x) \approx \int_{0}^{1}\sin((1+t)x).dt\\ = \dfrac{1}{x}(\cos x - \cos 2x) = \dfrac{2}{x}\sin\left(\dfrac{3x}{2}\right)\sin\left(\dfrac{x}{2}\right)$$

This is an odd function just like you observed

If it's real, does this function have a name? Is anything known about it?

As far as I am aware, this function does not have a name

If I replace the $1+\frac iq$ with $0+\frac iq$ and sum from $-q$ to $q$ it seems to sum to the everywhere-zero function, which seems less surprising to me. Why does it do this for $0$ but not for $1$?

The Riemann sum then becomes $$\int_{-1}^{1}\sin(tx).dt = 0$$

This is because the integrand is just an odd function

But, if we consider the original sum $$\int_{-1}^{1}\sin((1+t)x).dt \not= 0$$

As you may have observed, the integrand is not odd and therefore, the value is unfortunately not $0$

  • Your function does not match the plot given in OP – whpowell96 May 02 '25 at 04:34
  • @whpowell96 I tried plotting this in desmos and my plot of OP's function doesn't match OP. And my function correctly describes my plot – Random Math Enthusiast May 02 '25 at 04:54
  • 1
    I see. I just double checked that and it looks like OP's plot is summing $-q$ to $q$, whose limit is $\sin^2 x/x$. That one is easier to work out using the Fourier transform – whpowell96 May 02 '25 at 04:55
  • 1
    The Fourier approach works nicely for this as well because you will show that the Fourier transform of this function converges to a sum of $\mathrm{rect}$ functions and you can choose the modulation to get it back to a centered $\mathrm{rect}$ function as the Fourier transform of a $\mathrm{sinc}$ function – whpowell96 May 02 '25 at 05:00
  • @whpowell96 if the OP is summing from $-q$ to $q$ that is indeed closer to the plot generated by desmos. Perhaps I should add this to my answer. – Random Math Enthusiast May 02 '25 at 05:16