All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Just Math
A quick inverse (Posted on 2024-04-19) Difficulty: 2 of 5
Find the inverse function f(x)=x+[x].

No Solution Yet Submitted by Danish Ahmed Khan    
No Rating

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution solution Comment 1 of 1
The inverse function is not defined for x=2k-1 to 2k for integer k.

For x = 2k to 2k+1, y = x - floor(x/2)

test:

clearvars
for x1=-3:.1:3
  y=x1+floor(x1);
  x2=y;
  if mod(floor(x2),2)==0
    y=x2-floor(x2/2);
  else
    y=NaN;
  end
  fprintf('%7.4f %7.4f %7.4f\n',x1,x2,y)
end

Test:

    x      y       new
         (new x)    y   
-3.0000 -6.0000 -3.0000
-2.9000 -5.9000 -2.9000
-2.8000 -5.8000 -2.8000
-2.7000 -5.7000 -2.7000
-2.6000 -5.6000 -2.6000
-2.5000 -5.5000 -2.5000
-2.4000 -5.4000 -2.4000
-2.3000 -5.3000 -2.3000
-2.2000 -5.2000 -2.2000
-2.1000 -5.1000 -2.1000
-2.0000 -4.0000 -2.0000
-1.9000 -3.9000 -1.9000
-1.8000 -3.8000 -1.8000
-1.7000 -3.7000 -1.7000
-1.6000 -3.6000 -1.6000
-1.5000 -3.5000 -1.5000
-1.4000 -3.4000 -1.4000
-1.3000 -3.3000 -1.3000
-1.2000 -3.2000 -1.2000
-1.1000 -3.1000 -1.1000
-1.0000 -2.0000 -1.0000
-0.9000 -1.9000 -0.9000
-0.8000 -1.8000 -0.8000
-0.7000 -1.7000 -0.7000
-0.6000 -1.6000 -0.6000
-0.5000 -1.5000 -0.5000
-0.4000 -1.4000 -0.4000
-0.3000 -1.3000 -0.3000
-0.2000 -1.2000 -0.2000
-0.1000 -1.1000 -0.1000
 0.0000  0.0000  0.0000
 0.1000  0.1000  0.1000
 0.2000  0.2000  0.2000
 0.3000  0.3000  0.3000
 0.4000  0.4000  0.4000
 0.5000  0.5000  0.5000
 0.6000  0.6000  0.6000
 0.7000  0.7000  0.7000
 0.8000  0.8000  0.8000
 0.9000  0.9000  0.9000
 1.0000  2.0000  1.0000
 1.1000  2.1000  1.1000
 1.2000  2.2000  1.2000
 1.3000  2.3000  1.3000
 1.4000  2.4000  1.4000
 1.5000  2.5000  1.5000
 1.6000  2.6000  1.6000
 1.7000  2.7000  1.7000
 1.8000  2.8000  1.8000
 1.9000  2.9000  1.9000
 2.0000  4.0000  2.0000
 2.1000  4.1000  2.1000
 2.2000  4.2000  2.2000
 2.3000  4.3000  2.3000
 2.4000  4.4000  2.4000
 2.5000  4.5000  2.5000
 2.6000  4.6000  2.6000
 2.7000  4.7000  2.7000
 2.8000  4.8000  2.8000
 2.9000  4.9000  2.9000
 3.0000  6.0000  3.0000

  Posted by Charlie on 2024-04-19 09:58:55
Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (12)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information