Optimal. Leaf size=106 \[ \frac {d^2 (3 b c-2 a d) x}{b^3}+\frac {d^3 x^3}{3 b^2}+\frac {(b c-a d)^3 x}{2 a b^3 \left (a+b x^2\right )}+\frac {(b c-a d)^2 (b c+5 a d) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{3/2} b^{7/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 106, 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 {\text {ArcTan}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right ) (5 a d+b c) (b c-a d)^2}{2 a^{3/2} b^{7/2}}+\frac {d^2 x (3 b c-2 a d)}{b^3}+\frac {x (b c-a d)^3}{2 a b^3 \left (a+b x^2\right )}+\frac {d^3 x^3}{3 b^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 393
Rule 398
Rubi steps
\begin {align*} \int \frac {\left (c+d x^2\right )^3}{\left (a+b x^2\right )^2} \, dx &=\int \left (\frac {d^2 (3 b c-2 a d)}{b^3}+\frac {d^3 x^2}{b^2}+\frac {(b c-a d)^2 (b c+2 a d)+3 b d (b c-a d)^2 x^2}{b^3 \left (a+b x^2\right )^2}\right ) \, dx\\ &=\frac {d^2 (3 b c-2 a d) x}{b^3}+\frac {d^3 x^3}{3 b^2}+\frac {\int \frac {(b c-a d)^2 (b c+2 a d)+3 b d (b c-a d)^2 x^2}{\left (a+b x^2\right )^2} \, dx}{b^3}\\ &=\frac {d^2 (3 b c-2 a d) x}{b^3}+\frac {d^3 x^3}{3 b^2}+\frac {(b c-a d)^3 x}{2 a b^3 \left (a+b x^2\right )}+\frac {\left ((b c-a d)^2 (b c+5 a d)\right ) \int \frac {1}{a+b x^2} \, dx}{2 a b^3}\\ &=\frac {d^2 (3 b c-2 a d) x}{b^3}+\frac {d^3 x^3}{3 b^2}+\frac {(b c-a d)^3 x}{2 a b^3 \left (a+b x^2\right )}+\frac {(b c-a d)^2 (b c+5 a d) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{3/2} b^{7/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 106, normalized size = 1.00 \begin {gather*} \frac {d^2 (3 b c-2 a d) x}{b^3}+\frac {d^3 x^3}{3 b^2}+\frac {(b c-a d)^3 x}{2 a b^3 \left (a+b x^2\right )}+\frac {(b c-a d)^2 (b c+5 a d) \tan ^{-1}\left (\frac {\sqrt {b} x}{\sqrt {a}}\right )}{2 a^{3/2} b^{7/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 139, normalized size = 1.31
method | result | size |
default | \(-\frac {d^{2} \left (-\frac {1}{3} b d \,x^{3}+2 a d x -3 b c x \right )}{b^{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 a \left (b \,x^{2}+a \right )}+\frac {\left (5 a^{3} d^{3}-9 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d +b^{3} c^{3}\right ) \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 a \sqrt {a b}}}{b^{3}}\) | \(139\) |
risch | \(\frac {d^{3} x^{3}}{3 b^{2}}-\frac {2 d^{3} a x}{b^{3}}+\frac {3 d^{2} c x}{b^{2}}-\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 a \,b^{3} \left (b \,x^{2}+a \right )}-\frac {5 a^{2} \ln \left (b x +\sqrt {-a b}\right ) d^{3}}{4 b^{3} \sqrt {-a b}}+\frac {9 a \ln \left (b x +\sqrt {-a b}\right ) c \,d^{2}}{4 b^{2} \sqrt {-a b}}-\frac {3 \ln \left (b x +\sqrt {-a b}\right ) c^{2} d}{4 b \sqrt {-a b}}-\frac {\ln \left (b x +\sqrt {-a b}\right ) c^{3}}{4 \sqrt {-a b}\, a}+\frac {5 a^{2} \ln \left (-b x +\sqrt {-a b}\right ) d^{3}}{4 b^{3} \sqrt {-a b}}-\frac {9 a \ln \left (-b x +\sqrt {-a b}\right ) c \,d^{2}}{4 b^{2} \sqrt {-a b}}+\frac {3 \ln \left (-b x +\sqrt {-a b}\right ) c^{2} d}{4 b \sqrt {-a b}}+\frac {\ln \left (-b x +\sqrt {-a b}\right ) c^{3}}{4 \sqrt {-a b}\, a}\) | \(303\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.50, size = 147, normalized size = 1.39 \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 (a b^{4} x^{2} + a^{2} b^{3}\right )}} + \frac {b d^{3} x^{3} + 3 \, {\left (3 \, b c d^{2} - 2 \, a d^{3}\right )} x}{3 \, b^{3}} + \frac {{\left (b^{3} c^{3} + 3 \, a b^{2} c^{2} d - 9 \, a^{2} b c d^{2} + 5 \, a^{3} d^{3}\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a b^{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. 211 vs.
\(2 (92) = 184\).
time = 0.81, size = 442, normalized size = 4.17 \begin {gather*} \left [\frac {4 \, a^{2} b^{3} d^{3} x^{5} + 4 \, {\left (9 \, a^{2} b^{3} c d^{2} - 5 \, a^{3} b^{2} d^{3}\right )} x^{3} - 3 \, {\left (a b^{3} c^{3} + 3 \, a^{2} b^{2} c^{2} d - 9 \, a^{3} b c d^{2} + 5 \, a^{4} d^{3} + {\left (b^{4} c^{3} + 3 \, a b^{3} c^{2} d - 9 \, a^{2} b^{2} c d^{2} + 5 \, a^{3} b d^{3}\right )} x^{2}\right )} \sqrt {-a b} \log \left (\frac {b x^{2} - 2 \, \sqrt {-a b} x - a}{b x^{2} + a}\right ) + 6 \, {\left (a b^{4} c^{3} - 3 \, a^{2} b^{3} c^{2} d + 9 \, a^{3} b^{2} c d^{2} - 5 \, a^{4} b d^{3}\right )} x}{12 \, {\left (a^{2} b^{5} x^{2} + a^{3} b^{4}\right )}}, \frac {2 \, a^{2} b^{3} d^{3} x^{5} + 2 \, {\left (9 \, a^{2} b^{3} c d^{2} - 5 \, a^{3} b^{2} d^{3}\right )} x^{3} + 3 \, {\left (a b^{3} c^{3} + 3 \, a^{2} b^{2} c^{2} d - 9 \, a^{3} b c d^{2} + 5 \, a^{4} d^{3} + {\left (b^{4} c^{3} + 3 \, a b^{3} c^{2} d - 9 \, a^{2} b^{2} c d^{2} + 5 \, a^{3} b d^{3}\right )} x^{2}\right )} \sqrt {a b} \arctan \left (\frac {\sqrt {a b} x}{a}\right ) + 3 \, {\left (a b^{4} c^{3} - 3 \, a^{2} b^{3} c^{2} d + 9 \, a^{3} b^{2} c d^{2} - 5 \, a^{4} b d^{3}\right )} x}{6 \, {\left (a^{2} b^{5} x^{2} + a^{3} b^{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.59, size = 314, normalized size = 2.96 \begin {gather*} x \left (- \frac {2 a d^{3}}{b^{3}} + \frac {3 c d^{2}}{b^{2}}\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 a^{2} b^{3} + 2 a b^{4} x^{2}} - \frac {\sqrt {- \frac {1}{a^{3} b^{7}}} \left (a d - b c\right )^{2} \cdot \left (5 a d + b c\right ) \log {\left (- \frac {a^{2} b^{3} \sqrt {- \frac {1}{a^{3} b^{7}}} \left (a d - b c\right )^{2} \cdot \left (5 a d + b c\right )}{5 a^{3} d^{3} - 9 a^{2} b c d^{2} + 3 a b^{2} c^{2} d + b^{3} c^{3}} + x \right )}}{4} + \frac {\sqrt {- \frac {1}{a^{3} b^{7}}} \left (a d - b c\right )^{2} \cdot \left (5 a d + b c\right ) \log {\left (\frac {a^{2} b^{3} \sqrt {- \frac {1}{a^{3} b^{7}}} \left (a d - b c\right )^{2} \cdot \left (5 a d + b c\right )}{5 a^{3} d^{3} - 9 a^{2} b c d^{2} + 3 a b^{2} c^{2} d + b^{3} c^{3}} + x \right )}}{4} + \frac {d^{3} x^{3}}{3 b^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.12, size = 152, normalized size = 1.43 \begin {gather*} \frac {{\left (b^{3} c^{3} + 3 \, a b^{2} c^{2} d - 9 \, a^{2} b c d^{2} + 5 \, a^{3} d^{3}\right )} \arctan \left (\frac {b x}{\sqrt {a b}}\right )}{2 \, \sqrt {a b} a b^{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 (b x^{2} + a\right )} a b^{3}} + \frac {b^{4} d^{3} x^{3} + 9 \, b^{4} c d^{2} x - 6 \, a b^{3} d^{3} x}{3 \, b^{6}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.10, size = 182, normalized size = 1.72 \begin {gather*} \frac {d^3\,x^3}{3\,b^2}-x\,\left (\frac {2\,a\,d^3}{b^3}-\frac {3\,c\,d^2}{b^2}\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\,a\,\left (b^4\,x^2+a\,b^3\right )}+\frac {\mathrm {atan}\left (\frac {\sqrt {b}\,x\,{\left (a\,d-b\,c\right )}^2\,\left (5\,a\,d+b\,c\right )}{\sqrt {a}\,\left (5\,a^3\,d^3-9\,a^2\,b\,c\,d^2+3\,a\,b^2\,c^2\,d+b^3\,c^3\right )}\right )\,{\left (a\,d-b\,c\right )}^2\,\left (5\,a\,d+b\,c\right )}{2\,a^{3/2}\,b^{7/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________