PJParent001
29th November 2007 - 10:20 PM
QUOTE (mr_homm+Nov 29 2007, 08:01 AM)
This follows on from what PJParent001 said in the previous post:
For the positive integers only, there's a nice inverse:
It is clear from the list I gave in an earlier post that if y = f(x), then for EVEN y, x =2y, and for odd y, x=2|y|+1. You can put these together into a single formula: x = 1/2 + 2|y - 1/4|. This gives the positive integer x corresponding to any y. There is also a negative integer which is 1-x.
Therefore the two solutions are 1/2 + 2|y - 1/4| and 1 - (1/2 + 2|y - 1/4|) = 1/2 - 2|y - 1/4|. Putting these together gives
x = 1/2
+ 2|y-1/4|
which works for all integer values of y and gives both the positive and negative x values.
Wow thanks, I''ll take a closer look at that.
PJParent001
2nd December 2007 - 08:22 AM
Hello mr homm,
I found your approaches to solving the 'very weird function' presented by IntoTheVoid, quite interesting since I always try to avoid using complex numbers simply because I hate them very much. I took another look at my own approach of reversing the function which did lead to a surprising conclusion which I will now post.
PJ Parent
PJParent001
2nd December 2007 - 08:41 AM
QUOTE (IntoTheVoid+Nov 28 2007, 02:30 PM)
Does anyone know how to find the inverse of f(x) = (1+((-1)^x)(2x-1))/4?
Thanks
f(x) = (1+((-1)^x)(2x-1))/4
y = f(x)
given y, there are two solutions for x
solution 1:
z = (abs(4y - 1) + 1) / 2
solution 2:
w = f(-z+1)
Which surprisingly works.
PJ Parent
PhysOrg scientific forums are totally dedicated to science, physics, and technology. Besides topical forums such as nanotechnology, quantum physics, silicon and III-V technology, applied physics, materials, space and others, you can also join our news and publications discussions. We also provide an off-topic forum category. If you need specific help on a scientific problem or have a question related to physics or technology, visit the PhysOrg Forums. Here you’ll find experts from various fields online every day.
To quit out of "lo-fi" mode and return to the regular forums, please click
here.