3.452 \(\int \frac{x^4}{4+5 x^2+x^4} \, dx\)

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

[Out]

x - (8*ArcTan[x/2])/3 + ArcTan[x]/3

________________________________________________________________________________________

Rubi [A]  time = 0.0140661, antiderivative size = 18, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.188, Rules used = {1122, 1166, 203} \[ x-\frac{8}{3} \tan ^{-1}\left (\frac{x}{2}\right )+\frac{1}{3} \tan ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

x - (8*ArcTan[x/2])/3 + ArcTan[x]/3

Rule 1122

Int[((d_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Simp[(d^3*(d*x)^(m - 3)*(a + b*
x^2 + c*x^4)^(p + 1))/(c*(m + 4*p + 1)), x] - Dist[d^4/(c*(m + 4*p + 1)), Int[(d*x)^(m - 4)*Simp[a*(m - 3) + b
*(m + 2*p - 1)*x^2, x]*(a + b*x^2 + c*x^4)^p, x], x] /; FreeQ[{a, b, c, d, p}, x] && NeQ[b^2 - 4*a*c, 0] && Gt
Q[m, 3] && NeQ[m + 4*p + 1, 0] && IntegerQ[2*p] && (IntegerQ[p] || IntegerQ[m])

Rule 1166

Int[((d_) + (e_.)*(x_)^2)/((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Di
st[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^2), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), Int[1/(b/2 +
 q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - a*e^2, 0] && PosQ[b^
2 - 4*a*c]

Rule 203

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

Rubi steps

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

Mathematica [A]  time = 0.0088147, size = 18, normalized size = 1. \[ x+\frac{8}{3} \tan ^{-1}\left (\frac{2}{x}\right )+\frac{1}{3} \tan ^{-1}(x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

x + (8*ArcTan[2/x])/3 + ArcTan[x]/3

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 13, normalized size = 0.7 \begin{align*} x-{\frac{8}{3}\arctan \left ({\frac{x}{2}} \right ) }+{\frac{\arctan \left ( x \right ) }{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^4/(x^4+5*x^2+4),x)

[Out]

x-8/3*arctan(1/2*x)+1/3*arctan(x)

________________________________________________________________________________________

Maxima [A]  time = 1.50497, size = 16, normalized size = 0.89 \begin{align*} x - \frac{8}{3} \, \arctan \left (\frac{1}{2} \, x\right ) + \frac{1}{3} \, \arctan \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 8/3*arctan(1/2*x) + 1/3*arctan(x)

________________________________________________________________________________________

Fricas [A]  time = 1.00811, size = 53, normalized size = 2.94 \begin{align*} x - \frac{8}{3} \, \arctan \left (\frac{1}{2} \, x\right ) + \frac{1}{3} \, \arctan \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 8/3*arctan(1/2*x) + 1/3*arctan(x)

________________________________________________________________________________________

Sympy [A]  time = 0.128109, size = 14, normalized size = 0.78 \begin{align*} x - \frac{8 \operatorname{atan}{\left (\frac{x}{2} \right )}}{3} + \frac{\operatorname{atan}{\left (x \right )}}{3} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 8*atan(x/2)/3 + atan(x)/3

________________________________________________________________________________________

Giac [A]  time = 1.13935, size = 16, normalized size = 0.89 \begin{align*} x - \frac{8}{3} \, \arctan \left (\frac{1}{2} \, x\right ) + \frac{1}{3} \, \arctan \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 8/3*arctan(1/2*x) + 1/3*arctan(x)