Evaluate the integral:
\[
I = \int \frac{x^4 + 1}{x^6 + 1} \, dx
\]
Step 1: Factor the denominator:
\[
x^6 + 1 = (x^2 + 1)(x^4 - x^2 + 1)
\]
Step 2: Use partial fraction decomposition:
Assume:
\[
\frac{x^4 + 1}{(x^2 + 1)(x^4 - x^2 + 1)} = \frac{A x^2 + B}{x^2 + 1} + \frac{C x^3 + D x^2 + E x + F}{x^4 - x^2 + 1}
\]
However, since the degree of numerator is less than denominator, and numerator is symmetric, try the substitution method.
Step 3: Use substitution \( t = x^3 \), then \( dt = 3x^2 dx \), or try rewriting numerator:
Rewrite numerator:
\[
x^4 + 1 = x^4 - x^2 + 1 + x^2
\]
So,
\[
\frac{x^4 + 1}{x^6 + 1} = \frac{x^4 - x^2 + 1 + x^2}{(x^2 + 1)(x^4 - x^2 + 1)} = \frac{1}{x^2 + 1} + \frac{x^2}{(x^2 + 1)(x^4 - x^2 + 1)}
\]
but this is complicated.
Step 4: Use the identity:
\[
\frac{d}{dx} \tan^{-1} x = \frac{1}{1 + x^2}
\]
\[
\frac{d}{dx} \tan^{-1} x^3 = \frac{3x^2}{1 + x^6}
\]
Rewrite the integral as:
\[
I = \int \frac{1}{1 + x^2} dx + \frac{1}{3} \int \frac{3x^2}{1 + x^6} dx
\]
But this matches the derivatives of \( \tan^{-1} x \) and \( \tan^{-1} x^3 \).
Step 5: Therefore,
\[
I = \tan^{-1} x + \frac{1}{3} \tan^{-1} x^3 + C
\]
Hence, the integral evaluates to:
\[
\boxed{\tan^{-1} x + \frac{1}{3} \tan^{-1} x^3 + C}
\]