We are asked to evaluate the integral:
\[
I = \int \frac{x^2 + 1}{x^4 + 1} \, dx.
\]
To solve this, notice that:
\[
x^4 + 1 = (x^2 + 1)(x^2 - 1).
\]
Now, rewrite the integrand:
\[
\frac{x^2 + 1}{x^4 + 1} = \frac{1}{x^2 + 1} - \frac{x}{x^2 + 1}.
\]
We can then separate the integral into two parts:
\[
I = \int \frac{1}{x^2 + 1} \, dx - \int \frac{x}{x^2 + 1} \, dx.
\]
The first part is a standard integral:
\[
\int \frac{1}{x^2 + 1} \, dx = \tan^{-1}(x).
\]
For the second part, use substitution: \( u = x^2 + 1 \), so \( du = 2x \, dx \). This gives:
\[
\int \frac{x}{x^2 + 1} \, dx = \frac{1}{2} \ln|x^2 + 1| = \frac{1}{2} \ln(x^2 + 1).
\]
Thus, combining the two parts, we get:
\[
I = \tan^{-1}(x) + \frac{1}{2} \ln(x^2 + 1) + c.
\]
Therefore, the correct answer is \( (B) \).