Interpolating Points with Continuous Modular Functions?

In summary, we can define a continuous function F(x;n) that interpolates points (x, x mod n) for a given integer n and all integer x by using the formula F(x;n) = (n-1)/2 - sum from i=1 to n-1 of (1-i/n)csc(iπ/n)sin(iπ/n(2x+1)). This function satisfies the given conditions and is periodic with period n. By imposing additional restrictions, we can find a unique solution for F(x;n).
  • #1
SatyaDas
22
0
Define a continuous function \(\displaystyle F(x;n)\) that interpolates points (x, x mod n) for a given integer n and all integer x. For example \(\displaystyle 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 \(\displaystyle 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
  • #2
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]
 
  • #3
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
 
  • #4
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]
 
  • #5
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
 
  • #6
Here is my solution.
Since $F(x;n)$ is periodic with period $n$, we can assume that the function can be expressed as
\(\displaystyle
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
\(\displaystyle
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:
\(\displaystyle
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
\(\displaystyle
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:

FAQ: Interpolating Points with Continuous Modular Functions?

1. What is a continuous modular function?

A continuous modular function is a mathematical function that maps a real or complex number to another number in a modular arithmetic system. It is continuous in the sense that small changes in the input result in small changes in the output.

2. How is a continuous modular function different from a regular function?

Unlike regular functions, which map real numbers to real numbers, continuous modular functions map numbers to numbers in a modular arithmetic system, such as the integers modulo n. This means that the output of a continuous modular function is always within a specified range and can "wrap around" if it exceeds that range.

3. What are some common applications of continuous modular functions?

Continuous modular functions are commonly used in cryptography, coding theory, and signal processing. They are also used in various mathematical proofs and constructions, such as the construction of finite fields.

4. How are continuous modular functions evaluated?

Continuous modular functions can be evaluated using the same methods as regular functions, such as substitution and algebraic manipulation. However, special care must be taken to account for the modular nature of the output, such as reducing the output to the specified range.

5. Are there any limitations to using continuous modular functions?

One limitation of continuous modular functions is that they can only be used in systems with a finite number of elements, such as the integers modulo n. They also require a good understanding of modular arithmetic and may not be as intuitive as regular functions for some individuals.

Similar threads

Replies
8
Views
1K
Replies
5
Views
1K
Replies
10
Views
1K
Replies
3
Views
1K
Replies
3
Views
1K
Replies
7
Views
2K
Back
Top