Optimal. Leaf size=63 \[ -\frac {b (b c-2 a d) x}{d^2}+\frac {b^2 x^3}{3 d}+\frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{\sqrt {c} d^{5/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 63, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {398, 211}
\begin {gather*} \frac {(b c-a d)^2 \text {ArcTan}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{\sqrt {c} d^{5/2}}-\frac {b x (b c-2 a d)}{d^2}+\frac {b^2 x^3}{3 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 398
Rubi steps
\begin {align*} \int \frac {\left (a+b x^2\right )^2}{c+d x^2} \, dx &=\int \left (-\frac {b (b c-2 a d)}{d^2}+\frac {b^2 x^2}{d}+\frac {b^2 c^2-2 a b c d+a^2 d^2}{d^2 \left (c+d x^2\right )}\right ) \, dx\\ &=-\frac {b (b c-2 a d) x}{d^2}+\frac {b^2 x^3}{3 d}+\frac {(b c-a d)^2 \int \frac {1}{c+d x^2} \, dx}{d^2}\\ &=-\frac {b (b c-2 a d) x}{d^2}+\frac {b^2 x^3}{3 d}+\frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{\sqrt {c} d^{5/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.04, size = 59, normalized size = 0.94 \begin {gather*} \frac {b x \left (-3 b c+6 a d+b d x^2\right )}{3 d^2}+\frac {(b c-a d)^2 \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{\sqrt {c} d^{5/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.08, size = 64, normalized size = 1.02
method | result | size |
default | \(\frac {b \left (\frac {1}{3} b d \,x^{3}+2 a d x -b c x \right )}{d^{2}}+\frac {\left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{d^{2} \sqrt {c d}}\) | \(64\) |
risch | \(\frac {b^{2} x^{3}}{3 d}+\frac {2 b a x}{d}-\frac {b^{2} c x}{d^{2}}-\frac {\ln \left (d x +\sqrt {-c d}\right ) a^{2}}{2 \sqrt {-c d}}+\frac {\ln \left (d x +\sqrt {-c d}\right ) a b c}{d \sqrt {-c d}}-\frac {\ln \left (d x +\sqrt {-c d}\right ) b^{2} c^{2}}{2 d^{2} \sqrt {-c d}}+\frac {\ln \left (-d x +\sqrt {-c d}\right ) a^{2}}{2 \sqrt {-c d}}-\frac {\ln \left (-d x +\sqrt {-c d}\right ) a b c}{d \sqrt {-c d}}+\frac {\ln \left (-d x +\sqrt {-c d}\right ) b^{2} c^{2}}{2 d^{2} \sqrt {-c d}}\) | \(183\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.52, size = 68, normalized size = 1.08 \begin {gather*} \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{\sqrt {c d} d^{2}} + \frac {b^{2} d x^{3} - 3 \, {\left (b^{2} c - 2 \, a b d\right )} x}{3 \, d^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.95, size = 179, normalized size = 2.84 \begin {gather*} \left [\frac {2 \, b^{2} c d^{2} x^{3} - 3 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {-c d} \log \left (\frac {d x^{2} - 2 \, \sqrt {-c d} x - c}{d x^{2} + c}\right ) - 6 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2}\right )} x}{6 \, c d^{3}}, \frac {b^{2} c d^{2} x^{3} + 3 \, {\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {c d} \arctan \left (\frac {\sqrt {c d} x}{c}\right ) - 3 \, {\left (b^{2} c^{2} d - 2 \, a b c d^{2}\right )} x}{3 \, c d^{3}}\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. 172 vs.
\(2 (56) = 112\).
time = 0.22, size = 172, normalized size = 2.73 \begin {gather*} \frac {b^{2} x^{3}}{3 d} + x \left (\frac {2 a b}{d} - \frac {b^{2} c}{d^{2}}\right ) - \frac {\sqrt {- \frac {1}{c d^{5}}} \left (a d - b c\right )^{2} \log {\left (- \frac {c d^{2} \sqrt {- \frac {1}{c d^{5}}} \left (a d - b c\right )^{2}}{a^{2} d^{2} - 2 a b c d + b^{2} c^{2}} + x \right )}}{2} + \frac {\sqrt {- \frac {1}{c d^{5}}} \left (a d - b c\right )^{2} \log {\left (\frac {c d^{2} \sqrt {- \frac {1}{c d^{5}}} \left (a d - b c\right )^{2}}{a^{2} d^{2} - 2 a b c d + b^{2} c^{2}} + x \right )}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.77, size = 72, normalized size = 1.14 \begin {gather*} \frac {{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{\sqrt {c d} d^{2}} + \frac {b^{2} d^{2} x^{3} - 3 \, b^{2} c d x + 6 \, a b d^{2} x}{3 \, d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.09, size = 90, normalized size = 1.43 \begin {gather*} \frac {b^2\,x^3}{3\,d}-x\,\left (\frac {b^2\,c}{d^2}-\frac {2\,a\,b}{d}\right )+\frac {\mathrm {atan}\left (\frac {\sqrt {d}\,x\,{\left (a\,d-b\,c\right )}^2}{\sqrt {c}\,\left (a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2\right )}\right )\,{\left (a\,d-b\,c\right )}^2}{\sqrt {c}\,d^{5/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________