Find Inverse of Function w/ Floor: Tips & Tricks

  • Thread starter Thread starter lewis198
  • Start date Start date
AI Thread Summary
Finding the inverse of a function that includes a floor function is complex due to the non-one-to-one nature of the floor function. Functions that contain the floor function may not have a global inverse, but can be invertible over specific intervals. For example, a function like f(x) = A[(x/T + rho) - floor(x/T + rho)] can be simplified to g(x) = u - floor(u), which is periodic and thus lacks a global inverse. However, one can define multiple solutions by introducing an integer constant, allowing for the expression x = T(y/A - rho + C). Ultimately, while true inverses may not exist, useful approximations and definitions can be established.
lewis198
Messages
95
Reaction score
0
I was wondering how you would find the inverse of a function if it contained a floor function.
Since I can't expand it, I can't set y as a function of x, so to speak. Should I use a series approximation?
 
Mathematics news on Phys.org
* x as a function of y
 
You keep talking about "containing" the floor function without explaining what you mean by that. In general a function has an inverse if and only if it is "one-to-one" and "onto". Since the floor function is not one-to-one- its value at any number between 0 and 1 is 1- 1 the floor function itself does not have an inverse. I cannot answer your question about functions "containing the floor function" because I do not know exactly what you man by one function "containing" another. Does f(x)= [1- floor(x)]+ floor(x) "contain the floor function? Is so then that is an example that does have an inverse: it is simply f(x)= x.
 
This is what the equation looks like:

f(x)=A.[(x/T+rho)-floor(x/T+rho)]

I need to make x the subject of the equation, A,T and rho are constants.
 
lewis198 said:
This is what the equation looks like:

f(x)=A.[(x/T+rho)-floor(x/T+rho)]

I need to make x the subject of the equation, A,T and rho are constants.
Simplify it as g(x) = u - floor(u). This function is then periodic with period 1, which makes your function periodic with period T, and thus it has no global inverse. rho just moves the function around horizontally and A scales it vertically. So your function is invertible on any interval of length T, and you can add z*T to the inverse to get another solution, where z is some integer. A simple inverse for g is g-1(v) = v, where the interval is [0, 1). For your function, you would choose an interval like [0, T) and the inverse on this interval would just be the inverse of f(x) = A(x/T + rho) which is f-1(y) = T(y/A - rho).
 
Last edited:
So it is
f(x) = A . frac(x/T + rho)​
with 'frac' representing the fractional part after disregarding the integer part.

As Halls points out, frac(1.87) = frac(2.87) = frac(3.87) ... = 0.87, so it is really not possible to get the original number back, starting from 0.87. Technically, the 'inverse' does not qualify as a function.

You could, however, define x = T . (y/A - rho + C), where C is any integer, and say that you have multiple solutions for the equation y = f(x), if this is useful.
 
How did you guys see that so quickly? Amazing. God given gifts. Thanks for the help.
 
They learned the definitions!
 
Back
Top