Evaluate the indefinite integral.

3x+1x2+1dx\displaystyle \int\frac{{{3}{x}+{1}}}{{{x}^{{2}}+{1}}}{\left.{d}{x}\right.}

  + C