3.3.83 \(\int \frac {1+x^4}{2+x^2} \, dx\) [283]

Optimal. Leaf size=26 \[ -2 x+\frac {x^3}{3}+\frac {5 \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )}{\sqrt {2}} \]

[Out]

-2*x+1/3*x^3+5/2*arctan(1/2*x*2^(1/2))*2^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {1168, 209} \begin {gather*} \frac {5 \text {ArcTan}\left (\frac {x}{\sqrt {2}}\right )}{\sqrt {2}}+\frac {x^3}{3}-2 x \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 + x^4)/(2 + x^2),x]

[Out]

-2*x + x^3/3 + (5*ArcTan[x/Sqrt[2]])/Sqrt[2]

Rule 209

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*ArcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /;
 FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a, 0] || GtQ[b, 0])

Rule 1168

Int[((d_) + (e_.)*(x_)^2)^(q_.)*((a_) + (c_.)*(x_)^4)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d + e*x^2)^q*(a
 + c*x^4)^p, x], x] /; FreeQ[{a, c, d, e}, x] && NeQ[c*d^2 + a*e^2, 0] && IGtQ[p, 0] && IGtQ[q, -2]

Rubi steps

\begin {align*} \int \frac {1+x^4}{2+x^2} \, dx &=\int \left (-2+x^2+\frac {5}{2+x^2}\right ) \, dx\\ &=-2 x+\frac {x^3}{3}+5 \int \frac {1}{2+x^2} \, dx\\ &=-2 x+\frac {x^3}{3}+\frac {5 \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )}{\sqrt {2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 26, normalized size = 1.00 \begin {gather*} -2 x+\frac {x^3}{3}+\frac {5 \tan ^{-1}\left (\frac {x}{\sqrt {2}}\right )}{\sqrt {2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 + x^4)/(2 + x^2),x]

[Out]

-2*x + x^3/3 + (5*ArcTan[x/Sqrt[2]])/Sqrt[2]

________________________________________________________________________________________

Maple [A]
time = 0.17, size = 22, normalized size = 0.85

method result size
default \(-2 x +\frac {x^{3}}{3}+\frac {5 \arctan \left (\frac {\sqrt {2}\, x}{2}\right ) \sqrt {2}}{2}\) \(22\)
risch \(-2 x +\frac {x^{3}}{3}+\frac {5 \arctan \left (\frac {\sqrt {2}\, x}{2}\right ) \sqrt {2}}{2}\) \(22\)
meijerg \(\frac {\arctan \left (\frac {\sqrt {2}\, x}{2}\right ) \sqrt {2}}{2}+\sqrt {2}\, \left (-\frac {x \sqrt {2}\, \left (-\frac {5 x^{2}}{2}+15\right )}{15}+2 \arctan \left (\frac {\sqrt {2}\, x}{2}\right )\right )\) \(41\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^4+1)/(x^2+2),x,method=_RETURNVERBOSE)

[Out]

-2*x+1/3*x^3+5/2*arctan(1/2*2^(1/2)*x)*2^(1/2)

________________________________________________________________________________________

Maxima [A]
time = 0.49, size = 21, normalized size = 0.81 \begin {gather*} \frac {1}{3} \, x^{3} + \frac {5}{2} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} x\right ) - 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^4+1)/(x^2+2),x, algorithm="maxima")

[Out]

1/3*x^3 + 5/2*sqrt(2)*arctan(1/2*sqrt(2)*x) - 2*x

________________________________________________________________________________________

Fricas [A]
time = 0.42, size = 21, normalized size = 0.81 \begin {gather*} \frac {1}{3} \, x^{3} + \frac {5}{2} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} x\right ) - 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^4+1)/(x^2+2),x, algorithm="fricas")

[Out]

1/3*x^3 + 5/2*sqrt(2)*arctan(1/2*sqrt(2)*x) - 2*x

________________________________________________________________________________________

Sympy [A]
time = 0.02, size = 26, normalized size = 1.00 \begin {gather*} \frac {x^{3}}{3} - 2 x + \frac {5 \sqrt {2} \operatorname {atan}{\left (\frac {\sqrt {2} x}{2} \right )}}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x**4+1)/(x**2+2),x)

[Out]

x**3/3 - 2*x + 5*sqrt(2)*atan(sqrt(2)*x/2)/2

________________________________________________________________________________________

Giac [A]
time = 3.21, size = 21, normalized size = 0.81 \begin {gather*} \frac {1}{3} \, x^{3} + \frac {5}{2} \, \sqrt {2} \arctan \left (\frac {1}{2} \, \sqrt {2} x\right ) - 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((x^4+1)/(x^2+2),x, algorithm="giac")

[Out]

1/3*x^3 + 5/2*sqrt(2)*arctan(1/2*sqrt(2)*x) - 2*x

________________________________________________________________________________________

Mupad [B]
time = 0.03, size = 21, normalized size = 0.81 \begin {gather*} \frac {5\,\sqrt {2}\,\mathrm {atan}\left (\frac {\sqrt {2}\,x}{2}\right )}{2}-2\,x+\frac {x^3}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^4 + 1)/(x^2 + 2),x)

[Out]

(5*2^(1/2)*atan((2^(1/2)*x)/2))/2 - 2*x + x^3/3

________________________________________________________________________________________