MHB Interpolating Points with Continuous Modular Functions?

SatyaDas
Messages
22
Reaction score
0
Define a continuous function $$F(x;n)$$ that interpolates points (x, x mod n) for a given integer n and all integer x. For example $$F(x;2)=\frac{1}{2}-\frac{1}{2}\cos\left(\pi x\right)$$ interpolates all points (x, x mod 2) when x is an integer. Similarly $$F(x;3)$$ should interpolate points (0,0), (1,1), (2,2), (3,0), (4,1), and so on and so forth.

[DESMOS]{"version":7,"graph":{"viewport":{"xmin":-0.307498196717283,"ymin":-1.0867151664943222,"xmax":8.25153781299237,"ymax":3.6140340364698735},"xAxisMinorSubdivisions":1,"yAxisMinorSubdivisions":1},"randomSeed":"e7520ae08f59a65224c632735e784ac7","expressions":{"list":[{"type":"expression","id":"1","color":"#c74440","latex":"\\frac{1}{2}-\\frac{1}{2}\\cos\\left(\\pi x\\right)"},{"id":"6","type":"table","columns":[{"values":["0","1","2","3","4","5","6","7","8","9","10"],"hidden":true,"id":"4","color":"#6042a6","latex":"x"},{"values":["0","1","0","1","0","1","0","1","0","1","0"],"id":"5","color":"#000000","latex":"y"}]}]}}[/DESMOS]
 
Mathematics news on Phys.org
As a first shot, here's $F(x;3) = 1 - \cos\left(\frac{2\pi x}3\right) - \frac1{\sqrt3}\sin\left(\frac{2\pi x}3\right)$:

[DESMOS]{"version":7,"graph":{"viewport":{"xmin":-2.8493548505939787,"ymin":-4.648035822948437,"xmax":12.843943840753106,"ymax":8.544113758660483}},"randomSeed":"fa42535881c2cad8cca69bf627c0af41","expressions":{"list":[{"id":"6","type":"table","columns":[{"values":["0","1","2","3","4","5","6","7","8","9","10","11"],"hidden":true,"id":"4","color":"#6042a6","latex":"x_1"},{"values":["0","1","2","0","1","2","0","1","2","0","1","2"],"id":"5","color":"#000000","latex":"y_1"}]},{"type":"expression","id":"1","color":"#c74440","latex":"1\\ -\\ \\cos\\left(\\frac{2\\pi x}{3}\\right)\\ -\\ \\frac{1}{\\sqrt{3}}\\sin\\left(\\frac{2\\pi x}{3}\\right)"}]}}[/DESMOS]
 
Opalg said:
As a first shot, here's $F(x;3) = 1 - \cos\left(\frac{2\pi x}3\right) - \frac1{\sqrt3}\sin\left(\frac{2\pi x}3\right)$:
Nice attempt. Below is my output for F(x;3).
m-3.png
 
Of course, if you only require $F(x;n)$ to be continuous then you can use a sawtooth function consisting of straight line segments from $(kn,0)$ to $(kn+n-1,n-1)$ and from $(kn+n-1,n-1)$ to $((k+1)n,0)$ (for all $k\in\Bbb{Z}$). But I am assuming that you want $F(x;n)$ to be a smooth function. So it presumably needs to be a trigonometric function.

For $n=4$ I'm getting $F(x;4) = \frac32 - \cos\bigl(\frac{\pi x}2\bigr) - \sin\bigl(\frac{\pi x}2\bigr) - \frac12\cos(\pi x)$. I don't yet see what the general formula should be, but it seems that the constant term in $F(x;n)$ must be $\frac{n-1}2$.

[DESMOS]{"version":7,"graph":{"viewport":{"xmin":-2.8126723934116136,"ymin":-7.943888407281889,"xmax":17.187327606588386,"ymax":8.868573830351757}},"randomSeed":"20aff6dd18a698f6934d1e00080549f9","expressions":{"list":[{"type":"expression","id":"1","color":"#c74440","latex":"\\frac{3}{2\\ }\\ -\\ \\cos\\left(\\frac{\\pi x}{2}\\right)\\ -\\ \\sin\\left(\\frac{\\pi x}{2}\\right)\\ -\\ \\frac{1}{2}\\cos\\left(\\pi x\\right)"}]}}[/DESMOS]
 
