\(\frac{x+1}{x-1}-\frac{x-1}{x+1}+\frac{4}{x^2-1}=\frac{x^2+2x+1-x^2+2x-1}{\left(x-1\right)\left(x+1\right)}+\frac{4}{\left(x-1\right)\left(x+1\right)}\)
=\(\frac{4x+4}{\left(x-1\right)\left(x+1\right)}=\frac{4\left(x+1\right)}{\left(x-1\right)\left(x+1\right)}=\frac{4}{\left(x-1\right)}\)