What do you mean by wavelength at a point?
Given a a graph of the function
With , and being a large number (6 digits or more).
How do I calculate the wavelength (frequency) of the function at any given point ?
I see a sinusoidal function whose frequency decreases as increases, or it's wavelength increases with .
I fudged an algorithm, but it's off by about %.0001 which is unwieldy for large .
My reasoning was that every time struck an integer, the function would peak.
Therefore, the wavelength would equal the 'distance' between peaks.
Moreover, since Y = ... blah I think this is where I got lost..
My function for the wavelength was
I made this up ad hoc to get the answer I needed, but it is not accurate
Thanks in advance for your help!
Thanks for the prompt reply.
Perhaps I am using incorrect terminology. To clarify, I offer the image~
Where N = 221 and
and my attempt at the wavelength -
is shown red.
I hope this helps..
When (~14.866), the wavelength equals 1.
I understand you may not have a wavelength at a 'point' (uncertainty principle aside)
But what is the correct way to derive the wavelength of the original function?
Thanks again, Maddas for the brain time..
I believe you are understanding me.. I am 20 yrs removed from college calculus, so please forgive my lack of clarity.
May I start from scratch?
Graph via www.padowan.dk/graph/ (please disregard anti-aliasing to left of graph)
Where A = 1 (for ease), and
N = 221, and
x > 1 and,
x < N.
There is an infinite number of peaks between the asymptote (0) and 1, so let x > 1
We find half the maxima (value of 1) to be between x = 1 and 2 (because N / x decreases from N to half of N (N/2) as x goes from 1 to 2. Each integer between N and N/2 creates a corresponding peak between 1 and 2 on our graph. This trend continues as x increases.
At the point , The peak ratio transitions from more than 1 interval per x.. to less than 1 per x.
I consider this to mean that the 'instantaneous wavelength' of the function at is 1
So I said.. "ok.. then I should be able to take the difference of (N/x) -1 and (N/x + 1) and divide it in half to get the 'wavelength' for any x"?? divided by 2.
I'll use your k substitution method to simplify this into
But this is wrong.. I think because the + 1 and - 1 makes the algorithm biased somehow..
Ah, sorry. Cancelled the wrong term >_< Should be fixed, but now I think the spacing is wrong for what you're saying, so. disregard my last comment.
Hold on, I'll edit this in a minute.
This is my horrible drawing ;] The extrema occur at x=2N/k, where k is a positive integer If k is even, the extrema is a maximum, and if k is odd, it is a minimum. The one furthest right is at x=2N, and is a minimum.
I'll try this again. If you stand at a peak at x=2N/k, and look along the negative x-axis, you see the next peak at x=2N/(k+2). The distance between these peaks is (thanks for the correction) and if we sub in k=2N/x, we get for the "wavelength" at a point x. This has some of the qualitative properties you would expect. It goes to infinity as x goes to infinity and it goes to zero when x goes to zero. At , it is , which is if N is large.
So I would suggest that the wavelength is and the frequency is .
But we're still not on the same page, I don't think....... Could you explain what you mean when you say "The peak ratio transitions from more than 1 interval per x.. to less than 1 per x."? My interest is sort of perked; I couldn't have told you that it was going to be 1 without an equation...
Thanks for the prompt reply.. Your interest is appreciated. Sorry, was my night to cook.. Mexican night
Ok..In my graph, it shows peaks whenever N/x is an integer, and troughs when remainder is .5
In other words, I used 2PI as a constant so that it would complete a cycle at n/n-1, n/n-2, n/n-3... n/1.. (hope I am saying this right).
It seems your Van Gogh rendition has PI as the constant (not 2PI).
Secondly, If I may refer to the image in my last post..
N = 221, and has a square root about 14.866.. You may notice that prior to 14 on the x-axis, the peaks occur > 1 time per x.. after 15 and beyond is where the peaks diverge and we near n/4, n/3, n/2, n/1..
The distance between the peaks increases 221/4 to 221/3 to 221/2 to 221/1 as shown in your drawing..
I think you are nearing the solution. I may not be my sharpest at the moment..
Mexican food!! :o
No, I used as the constant. We have the same thing - peaks occur whenever N/x is an integer (meaning x=2N/k for some even integer k) and troughs occur when N/x is a half integer (meaning x=2N/k for some odd integer k). I see how you can tell that the wavelength should be 1 near now. So is the last expression I gave acceptable?
What exactly are you trying to do with this btw?
Maddas, I was a bit off yesterday, your picture is correct.. I was confused that you used 2N while I was calculating for N..
I also realize a DUH! in my assumptions.. This method can only produce the wavelength from one peak to the next higher or lower peak, but not both. The 'instantaneous wavelength' that I seek is not what I thought it was, and may not be 1 at .
is still not entirely precise.
Oh, I see what you're saying. In brief: peaks when x is an integer, peaks when N/x is an integer, so their sum peaks when x is an integer dividing N. I'm not sure how the wavelength gets involved though.
Note that the sum . The M-shape comes from the which is the modulating (carrier) wave. If you're going to check for peaks, it suffices to check just this function for peaks (it has fewer, so it will be slightly easier).
I'm also pretty sure there are much better ways to find factors...
Arggh.. You are right. but I meant to say 'the product of'. not the sum.. This is what is shown in the graph.
The product was more useful than the sum. Is there a simpler method? As you can see, my methods are still quite coarse.
If I can find the correct derivative for the wavelength between the peaks.. I can simply jump to the Nth peak at will, instead of waiting the age of the known universe and all that rot.
I'm giving myself a crash course in Hilbert Tranforms.. It seems this may be the direction I need for the correct algorithm.
Oh, I wondered why my graph didn't look like yours.
How? I mean, isn't that still alot of peaks to check?If I can find the correct derivative for the wavelength between the peaks.. I can simply jump to the Nth peak at will, instead of waiting the age of the known universe and all that rot.
Perhaps.. this is actually the basis of my whole question. The product of these functions produces a beat frequency with much fewer peaks. I am not entirely sure if there is a reliable way to predict where the next 'group peak' lies. If there is, we can go directly to it, evaluate it, and jump higher or lower without calculating each and every integer in-between, thus homing in on a factor.
As I mentioned, I can do this visually by scrolling through the graph, but if we can teach the computer how to do this, progress would be made.
I used UBasic originally for the script, but found Python to be much faster.
Just need that elusive derivative, I think..