3
$\begingroup$

Show that $f:I=(-1,1) \rightarrow \mathbb{R},$ it follows that $$ f(x)=\begin{cases} \quad1-x & \text{ as } -1<x\leq 0, \\ \frac{{x}^{-1}+ \lfloor {x}^{-1}\rfloor}{1+{x}^{-1}+\lfloor {x}^{-1}\rfloor}& \text{ as } \quad0<x<1 , \end{cases}$$ and $\lfloor x\rfloor=$max{$n\in\mathbb{Z}$|$n\leq x$}.

We can proof the mapping $f:(-1,1) \rightarrow f(I)$is bijective,so let $f^{-1}$ is the inverse function of $f$ .

I want use $Mathematica$ to get $f^{-1}$,who can give me some details ? Any help from you will be greatly appreciated!

My effort:enter image description here

$\endgroup$
  • $\begingroup$ Welcome to Mathematica.SE! I suggest that: 1) You take the introductory Tour now! 2) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! 3) As you receive help, try to give it too, by answering questions in your area of expertise. $\endgroup$ – bbgodfrey Dec 30 '14 at 2:33
  • $\begingroup$ @bbgodfrey:I will give my effort soon! $\endgroup$ – kiyosi Dec 30 '14 at 2:44
  • $\begingroup$ ParametricPlot[{f[x], x}, {x, -1, 1 - 10^-9}, PlotRange -> {{.6, 2.05}, Automatic}, PlotPoints -> 200] $\endgroup$ – Bob Hanlon Dec 30 '14 at 2:54
  • $\begingroup$ @Bob Hanlon:I need to get the graph of inverse function $f^{-1}(y)$,not the graph of $f(x).$ $\endgroup$ – kiyosi Dec 30 '14 at 3:08
  • $\begingroup$ The plot of f[x] is the set of points {x, f[x]} over he domain; the inverse function is the set of points {f[x], x}. $\endgroup$ – Bob Hanlon Dec 30 '14 at 3:38
10
$\begingroup$
f[x_] = Piecewise[{
    {1 - x, -1 < x <= 0},
    {(1/x + Floor[1/x])/(1 + 1/x + Floor[1/x]),
     0 < x < 1}}];

Plot[InverseFunction[f][y], {y, f[1. - 10^-9], f[-1. + 10^-9]},
 PlotPoints -> 101,
 AxesOrigin -> {.6, 0}]

enter image description here

ParametricPlot[{f[x], x},
 {x, -1, 1 - 10^-9},
 PlotRange -> {{.6, 2.05}, Automatic},
 PlotPoints -> 200,
 AspectRatio -> 1/GoldenRatio,
 AxesOrigin -> {.6, 0}]

enter image description here

Note that the ParametricPlot is much faster.

$\endgroup$
3
$\begingroup$

There are a variety of ways to obtain an inverse. Here is a common one.

Your Function

f[x_] := Piecewise[{{1 - x, -1 < x <= 
     0}, {(x^-1 + Abs[x^-1])/(1 + x^-1 + Abs[x^-1]), 0 < x <= 1}}];
Plot[f[x], {x, -1, 1}]

f[x]

Its inverse, determine as described in the documentation to FindRoot

g[y_] := x /. FindRoot[f[x] - y, {x, 0}];
Plot[g[y], {y, 2/3, 2}]

g[y]

$\endgroup$
  • $\begingroup$ I want use InverseFunction[f] ,but I get mistake! thanks a lot! $\endgroup$ – kiyosi Dec 30 '14 at 3:16
  • $\begingroup$ I misread your special symbol as Abs, not Floor. I shall have a corrected answer for you in a few minutes. $\endgroup$ – bbgodfrey Dec 30 '14 at 3:26
  • $\begingroup$ :Many thanks! :) $\endgroup$ – kiyosi Dec 30 '14 at 3:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.