How to find the inverse of $f(x)=x+(-1)^{x-1}$

817 Views Asked by At

Question:

Find the inverse of $f(x)=x+(-1)^{x-1}$ where $f:N\to N$ ($N$ denotes set of natural numbers)

Usually, when I am asked to find inverse of a given function, I use to express the dependant variable $x$ in terms of the independent variable $y$ as $x=g(y)$ where $g$ is a function, from the equation $y=f(x)$ where f is a function. Then I will replace $y$ by $x$ and $x$ by $f^{-1}(x)$, to get $f^{-1}x=g(x)$.

But in this problem, I am unable to do so. Is there any other method to find the inverse of such complex functions? How to find the inverse of the given function?

3

There are 3 best solutions below

0
On BEST ANSWER

Let $f:\mathbb{N}\to\mathbb{N}$ be defined by $f(x)=x+(-1)^{x-1}$

If $x$ is odd, then $f(x)=x+1$, and if $x$ is even, then $f(x)=x-1$.

To invert $f$, just reverse the process . . .

If $x$ is even, then $f^{-1}(x)=x-1$, and if $x$ is odd, then $f^{-1}(x)=x+1$.

Thus, $f^{-1}(x)=f(x)$.

The basic idea when inverting a piecewise function is to invert each of the pieces.

Since $f$ maps the set of odd positive integers to the set of even positive integers by adding one, $f^{-1}$ maps the set of even positive integers to the set of odd positive integers by subtracting one.

Similarly, since $f$ maps the set of even positive integers to the set of odd positive integers by subtracting one, $f^{-1}$ maps the set of odd positive integers to the set of even positive integers by adding one.

Thus, $f^{-1}$ is also a piecewise function, and in this particular case, it turns out that $f^{-1}$ is the same as $f$.

4
On

Try making a table and looking for a pattern.

$$\begin{array}{cc} x&y\\ \hline 1&2\\ 2&1\\ 3&4\\ 4&3\\ \vdots&\vdots \end{array}$$

Do you see the pattern? Or maybe even, do you see what the inverse of $f$ is?

0
On

Show that $f(f(n))=n$ for all $ n \in \mathbb N.$ This gives: $f^{-1}=f.$