# calculating an inverse of a split function

I am having difficulty taking the inverse of the following function:

$$f(x)=\begin{cases} \frac{1}{4 \sqrt{ |1-x|}} & \text{if} \ x\in [0,2] \\ 0 & \text{otherwise}\end{cases}$$

Could someone kindly explain to me how to handle the if/else portion when calculating an inverse?

I have managed to compute that if $y = f(x)$ then
$$x = 1 - \frac{1}{16y^2}$$ or
$$x = 1 + \frac{1}{16y^2}$$

However, I believe it's the last step of putting it altogether that I can't pull off.

-
Could you kindly follow site rules and tell us what you have tried? –  Fly by Night Feb 17 '13 at 2:55
@FlybyNight I was editing my question as you were posting your comment –  user20721 Feb 17 '13 at 2:56
@user20721 there's something going on with your formatting. Thanks for your edit though. –  Rustyn Feb 17 '13 at 2:58
f(x) = \frac{1}{4 \sqrt {\abs{1-x}}} if x \in [0, 2] –  Salech Alhasov Feb 17 '13 at 2:58
@RustynYazdanpour: I didn't. –  Salech Alhasov Feb 17 '13 at 2:59

The function is not $1 \text{ to } 1$; its inverse as a function does not exist. We would call it a relation instead.

# Note

In the way that you have $f(x)$ defined, you need to specify $x\ne 1$. Also that function if then defined in that way on $[0,2]$ with $x\ne1$, doesn't have an inverse function . Since it's not $1 \text{ to } 1$. (Flunks the horizontal line test). The $0$ piece is trivially not $1$ to $1$ either.

# Second Note

The formula you give for $x$ are correct. If you had the same function, $f(x)$, and you created two different functions,

$$g(x) = f(x)$$ with domain $x\in[0,1)$
and $$h(x) = f(x)$$ with domain $x\in(1,2]$

Then your formula would precisely be respective inverse functions for $g(x)$, and $h(x)$.

-
I see that I can split x on [0, 1] and from [1, 2] but I am not quite sure how to translate that to y? –  user20721 Feb 17 '13 at 3:08
@user20721 ok i will add more to my answer –  Rustyn Feb 17 '13 at 3:09
@user20721 Ok I have included a comprehensive answer. Thanks for participating on mathstack. Nice question . –  Rustyn Feb 17 '13 at 3:43
great, thank you for taking the time to clarify things –  user20721 Feb 17 '13 at 4:03
@user20721 no problem. –  Rustyn Feb 17 '13 at 4:11

Function you provided us is not invertible, since one value of $y$ can be obtained by different values of $x$. But you can split your function into several so each part is invertible. Sometimes it's much more convenient to represent inversion graphically, since all you have to do is reflect your plot about $y = x$ line. Anyway, whatever you get is not a function, or at least classic function. It's formally called multi-valued function, but actually it's a relation.

-