Theorem: Primitive of x squared over x fourth plus a fourth

:$\ds \int \frac {x^2 \rd x} {x^4 + a^4} = \frac 1 {4 a \sqrt 2} \map \ln {\frac {x^2 - a x \sqrt 2 + a^2} {x^2 + a x \sqrt 2 + a^2} } - \frac 1 {2 a \sqrt 2} \paren {\map \arctan {1 - \frac {x \sqrt 2} a} - \map \arctan {1 + \frac {x \sqrt 2} a} }$

Proof:
{{begin-eqn}}
{{eqn | l = \int \frac {x^2 \rd x} {x^4 + a^4}
      | r = \int \paren {\frac x {2 a \sqrt 2 \paren {x^2 - a x \sqrt 2 + a^2} } - \frac x {2 a \sqrt 2 \paren {x^2 + a x \sqrt 2 + a^2} } } \rd x
      | c = Partial Fraction Expansion
}}
{{eqn | n = 1
      | r = \frac 1 {4 a \sqrt 2} \int \frac {2 x \rd x} {x^2 - a x \sqrt 2 + a^2} - \frac 1 {4 a \sqrt 2} \int \frac {2 x \rd x} {x^2 + a x \sqrt 2 + a^2}
      | c = Linear Combination of Primitives
}}
{{end-eqn}}
Then:
{{begin-eqn}}
{{eqn | l = \int \frac {2 x \rd x} {x^2 - a x \sqrt 2 + a^2}
      | r = \int \frac {\paren {2 x - a \sqrt 2 + a \sqrt 2} \rd x} {x^2 - a x \sqrt 2 + a^2}
      | c = 
}}
{{eqn | r = \int \frac {\paren {2 x - a \sqrt 2} \rd x} {x^2 - a x \sqrt 2 + a^2} + a \sqrt 2 \int \frac {\d x} {x^2 - a x \sqrt 2 + a^2}
      | c = Linear Combination of Primitives
}}
{{eqn | r = \ln \size {x^2 - a x \sqrt 2 + a^2} + a \sqrt 2 \int \frac {\d x} {x^2 - a x \sqrt 2 + a^2}
      | c = Primitive of Function under its Derivative
}}
{{eqn | r = \ln \size {x^2 - a x \sqrt 2 + a^2} + a \sqrt 2 \paren {\frac {-\sqrt 2} a \map \arctan {1 - \frac {x \sqrt 2} a} }
      | c = Primitive of $\dfrac 1 {x^2 - a x \sqrt 2 + a^2}$
}}
{{eqn | n = 2
      | r = \ln \size {x^2 - a x \sqrt 2 + a^2} - 2 \map \arctan {1 - \frac {x \sqrt 2} a}
      | c = simplifying
}}
{{end-eqn}}
Similarly:
{{begin-eqn}}
{{eqn | l = \int \frac {2 x \rd x} {x^2 + a x \sqrt 2 + a^2}
      | r = \int \frac {\paren {2 x + a \sqrt 2 - a \sqrt 2} \rd x} {x^2 + a x \sqrt 2 + a^2}
      | c = 
}}
{{eqn | r = \int \frac {\paren {2 x + a \sqrt 2} \rd x} {x^2 + a x \sqrt 2 + a^2} - a \sqrt 2 \int \frac {\d x} {x^2 + a x \sqrt 2 + a^2}
      | c = Linear Combination of Primitives
}}
{{eqn | r = \ln \size {x^2 + a x \sqrt 2 + a^2} - a \sqrt 2 \int \frac {\d x} {x^2 + a x \sqrt 2 + a^2}
      | c = Primitive of Function under its Derivative
}}
{{eqn | r = \ln \size {x^2 + a x \sqrt 2 + a^2} - a \sqrt 2 \paren {\frac {\sqrt 2} a \map \arctan {1 + \frac {x \sqrt 2} a} }
      | c = Primitive of $\dfrac 1 {x^2 + a x \sqrt 2 + a^2}$
}}
{{eqn | n = 3
      | r = \ln \size {x^2 + a x \sqrt 2 + a^2} - 2 \map \arctan {1 + \frac {x \sqrt 2} a}
      | c = simplifying
}}
{{end-eqn}}
Thus:
{{begin-eqn}}
{{eqn | l = \int \frac {\d x} {x^4 + a^4}
      | r = \frac 1 {4 a \sqrt 2} \int \frac {2 x \rd x} {x^2 - a x \sqrt 2 + a^2} - \frac 1 {4 a \sqrt 2} \int \frac {2 x \rd x} {x^2 + a x \sqrt 2 + a^2}
      | c = from $(1)$
}}
{{eqn | r = \frac 1 {4 a \sqrt 2} \paren {\ln \size {x^2 - a x \sqrt 2 + a^2} - 2 \map \arctan {1 - \frac {x \sqrt 2} a} } 
      | c = from $(2)$
}}
{{eqn | o = 
      | ro= -
      | r = \frac 1 {4 a \sqrt 2} \paren {\ln \size {x^2 + a x \sqrt 2 + a^2} - 2 \map \arctan {1 + \frac {x \sqrt 2} a} } 
      | c = from $(3)$
}}
{{eqn | r = \frac 1 {4 a \sqrt 2} \map \ln {\frac {x^2 - a x \sqrt 2 + a^2} {x^2 + a x \sqrt 2 + a^2} } - \frac 1 {2 a \sqrt 2} \paren {\map \arctan {1 - \frac {x \sqrt 2} a} - \map \arctan {1 + \frac {x \sqrt 2} a} }
      | c = simplifying
}}
{{end-eqn}}
{{qed}}