Optimal. Leaf size=107 \[ -\frac {b^2 (2 b c-3 a d) x}{d^3}+\frac {b^3 x^3}{3 d^2}-\frac {(b c-a d)^3 x}{2 c d^3 \left (c+d x^2\right )}+\frac {(b c-a d)^2 (5 b c+a d) \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{2 c^{3/2} d^{7/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.07, antiderivative size = 107, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {398, 393, 211}
\begin {gather*} \frac {(a d+5 b c) (b c-a d)^2 \text {ArcTan}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{2 c^{3/2} d^{7/2}}-\frac {b^2 x (2 b c-3 a d)}{d^3}-\frac {x (b c-a d)^3}{2 c d^3 \left (c+d x^2\right )}+\frac {b^3 x^3}{3 d^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 393
Rule 398
Rubi steps
\begin {align*} \int \frac {\left (a+b x^2\right )^3}{\left (c+d x^2\right )^2} \, dx &=\int \left (-\frac {b^2 (2 b c-3 a d)}{d^3}+\frac {b^3 x^2}{d^2}+\frac {(b c-a d)^2 (2 b c+a d)+3 b d (b c-a d)^2 x^2}{d^3 \left (c+d x^2\right )^2}\right ) \, dx\\ &=-\frac {b^2 (2 b c-3 a d) x}{d^3}+\frac {b^3 x^3}{3 d^2}+\frac {\int \frac {(b c-a d)^2 (2 b c+a d)+3 b d (b c-a d)^2 x^2}{\left (c+d x^2\right )^2} \, dx}{d^3}\\ &=-\frac {b^2 (2 b c-3 a d) x}{d^3}+\frac {b^3 x^3}{3 d^2}-\frac {(b c-a d)^3 x}{2 c d^3 \left (c+d x^2\right )}+\frac {\left ((b c-a d)^2 (5 b c+a d)\right ) \int \frac {1}{c+d x^2} \, dx}{2 c d^3}\\ &=-\frac {b^2 (2 b c-3 a d) x}{d^3}+\frac {b^3 x^3}{3 d^2}-\frac {(b c-a d)^3 x}{2 c d^3 \left (c+d x^2\right )}+\frac {(b c-a d)^2 (5 b c+a d) \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{2 c^{3/2} d^{7/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 107, normalized size = 1.00 \begin {gather*} -\frac {b^2 (2 b c-3 a d) x}{d^3}+\frac {b^3 x^3}{3 d^2}-\frac {(b c-a d)^3 x}{2 c d^3 \left (c+d x^2\right )}+\frac {(b c-a d)^2 (5 b c+a d) \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{2 c^{3/2} d^{7/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 138, normalized size = 1.29
method | result | size |
default | \(\frac {b^{2} \left (\frac {1}{3} b d \,x^{3}+3 a d x -2 b c x \right )}{d^{3}}+\frac {\frac {\left (a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}\right ) x}{2 c \left (d \,x^{2}+c \right )}+\frac {\left (a^{3} d^{3}+3 a^{2} b c \,d^{2}-9 a \,b^{2} c^{2} d +5 b^{3} c^{3}\right ) \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{2 c \sqrt {c d}}}{d^{3}}\) | \(138\) |
risch | \(\frac {b^{3} x^{3}}{3 d^{2}}+\frac {3 b^{2} a x}{d^{2}}-\frac {2 b^{3} c x}{d^{3}}+\frac {\left (a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}\right ) x}{2 c \,d^{3} \left (d \,x^{2}+c \right )}-\frac {\ln \left (d x +\sqrt {-c d}\right ) a^{3}}{4 \sqrt {-c d}\, c}-\frac {3 \ln \left (d x +\sqrt {-c d}\right ) a^{2} b}{4 d \sqrt {-c d}}+\frac {9 c \ln \left (d x +\sqrt {-c d}\right ) a \,b^{2}}{4 d^{2} \sqrt {-c d}}-\frac {5 c^{2} \ln \left (d x +\sqrt {-c d}\right ) b^{3}}{4 d^{3} \sqrt {-c d}}+\frac {\ln \left (-d x +\sqrt {-c d}\right ) a^{3}}{4 \sqrt {-c d}\, c}+\frac {3 \ln \left (-d x +\sqrt {-c d}\right ) a^{2} b}{4 d \sqrt {-c d}}-\frac {9 c \ln \left (-d x +\sqrt {-c d}\right ) a \,b^{2}}{4 d^{2} \sqrt {-c d}}+\frac {5 c^{2} \ln \left (-d x +\sqrt {-c d}\right ) b^{3}}{4 d^{3} \sqrt {-c d}}\) | \(303\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 147, normalized size = 1.37 \begin {gather*} -\frac {{\left (b^{3} c^{3} - 3 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} - a^{3} d^{3}\right )} x}{2 \, {\left (c d^{4} x^{2} + c^{2} d^{3}\right )}} + \frac {b^{3} d x^{3} - 3 \, {\left (2 \, b^{3} c - 3 \, a b^{2} d\right )} x}{3 \, d^{3}} + \frac {{\left (5 \, b^{3} c^{3} - 9 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} + a^{3} d^{3}\right )} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{2 \, \sqrt {c d} c d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 212 vs.
\(2 (93) = 186\).
time = 0.59, size = 444, normalized size = 4.15 \begin {gather*} \left [\frac {4 \, b^{3} c^{2} d^{3} x^{5} - 4 \, {\left (5 \, b^{3} c^{3} d^{2} - 9 \, a b^{2} c^{2} d^{3}\right )} x^{3} - 3 \, {\left (5 \, b^{3} c^{4} - 9 \, a b^{2} c^{3} d + 3 \, a^{2} b c^{2} d^{2} + a^{3} c d^{3} + {\left (5 \, b^{3} c^{3} d - 9 \, a b^{2} c^{2} d^{2} + 3 \, a^{2} b c d^{3} + a^{3} d^{4}\right )} x^{2}\right )} \sqrt {-c d} \log \left (\frac {d x^{2} - 2 \, \sqrt {-c d} x - c}{d x^{2} + c}\right ) - 6 \, {\left (5 \, b^{3} c^{4} d - 9 \, a b^{2} c^{3} d^{2} + 3 \, a^{2} b c^{2} d^{3} - a^{3} c d^{4}\right )} x}{12 \, {\left (c^{2} d^{5} x^{2} + c^{3} d^{4}\right )}}, \frac {2 \, b^{3} c^{2} d^{3} x^{5} - 2 \, {\left (5 \, b^{3} c^{3} d^{2} - 9 \, a b^{2} c^{2} d^{3}\right )} x^{3} + 3 \, {\left (5 \, b^{3} c^{4} - 9 \, a b^{2} c^{3} d + 3 \, a^{2} b c^{2} d^{2} + a^{3} c d^{3} + {\left (5 \, b^{3} c^{3} d - 9 \, a b^{2} c^{2} d^{2} + 3 \, a^{2} b c d^{3} + a^{3} d^{4}\right )} x^{2}\right )} \sqrt {c d} \arctan \left (\frac {\sqrt {c d} x}{c}\right ) - 3 \, {\left (5 \, b^{3} c^{4} d - 9 \, a b^{2} c^{3} d^{2} + 3 \, a^{2} b c^{2} d^{3} - a^{3} c d^{4}\right )} x}{6 \, {\left (c^{2} d^{5} x^{2} + c^{3} d^{4}\right )}}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 314 vs.
\(2 (95) = 190\).
time = 0.57, size = 314, normalized size = 2.93 \begin {gather*} \frac {b^{3} x^{3}}{3 d^{2}} + x \left (\frac {3 a b^{2}}{d^{2}} - \frac {2 b^{3} c}{d^{3}}\right ) + \frac {x \left (a^{3} d^{3} - 3 a^{2} b c d^{2} + 3 a b^{2} c^{2} d - b^{3} c^{3}\right )}{2 c^{2} d^{3} + 2 c d^{4} x^{2}} - \frac {\sqrt {- \frac {1}{c^{3} d^{7}}} \left (a d - b c\right )^{2} \left (a d + 5 b c\right ) \log {\left (- \frac {c^{2} d^{3} \sqrt {- \frac {1}{c^{3} d^{7}}} \left (a d - b c\right )^{2} \left (a d + 5 b c\right )}{a^{3} d^{3} + 3 a^{2} b c d^{2} - 9 a b^{2} c^{2} d + 5 b^{3} c^{3}} + x \right )}}{4} + \frac {\sqrt {- \frac {1}{c^{3} d^{7}}} \left (a d - b c\right )^{2} \left (a d + 5 b c\right ) \log {\left (\frac {c^{2} d^{3} \sqrt {- \frac {1}{c^{3} d^{7}}} \left (a d - b c\right )^{2} \left (a d + 5 b c\right )}{a^{3} d^{3} + 3 a^{2} b c d^{2} - 9 a b^{2} c^{2} d + 5 b^{3} c^{3}} + x \right )}}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.95, size = 152, normalized size = 1.42 \begin {gather*} \frac {{\left (5 \, b^{3} c^{3} - 9 \, a b^{2} c^{2} d + 3 \, a^{2} b c d^{2} + a^{3} d^{3}\right )} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{2 \, \sqrt {c d} c d^{3}} - \frac {b^{3} c^{3} x - 3 \, a b^{2} c^{2} d x + 3 \, a^{2} b c d^{2} x - a^{3} d^{3} x}{2 \, {\left (d x^{2} + c\right )} c d^{3}} + \frac {b^{3} d^{4} x^{3} - 6 \, b^{3} c d^{3} x + 9 \, a b^{2} d^{4} x}{3 \, d^{6}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.10, size = 181, normalized size = 1.69 \begin {gather*} x\,\left (\frac {3\,a\,b^2}{d^2}-\frac {2\,b^3\,c}{d^3}\right )+\frac {b^3\,x^3}{3\,d^2}+\frac {x\,\left (a^3\,d^3-3\,a^2\,b\,c\,d^2+3\,a\,b^2\,c^2\,d-b^3\,c^3\right )}{2\,c\,\left (d^4\,x^2+c\,d^3\right )}+\frac {\mathrm {atan}\left (\frac {\sqrt {d}\,x\,{\left (a\,d-b\,c\right )}^2\,\left (a\,d+5\,b\,c\right )}{\sqrt {c}\,\left (a^3\,d^3+3\,a^2\,b\,c\,d^2-9\,a\,b^2\,c^2\,d+5\,b^3\,c^3\right )}\right )\,{\left (a\,d-b\,c\right )}^2\,\left (a\,d+5\,b\,c\right )}{2\,c^{3/2}\,d^{7/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________