Find missing entires $f \circ g(x)$ calculus composite functions I have the calculus complete course book, edition 8 by Adams something. In chapter P5 exercise 15 I get a table with functions then I am supposed to find a missing one.
Question: If $f(x)=\frac{x+1}{x}$ and $f\circ g(x)=x$, then find $g(x)$.
I am supposed to find $g(x)$ but I do not know how. According to the solutions manual $g(x)=\frac{1}{x−1}$ but I do not know how to get that number.
Thank you for your help :)
 A: Hint: $$x=(f\circ g)(x)=f(g(x))=\frac{g(x)+1}{g(x)}\tag1$$
On base of $(1)$ find an expression of $g(x)$ in $x$.
A: Let $$f : x \mapsto \frac{x+1}{x} = 1+\frac{1}{x}$$
Then, for a given $x \in \mathbb{R}$,
$$ f(g(x))=x \Rightarrow 1+\frac{1}{g(x)}=x \text{ and } g(x)\ne0$$
$$\Rightarrow \frac{1}{g(x)}=x-1 \text{ and } g(x)\ne0$$
$$\Rightarrow g(x)=\frac{1}{x-1} \text{ and } g(x)\ne0 \text{ and } x\ne 1$$
Now, you must verify that $ \forall x \ne 1, (f\circ g)(x)=x$ and $g(x)\ne0$.
A: $f(g(x))=x$ 
$\dfrac{g(x)+1}{g(x)}=x$
$xg(x)=g(x)+1$
$xg(x)-g(x)=1$
$g(x).(x-1)=1$
$g(x)=\dfrac{1}{x-1}$
Done!
A: Note that $f(x)=\dfrac{x+1}{x}$ is invertible and its inverse is found solving the equation wrt $x$ so that
$x f(x)=x+1\to x f(x)-x=1\to x(f(x)-1)=1\to x=\dfrac{1}{f(x)-1}$
thus $f^{-1}(x)=\dfrac{1}{x-1}$
Now back to the problem $(f\circ g)(x)=x$ apply $f^{-1}$ to both sides
$f^{-1}\circ (f\circ g)(x)=f^{-1}(x)$ associativity of function composition
$(f^{-1}\circ f)\circ g(x)=\dfrac{1}{x-1};\;(f^{-1}\circ f)=I$ identity
$g(x)=\dfrac{1}{x-1}$
