Let
f(x) = k(x) if x >= 1
f(x) = 2- x if x < 1
Find the function k(x) such that f(x) is its own inverse function.
For x<1, we have that f(x) = 2 - x.
We calculate the inverse by first setting f(x) = y, then solve for x
y = 2 - x, -x = y-2, x = 2 - y
so k(x) = 2 - x, and f(x) = 2 -x in the whole of R
The drawing from GeoGebra online shows that the mirror image og f(x) axross the line y = x is it's inverse function, k(x), which in this case has the same definition as f.