Opalg said:
Of course, if you only require $F(x;n)$ to be continuous then you can use a sawtooth function consisting of straight line segments from $(kn,0)$ to $(kn+n-1,n-1)$ and from $(kn+n-1,n-1)$ to $((k+1)n,0)$ (for all $k\in\Bbb{Z}$). But I am assuming that you want $F(x;n)$ to be a smooth function. So it presumably needs to be a trigonometric function.

For $n=4$ I'm getting $F(x;4) = \frac32 - \cos\bigl(\frac{\pi x}2\bigr) - \sin\bigl(\frac{\pi x}2\bigr) - \frac12\cos(\pi x)$. I don't yet see what the general formula should be, but it seems that the constant term in $F(x;n)$ must be $\frac{n-1}2$.

Indeed, I meant smooth function and your finding of constant term matches with mine. So, high five. Below is my output for F(x;4). I guess it will help to get the idea that there is a pattern.
m-4.png
 
Here is my solution.
Since $F(x;n)$ is periodic with period $n$, we can assume that the function can be expressed as
$$
F(x;n)=\sum_{i=0}^{n-1}\left(a_i\cos\left(\frac{2\pi i x}{n}\right)+b_i\sin\left(\frac{2\pi i x}{n}\right)\right).
$$
There are total of $2n$ unknowns.
We get $n$ equations by using the fact
$$
F(j;n)=j\text{ for all }j\in Z\text{ and }0\le j\le n-1.
$$
We need $n$ more equations so that we can find all the unknowns. For that purpose we can impose more restrictions on the properties of the function $F(x;n)$. If we assume $F'(x;n)=0$ for all $x\in Z$ then we get $n$ more equations. So, now we have a system of $2n$ equations with $2n$ unknowns. If we solve them we get:
$$
a_0=\frac{n-1}{2},\\
a_i=-\frac{n-i}{n} \text{ for all } 0<i<n,\\
b_0=0,\text{ and}\\
b_i=-\frac{n-i}{n}\cot\left(\frac{i\pi}{n}\right)\text{ for all } 0<i<n.
$$
If we simplify things we get
$$
F\left(x;n\right)=\frac{n-1}{2}-\sum_{i=1}^{n-1}\left(1-\frac{i}{n}\right)\csc\left(\pi\frac{i}{n}\right)\sin\left(\pi\frac{i}{n}\left(2x+1\right)\right).
$$
This graph can be visualized interactively at desmos:
[DESMOS]{"version":7,"graph":{"viewport":{"xmin":-9.482047024807466,"ymin":-2.5350658426248973,"xmax":21.090566527405265,"ymax":14.255865825972153}},"randomSeed":"612b9f843d4d8a7b35fc02d3415719d3","expressions":{"list":[{"type":"expression","id":"1","color":"#c74440","latex":"F\\left(x,n\\right)=\\frac{n-1}{2}-\\sum_{i=1}^{n-1}\\left(1-\\frac{i}{n}\\right)\\csc\\left(\\pi\\frac{i}{n}\\right)\\sin\\left(\\pi\\frac{i}{n}\\left(2x+1\\right)\\right)"},{"type":"expression","id":"2","color":"#2d70b3","latex":"F\\left(x,N\\right)"},{"type":"expression","id":"3","color":"#388c46","latex":"N=5","hidden":true,"slider":{"hardMin":true,"hardMax":true,"min":"0","max":"100","step":"1"}}]}}[/DESMOS]
 
Last edited:
Insights auto threads is broken atm, so I'm manually creating these for new Insight articles. In Dirac’s Principles of Quantum Mechanics published in 1930 he introduced a “convenient notation” he referred to as a “delta function” which he treated as a continuum analog to the discrete Kronecker delta. The Kronecker delta is simply the indexed components of the identity operator in matrix algebra Source: https://www.physicsforums.com/insights/what-exactly-is-diracs-delta-function/ by...
Fermat's Last Theorem has long been one of the most famous mathematical problems, and is now one of the most famous theorems. It simply states that the equation $$ a^n+b^n=c^n $$ has no solutions with positive integers if ##n>2.## It was named after Pierre de Fermat (1607-1665). The problem itself stems from the book Arithmetica by Diophantus of Alexandria. It gained popularity because Fermat noted in his copy "Cubum autem in duos cubos, aut quadratoquadratum in duos quadratoquadratos, et...
Thread 'Imaginary Pythagorus'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...
Back
Top