Prove that $f(x)=\ln\left(\frac{x+1}{x-1}\right)$ is surjective 
Prove that $f(x)=\ln\left(\dfrac{x+1}{x-1}\right)$ is surjective.

I found easily that this function is injective, but I need to prove that it's surjective too. The final goal is to prove that this function is bijective, but I don't know how.
I found that the domain is $x<-1$ and $x>1$, and the range is $y\ne0$.
I can't see how to apply the definition of surjection here. Any hints?
 A: A function $f:X\to Y$ is surjective if for all $y\in Y$ there exists at least one element $x\in X$ such that $f(x)=y$.
For $f(x)=\ln\left(\frac{x+1}{x-1}\right)$, the domain is $X=\{x\in\mathbb R:x<-1 ~\text{o}r~ x>1\}$ and the range is $Y=\mathbb R\setminus \{0\}$.
Sketch of proof: 
Let $y\in\mathbb R\setminus \{0\}$ be arbitrary. Then, we can write $x=\frac{e^{y}+1}{e^{y}-1}$ since $y \neq 0$ (you should do the scratch work to verify this). Note that $x<-1$ or $x>1$ because if this wasn't the case then a contradiction would occur (to be proved by you). Hence, $x\in X$. Then, 
$$f(x)=f\bigg(\frac{e^{y}+1}{e^{y}-1}\bigg)=\ln\bigg(\frac{\frac{e^{y}+1}{e^{y}-1}+1}{\frac{e^{y}+1}{e^{y}-1}-1}\bigg)=\ln\bigg(\frac{e^{y}+1+e^y -1}{e^{y}+1-e^y +1}\bigg)=\ln\bigg(\frac{2e^y}{2}\bigg)=y$$
Since $y\in\mathbb R\setminus \{0\}$ was arbitrary, this holds for all $y\in\mathbb R\setminus \{0\}$. Hence, $f$ is surjective.
A: There’s a problem with definitions here. To identify whether a function $f:X\to Y$ is surjective, you must specify the codomain $Y$. Ordinarily, when an expression is given without mentioning the codomain, one assumes that the codomain of the associated function is all of $\Bbb R$.
Under this assumption, your function is not surjective, as you yourself said.
However, you may always, if you wish, restrict the codomain to the set of image points, sometimes called the range of the function, sometimes the image. Once you do that, that function becomes surjective.
In this sense only, every function is surjective. This is what @Axion004 did in their answer: the function is onto $\{y\in\Bbb R:\>y\ne0\}$.
A: For any $y \neq 0$ 
$x = \frac{e^y+1}{e^y-1}$
