3.3.57 \(\int \frac {x^2 (3 a+b x^2)}{a^2+2 a b x^2+b^2 x^4+c^2 x^6} \, dx\) [257]

Optimal. Leaf size=19 \[ \frac {\tan ^{-1}\left (\frac {c x^3}{a+b x^2}\right )}{c} \]

[Out]

arctan(c*x^3/(b*x^2+a))/c

________________________________________________________________________________________

Rubi [A]
time = 0.07, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {2119, 211} \begin {gather*} \frac {\text {ArcTan}\left (\frac {c x^3}{a+b x^2}\right )}{c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x^2*(3*a + b*x^2))/(a^2 + 2*a*b*x^2 + b^2*x^4 + c^2*x^6),x]

[Out]

ArcTan[(c*x^3)/(a + b*x^2)]/c

Rule 211

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

Rule 2119

Int[((x_)^(m_.)*((A_) + (B_.)*(x_)^(n_.)))/((a_) + (b_.)*(x_)^(k_.) + (c_.)*(x_)^(n_.) + (d_.)*(x_)^(n2_)), x_
Symbol] :> Dist[A^2*((m - n + 1)/(m + 1)), Subst[Int[1/(a + A^2*b*(m - n + 1)^2*x^2), x], x, x^(m + 1)/(A*(m -
 n + 1) + B*(m + 1)*x^n)], x] /; FreeQ[{a, b, c, d, A, B, m, n}, x] && EqQ[n2, 2*n] && EqQ[k, 2*(m + 1)] && Eq
Q[a*B^2*(m + 1)^2 - A^2*d*(m - n + 1)^2, 0] && EqQ[B*c*(m + 1) - 2*A*d*(m - n + 1), 0]

Rubi steps

