5. The increasing interval of the function $f(x)=\frac{(x+1)^{2}}{x^{2}+1}$ is
5. $[-1,1]$.
$f(x)=\frac{x^{2}+2 x+1}{x^{2}+1}=1+\frac{2 x}{x^{2}+1}$. Let $g(x)=\frac{2 x}{x^{2}+1}$, when $x \neq 0$, $g(x)=\frac{2}{x+\frac{1}{x}}$, $x+\frac{1}{x}$ is decreasing on $(0,1]$, and $x+\frac{1}{x}>0$, so $g(x)$ is increasing on $(0,1]$, $g(x)>0$; since $g(x)$ is an odd function, $g(x)$ is increasing on $[-1,0)$ and $g(x)<0$. Also, $g(0)=0$, thus $g(x)$ is increasing on $[-1,1]$, which means the increasing interval of $f(x)$ is $[-1,1]$.