Integration of Modular Arithmetic Functions

Click For Summary
Integrating modular arithmetic functions poses challenges due to the nature of the modulo operation, which is typically defined for integers. The discussion highlights that while a function like f(x) = mod(x, a) can be integrated, extending this to mod(a, x) is less straightforward. It is noted that modular arithmetic is not a binary operation but rather an equivalence relation, complicating its integration in traditional calculus. The conversation also touches on the potential for using the floor function to extend mod to real numbers, although this approach may not yield useful results in integration. Overall, integrating modular functions remains a complex topic with limited existing literature.
Igora
Messages
1
Reaction score
0
Hello, I have been searching and can't seem to find anything on the topic of integrating modular arithmetic functions. So far I have created an equation for a function in the form of f(x)=mod(x,a):
\int mod (x,a) dx=\frac{a(x-mod (x,a))+mod (x,a)^2}{2}+c
But, now I am investigating how to integrate a modular arithmetic function of the reverse: mod(a,x). Does anybody have any ideas or information on the topic?
 
Physics news on Phys.org
Igora said:
Hello, I have been searching and can't seem to find anything on the topic of integrating modular arithmetic functions. So far I have created an equation for a function in the form of f(x)=mod(x,a):
\int mod (x,a) dx=\frac{a(x-mod (x,a))+mod (x,a)^2}{2}+c
But, now I am investigating how to integrate a modular arithmetic function of the reverse: mod(a,x). Does anybody have any ideas or information on the topic?

How do you define mod for non-integer x?

One reason there's not much literature on this (besides mod only being defined for integers) is that mod is not a binary operation in math, it's an equivalence relation. It's only in programming languages that we see 5 mod 3 = 2.

In math we would say that 5 = 2 (mod 3), but we would also say that 5 = -4 (mod 3). So you can only make mod into a function if you say that n mod a is the least positive member of the set of integers congruent to n mod a. In math it's rare to use that formulation.
 
Also, integrals only operate on continuous functions.

mod usually operates on integers or natural numbers. f(n):natural numbers-> real numbers is by definition not a continuous function.

There are a few ways to extend the modulo operation to the real numbers. The greatest integer function or floor function is one natural way.

a newMod b =floor(a) ( mod floor(b) )
But as the floor function is very much like a staircase, it's not particularly useful in this context.
 
If you ignore negative a's and x's, then f(x) = \{^{a-x \; \mbox{if} \; x \le a}_{a \; \mbox{if} \; x > a}. The easy way to integrate that, is to just integrate each piece of the piecewise.
 
but modular arithmetic can be pseudo continuous if the mod is prime, because every unit has an inverse.
 

Similar threads

  • · Replies 31 ·
2
Replies
31
Views
4K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K