\begin {align*} \int \frac {x^2 \left (3 a+b x^2\right )}{a^2+2 a b x^2+b^2 x^4+c^2 x^6} \, dx &=\left (3 a^2\right ) \text {Subst}\left (\int \frac {1}{a^2+9 a^2 c^2 x^2} \, dx,x,\frac {x^3}{3 a+3 b x^2}\right )\\ &=\frac {\tan ^{-1}\left (\frac {c x^3}{a+b x^2}\right )}{c}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
time = 0.03, size = 87, normalized size = 4.58 \begin {gather*} \frac {1}{2} \text {RootSum}\left [a^2+2 a b \text {$\#$1}^2+b^2 \text {$\#$1}^4+c^2 \text {$\#$1}^6\&,\frac {3 a \log (x-\text {$\#$1}) \text {$\#$1}+b \log (x-\text {$\#$1}) \text {$\#$1}^3}{2 a b+2 b^2 \text {$\#$1}^2+3 c^2 \text {$\#$1}^4}\&\right ] \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x^2*(3*a + b*x^2))/(a^2 + 2*a*b*x^2 + b^2*x^4 + c^2*x^6),x]

[Out]

RootSum[a^2 + 2*a*b*#1^2 + b^2*#1^4 + c^2*#1^6 & , (3*a*Log[x - #1]*#1 + b*Log[x - #1]*#1^3)/(2*a*b + 2*b^2*#1
^2 + 3*c^2*#1^4) & ]/2

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.10, size = 75, normalized size = 3.95

method result size
default \(\frac {\left (\munderset {\textit {\_R} =\RootOf \left (c^{2} \textit {\_Z}^{6}+b^{2} \textit {\_Z}^{4}+2 a \,\textit {\_Z}^{2} b +a^{2}\right )}{\sum }\frac {\left (\textit {\_R}^{4} b +3 \textit {\_R}^{2} a \right ) \ln \left (x -\textit {\_R} \right )}{3 \textit {\_R}^{5} c^{2}+2 \textit {\_R}^{3} b^{2}+2 a b \textit {\_R}}\right )}{2}\) \(75\)
risch \(-\frac {\arctan \left (\frac {c \,x^{5} b}{a^{2}}-\frac {c \,x^{3}}{a}+\frac {b^{3} x^{3}}{a^{2} c}+\frac {b^{2} x}{a c}\right )}{c}-\frac {\arctan \left (-\frac {c \,x^{3}}{a}+\frac {c x}{b}-\frac {b^{2} x}{a c}\right )}{c}+\frac {\arctan \left (\frac {c x}{b}\right )}{c}\) \(96\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(b*x^2+3*a)/(c^2*x^6+b^2*x^4+2*a*b*x^2+a^2),x,method=_RETURNVERBOSE)

[Out]

1/2*sum((_R^4*b+3*_R^2*a)/(3*_R^5*c^2+2*_R^3*b^2+2*_R*a*b)*ln(x-_R),_R=RootOf(_Z^6*c^2+_Z^4*b^2+2*_Z^2*a*b+a^2
))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(b*x^2+3*a)/(c^2*x^6+b^2*x^4+2*a*b*x^2+a^2),x, algorithm="maxima")

[Out]

integrate((b*x^2 + 3*a)*x^2/(c^2*x^6 + b^2*x^4 + 2*a*b*x^2 + a^2), x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 83 vs. \(2 (19) = 38\).
time = 0.37, size = 83, normalized size = 4.37 \begin {gather*} \frac {\arctan \left (\frac {c x}{b}\right ) - \arctan \left (\frac {b c^{2} x^{5} + a b^{2} x + {\left (b^{3} - a c^{2}\right )} x^{3}}{a^{2} c}\right ) + \arctan \left (\frac {b c^{2} x^{3} + {\left (b^{3} - a c^{2}\right )} x}{a b c}\right )}{c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(b*x^2+3*a)/(c^2*x^6+b^2*x^4+2*a*b*x^2+a^2),x, algorithm="fricas")

[Out]

(arctan(c*x/b) - arctan((b*c^2*x^5 + a*b^2*x + (b^3 - a*c^2)*x^3)/(a^2*c)) + arctan((b*c^2*x^3 + (b^3 - a*c^2)
*x)/(a*b*c)))/c

________________________________________________________________________________________

Sympy [C] Result contains complex when optimal does not.
time = 0.60, size = 44, normalized size = 2.32 \begin {gather*} \frac {- \frac {i \log {\left (- \frac {i a}{c} - \frac {i b x^{2}}{c} + x^{3} \right )}}{2} + \frac {i \log {\left (\frac {i a}{c} + \frac {i b x^{2}}{c} + x^{3} \right )}}{2}}{c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(b*x**2+3*a)/(c**2*x**6+b**2*x**4+2*a*b*x**2+a**2),x)

[Out]

(-I*log(-I*a/c - I*b*x**2/c + x**3)/2 + I*log(I*a/c + I*b*x**2/c + x**3)/2)/c

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 87 vs. \(2 (19) = 38\).
time = 5.45, size = 87, normalized size = 4.58 \begin {gather*} \frac {\arctan \left (\frac {c x}{b}\right ) + \arctan \left (-\frac {b c^{2} x^{5} + b^{3} x^{3} - a c^{2} x^{3} + a b^{2} x}{a^{2} c}\right ) - \arctan \left (-\frac {b c^{2} x^{3} + b^{3} x - a c^{2} x}{a b c}\right )}{c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(b*x^2+3*a)/(c^2*x^6+b^2*x^4+2*a*b*x^2+a^2),x, algorithm="giac")

[Out]

(arctan(c*x/b) + arctan(-(b*c^2*x^5 + b^3*x^3 - a*c^2*x^3 + a*b^2*x)/(a^2*c)) - arctan(-(b*c^2*x^3 + b^3*x - a
*c^2*x)/(a*b*c)))/c

________________________________________________________________________________________

Mupad [B]
time = 2.27, size = 252, normalized size = 13.26 \begin {gather*} \frac {\mathrm {atan}\left (\frac {27\,a\,c^5\,x^3}{27\,a^2\,c^4-4\,a\,b^3\,c^2}-\frac {27\,b\,c^5\,x^5}{27\,a^2\,c^4-4\,a\,b^3\,c^2}-\frac {31\,b^3\,c^3\,x^3}{27\,a^2\,c^4-4\,a\,b^3\,c^2}+\frac {4\,b^6\,c\,x^3}{27\,a^3\,c^4-4\,a^2\,b^3\,c^2}+\frac {4\,b^5\,c\,x}{27\,a^2\,c^4-4\,a\,b^3\,c^2}+\frac {4\,b^4\,c^3\,x^5}{27\,a^3\,c^4-4\,a^2\,b^3\,c^2}-\frac {27\,a\,b^2\,c^3\,x}{27\,a^2\,c^4-4\,a\,b^3\,c^2}\right )+\mathrm {atan}\left (\frac {c\,x^3}{a}-\frac {c\,x}{b}+\frac {b^2\,x}{a\,c}\right )+\mathrm {atan}\left (\frac {c\,x}{b}\right )}{c} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2*(3*a + b*x^2))/(a^2 + b^2*x^4 + c^2*x^6 + 2*a*b*x^2),x)

[Out]

(atan((27*a*c^5*x^3)/(27*a^2*c^4 - 4*a*b^3*c^2) - (27*b*c^5*x^5)/(27*a^2*c^4 - 4*a*b^3*c^2) - (31*b^3*c^3*x^3)
/(27*a^2*c^4 - 4*a*b^3*c^2) + (4*b^6*c*x^3)/(27*a^3*c^4 - 4*a^2*b^3*c^2) + (4*b^5*c*x)/(27*a^2*c^4 - 4*a*b^3*c
^2) + (4*b^4*c^3*x^5)/(27*a^3*c^4 - 4*a^2*b^3*c^2) - (27*a*b^2*c^3*x)/(27*a^2*c^4 - 4*a*b^3*c^2)) + atan((c*x^
3)/a - (c*x)/b + (b^2*x)/(a*c)) + atan((c*x)/b))/c

________________________________________________________________________________________