Answer
$f(x)=\displaystyle \frac{1}{2}\ln|x^{2}+1|-\frac{1}{2}\ln 2$
Work Step by Step
Slope of tangent line = $f'(x)=\displaystyle \frac{x}{x^{2}+1}$
so,
$f(x)=\displaystyle \int\frac{x}{x^{2}+1}dx=$
Substitute:
$\left[\begin{array}{ll}
u=x^{2}+1 & du=2xdx\\
& xdx=du/2
\end{array}\right]$
$f(x)=\displaystyle \frac{1}{2}\int u^{-1}du \qquad$
apply power rule ($n=-1$):
$=\displaystyle \frac{1}{2}\ln|u|+C \qquad$
bring the variable $x$ back:
$=\displaystyle \frac{1}{2}\ln|x^{2}+1|+C \qquad$
we can remove the absolute value brackets because $x^{2}+1$ is never less than $1.$
Given that $f(1)=0$, we find $C:$
$\displaystyle \frac{1}{2}\ln|1+1|+C =0$
$C=-\displaystyle \frac{1}{2}\ln 2$
Thus,
$f(x)=\displaystyle \frac{1}{2}\ln|x^{2}+1|-\frac{1}{2}\ln 2$