3.322 \(\int \frac{9+x^4}{x^2 (9+x^2)} \, dx\)

Optimal. Leaf size=17 \[ x-\frac{1}{x}-\frac{10}{3} \tan ^{-1}\left (\frac{x}{3}\right ) \]

[Out]

-x^(-1) + x - (10*ArcTan[x/3])/3

________________________________________________________________________________________

Rubi [A]  time = 0.0128914, antiderivative size = 17, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {1262, 203} \[ x-\frac{1}{x}-\frac{10}{3} \tan ^{-1}\left (\frac{x}{3}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

-x^(-1) + x - (10*ArcTan[x/3])/3

Rule 1262

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

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{9+x^4}{x^2 \left (9+x^2\right )} \, dx &=\int \left (1+\frac{1}{x^2}-\frac{10}{9+x^2}\right ) \, dx\\ &=-\frac{1}{x}+x-10 \int \frac{1}{9+x^2} \, dx\\ &=-\frac{1}{x}+x-\frac{10}{3} \tan ^{-1}\left (\frac{x}{3}\right )\\ \end{align*}

Mathematica [A]  time = 0.0059834, size = 17, normalized size = 1. \[ x-\frac{1}{x}-\frac{10}{3} \tan ^{-1}\left (\frac{x}{3}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

-x^(-1) + x - (10*ArcTan[x/3])/3

________________________________________________________________________________________

Maple [A]  time = 0.004, size = 14, normalized size = 0.8 \begin{align*} -{x}^{-1}+x-{\frac{10}{3}\arctan \left ({\frac{x}{3}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/x+x-10/3*arctan(1/3*x)

________________________________________________________________________________________

Maxima [A]  time = 1.56195, size = 18, normalized size = 1.06 \begin{align*} x - \frac{1}{x} - \frac{10}{3} \, \arctan \left (\frac{1}{3} \, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 1/x - 10/3*arctan(1/3*x)

________________________________________________________________________________________

Fricas [A]  time = 1.52136, size = 54, normalized size = 3.18 \begin{align*} \frac{3 \, x^{2} - 10 \, x \arctan \left (\frac{1}{3} \, x\right ) - 3}{3 \, x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3*(3*x^2 - 10*x*arctan(1/3*x) - 3)/x

________________________________________________________________________________________

Sympy [A]  time = 0.098892, size = 12, normalized size = 0.71 \begin{align*} x - \frac{10 \operatorname{atan}{\left (\frac{x}{3} \right )}}{3} - \frac{1}{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 10*atan(x/3)/3 - 1/x

________________________________________________________________________________________

Giac [A]  time = 1.22681, size = 18, normalized size = 1.06 \begin{align*} x - \frac{1}{x} - \frac{10}{3} \, \arctan \left (\frac{1}{3} \, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - 1/x - 10/3*arctan(1/3*x)