How can I put 0 at origin?
\documentclass[tikz,border=5pt]{standalone}
\usepackage{amsmath}
\usepackage{pgfplots}
\usetikzlibrary{datavisualization}
\begin{document}
\begin{tikzpicture}
\begin{axis}[width=6in,axis equal image,clip=false,
axis lines=middle,
xmin=-5,xmax=5,
ymin=-5,ymax=5,
restrict y to domain=-4:4,
xtick={-5,-4,-3,-2,-1.41421,-1,0,1,1.41421,2,3,4,5},ytick=
{-4,-3,-2,-1,0,1,2,3,4},
xticklabels={-5,-4,-3,-2,$-\sqrt{2}$,-1,0,1,$\sqrt{2}$,2,3,4,5},yticklabels=
{-4,-3,-2,-1,0,1,2,3,4},
ticklabel style={font=\tiny,fill=white},
axis line style={latex-latex},
axis line style={->},
x label style={at={(ticklabel* cs:1)},
anchor=west,},
y label style={at={(ticklabel* cs:1)},
anchor=south},
xlabel={$x$},
ylabel={$y$}
]
\addplot [
domain=-5:5,
samples=300,
color=black,
]
{(x^2-2)/(1-x^2)};
\addplot[dashed, latex-latex, samples=200, domain=-5:5] {-1}
node[above,pos=0.1,font=\footnotesize]{};
\addplot [dashed, latex-latex, samples=200, domain=-4:4] (-1,x) node
[pos=0.1, anchor=north, font=\footnotesize, sloped] {};
\addplot [dashed, latex-latex, samples=200, domain=-4:4] (1,x) node
[pos=0.1, anchor=north, font=\footnotesize, sloped] {};
\end{axis}
\end{tikzpicture}
\end{document}
