## On intersecting periodic functions

I’m reading through Measurement by Paul Lockhart these days. He presents math as something that you just need to “get messy with”. And moreover, suggests that we get messy together in asking ourselves challenging problems and developing clever arguments.

Consider this an attempt at heeding Lockhart’s advice.

And, to clarify, I mean continuous, differentiable periodic functions. Your sines, your cosines.

Here’s Patrick’s desmos graph:

So definitely you can have a pair of periodic functions with one intersection. Initially I was wary of even this, but Joshua has me convinced. All you need is one of the periodic functions to have an irrational period (say, pi) and the other to have a rational period (say, 1) and both to be oppositely shifted vertically and the twain may meet just once.

• f(x)=cos(x)-1
• g(x)=cos(πx-π)+1

Also helpful, was this video from Joshua on irregular periods. Seeing this through the lens of rotating motion certainly helped me. It makes sense that something rotating with an irrational period will never match up with something rotating with a rational period more than once, if at all. After all, you can’t add a certain number of √2 ‘s together and get an integer. Easy peasy.

But I’m still wary of the existence a pair of periodic functions with two and only two intersections. In my head, a periodic function is one that satisfies the following:

f(x)=f(x+P) for all values of x and some constant P.

I’m trying to figure out how you’d make two functions meet within one period twice, and then never again. Here’s my attempt at a formal proof.

================================

If we assume that there are two solutions to the periodic functions f(x)=g(x), then we assume that,

g(a)=f(a)

and

g(a+c)=f(a+c) where c is some real number.

However, according to the definition of a periodic function, this would mean that

g(a+c+P)=g(a+c)=f(a+c) <— third (and presumably, infinite more) solutions!

================================

I could be wrong here. I’m not particularly moved by my own argument. If someone finds a couple periodic functions that do intersect more than 1 but less than infinity times, let us know in the comments or share your desmos.com graph. Or even better, make a more convincing argument (for or against) than I did.

Stay tuned, this post could probably get updated thanks to the collective brainpower of people that are much more clever than me.
================================

Update #1

Sure enough, I’m incorrect and my intuition was wrong. Check out this beauty from Dave (@daveinstpaul):

To see the functions used, click on the image.

So that’s three intersections. There’s still some hesitation here and on twitter as to whether you can have additional finite number of intersections. Keep looking and “getting messy” everyone!

And I would echo Joshua’s comment:

This entry was posted in periodic functions. Bookmark the permalink.

### 6 Responses to On intersecting periodic functions

1. David says:

Using the same idea as the 1-intersection examples given and a bit of a loophole in your problem statement, let f(x) = cos(pix)-1 and one period of g(x) as {1-cos(pix) for 0<x<=3, cos(x-3)+1 for 3<x<=3+pi}. The functions intersect twice at x=0 and x=2, but since g(x) has an irrational period and f(x) has a rational period, they shouldn't intersect again on later cycles. If I'm not mistaken, g(x) is still continuous and differentiable, and only consists of sines and cosines.

2. In the above, you claim that g(a) = f(a) and g(a+c) = f(a+c) (c ≠ 0) implies that there must be infinitely many solutions. I think you’re assuming that c must be related somehow to the periods of f and g, which is not the case.

In line with some ideas floating around (I discussed them last night with Christopher @Trianglemancsd and Paul @lostinrecursion), you can do the following: pick a positive integer n, and let one function be f(x) = 1-cos(n*2*pi*x). This equals zero at 0, 1/n, 2/n, 3/n, etc. Now make a second function g(x) which is nonpositive, which equals zero at 0, 1/n, 2/n, 3/n, …, (n-1)/n, but has its next zero (I’m thinking of it as a “crest”) some irrational amount k past 1, with 1+k as its period. Then the graphs of f and g intersect n times between 0 and 1, but never thereafter. I don’t have a formula for g, but as my advisor once said, if you can draw a curve, then there’s an infinitely differentiable function that approximates it. You could probably even make g analytic, but I’m not ready to make that argument.

3. David Radcliffe gave an example of two periodic functions with three intersections: https://www.desmos.com/calculator/znrfbptbe8

This can be modified by replacing x with, say, x(x-1)(x-2)+1

There is a chance that the number of intersections will be more than expected (and this indeed happens). This can be avoided by replacing x(x-1)(x-2)+1, or the like, with piecewise defined functions.

It’s a very nice problem. I can say that to me the result was rather counterintuitive.

4. jessemckeown says:

All the examples given seem to be essentially of a positive periodic function and a negative periodic function with incomensurable periods; so, let \$f\$ and \$g\$ be two positive periodic functions with incomensurable periods 1 and x0, having a single common zero (at zero). Let x1,x2,x3,… xn be such that (x0,x1,x2,…,xn) is an independent subset of R over Q (this is surely more stringent than necessary); then Claim: -f(x-x1)f(x-x2)…f(x-xn) and g(x-x1)g(x-x2)…g(x-xn) have zeros x1,x2,…,xn in common and no others.