Practice Problems on Function Inversion
For each of these functions f, find a candidate inverse function g (if possible!) and prove that the g=f^{-1}.
f:\mathbb N\to \mathbb N. f(x)=2x+1
f:\mathbb R\to \mathbb R. f(x)=x^2
f:\mathbb N\to \mathbb N. f(x)=x^2
f:\mathbb R\to \mathbb R. f(x)=x^3+x
f:\mathbb R\to \mathbb R. f(x)=x^3-x
f:\mathbb Z\to N,
f(x)=\begin{cases} -2z & z\le 0\\ 2z-1 & z > 0 \end{cases}Find an example of a function function that is self-inverse (i.e. f=f^{-1}).
Worked sample problem:
f:\mathbb Z\to N,
As discussed in class, this function maps the negative numbers to the even numbers and the positive numbers to the odd numbers. Here's a candidate inverse:
g:\mathbb Z\to N,
To show that g=f^{-1}, let z\in \mathbb Z and n\in \mathbb N. We'll then show f(z)=n\equiv z=g(n).
"\rightarrow" Let f(z)=n.
Case I: z\le 0. Then n=-2z, so n is even, thus g(n)=-(-2z)/2=z.
Case II: z> 0. Then n=2z-1, so n is odd, thus g(n)=(2z-1 + 1)/2=z.
Thus g(n)=z in both cases.
"\leftarrow" Let z=g(n).
Case I: n odd. Then z=(n+1)/2, so z>0, thus f(z)=2((n+1)/2)-1=n.
Case I: n even. Then z=-n/2, so z\le 0, thus f(z)=-2(-n/2)=n.
Thus f(z)=n in both cases.
This concludes the proof of everything required by the characterization of the inverse function.
