Optimal. Leaf size=130 \[ \frac {b^3 x}{d^3}-\frac {(b c-a d)^3 x}{4 c d^3 \left (c+d x^2\right )^2}+\frac {3 (b c-a d)^2 (3 b c+a d) x}{8 c^2 d^3 \left (c+d x^2\right )}-\frac {3 (b c-a d) \left (4 b^2 c^2+(b c+a d)^2\right ) \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{8 c^{5/2} d^{7/2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 130, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.210, Rules used = {398, 1171, 393,
211} \begin {gather*} -\frac {3 (b c-a d) \left ((a d+b c)^2+4 b^2 c^2\right ) \text {ArcTan}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{8 c^{5/2} d^{7/2}}+\frac {3 x (b c-a d)^2 (a d+3 b c)}{8 c^2 d^3 \left (c+d x^2\right )}-\frac {x (b c-a d)^3}{4 c d^3 \left (c+d x^2\right )^2}+\frac {b^3 x}{d^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 211
Rule 393
Rule 398
Rule 1171
Rubi steps
\begin {align*} \int \frac {\left (a+b x^2\right )^3}{\left (c+d x^2\right )^3} \, dx &=\int \left (\frac {b^3}{d^3}-\frac {b^3 c^3-a^3 d^3+3 b d (b c-a d) (b c+a d) x^2+3 b^2 d^2 (b c-a d) x^4}{d^3 \left (c+d x^2\right )^3}\right ) \, dx\\ &=\frac {b^3 x}{d^3}-\frac {\int \frac {b^3 c^3-a^3 d^3+3 b d (b c-a d) (b c+a d) x^2+3 b^2 d^2 (b c-a d) x^4}{\left (c+d x^2\right )^3} \, dx}{d^3}\\ &=\frac {b^3 x}{d^3}-\frac {(b c-a d)^3 x}{4 c d^3 \left (c+d x^2\right )^2}+\frac {\int \frac {-3 (b c-a d) (b c+a d)^2-12 b^2 c d (b c-a d) x^2}{\left (c+d x^2\right )^2} \, dx}{4 c d^3}\\ &=\frac {b^3 x}{d^3}-\frac {(b c-a d)^3 x}{4 c d^3 \left (c+d x^2\right )^2}+\frac {3 (b c-a d)^2 (3 b c+a d) x}{8 c^2 d^3 \left (c+d x^2\right )}-\frac {\left (3 (b c-a d) \left (4 b^2 c^2+(b c+a d)^2\right )\right ) \int \frac {1}{c+d x^2} \, dx}{8 c^2 d^3}\\ &=\frac {b^3 x}{d^3}-\frac {(b c-a d)^3 x}{4 c d^3 \left (c+d x^2\right )^2}+\frac {3 (b c-a d)^2 (3 b c+a d) x}{8 c^2 d^3 \left (c+d x^2\right )}-\frac {3 (b c-a d) \left (4 b^2 c^2+(b c+a d)^2\right ) \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{8 c^{5/2} d^{7/2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 141, normalized size = 1.08 \begin {gather*} \frac {b^3 x}{d^3}-\frac {(b c-a d)^3 x}{4 c d^3 \left (c+d x^2\right )^2}+\frac {3 (b c-a d)^2 (3 b c+a d) x}{8 c^2 d^3 \left (c+d x^2\right )}-\frac {3 \left (5 b^3 c^3-3 a b^2 c^2 d-a^2 b c d^2-a^3 d^3\right ) \tan ^{-1}\left (\frac {\sqrt {d} x}{\sqrt {c}}\right )}{8 c^{5/2} d^{7/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 167, normalized size = 1.28
method | result | size |
default | \(\frac {b^{3} x}{d^{3}}+\frac {\frac {\frac {3 d \left (a^{3} d^{3}+a^{2} b c \,d^{2}-5 a \,b^{2} c^{2} d +3 b^{3} c^{3}\right ) x^{3}}{8 c^{2}}+\frac {\left (5 a^{3} d^{3}-3 a^{2} b c \,d^{2}-9 a \,b^{2} c^{2} d +7 b^{3} c^{3}\right ) x}{8 c}}{\left (d \,x^{2}+c \right )^{2}}+\frac {3 \left (a^{3} d^{3}+a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -5 b^{3} c^{3}\right ) \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{8 c^{2} \sqrt {c d}}}{d^{3}}\) | \(167\) |
risch | \(\frac {b^{3} x}{d^{3}}+\frac {\frac {3 d \left (a^{3} d^{3}+a^{2} b c \,d^{2}-5 a \,b^{2} c^{2} d +3 b^{3} c^{3}\right ) x^{3}}{8 c^{2}}+\frac {\left (5 a^{3} d^{3}-3 a^{2} b c \,d^{2}-9 a \,b^{2} c^{2} d +7 b^{3} c^{3}\right ) x}{8 c}}{d^{3} \left (d \,x^{2}+c \right )^{2}}-\frac {3 \ln \left (d x +\sqrt {-c d}\right ) a^{3}}{16 \sqrt {-c d}\, c^{2}}-\frac {3 \ln \left (d x +\sqrt {-c d}\right ) a^{2} b}{16 d \sqrt {-c d}\, c}-\frac {9 \ln \left (d x +\sqrt {-c d}\right ) a \,b^{2}}{16 d^{2} \sqrt {-c d}}+\frac {15 c \ln \left (d x +\sqrt {-c d}\right ) b^{3}}{16 d^{3} \sqrt {-c d}}+\frac {3 \ln \left (-d x +\sqrt {-c d}\right ) a^{3}}{16 \sqrt {-c d}\, c^{2}}+\frac {3 \ln \left (-d x +\sqrt {-c d}\right ) a^{2} b}{16 d \sqrt {-c d}\, c}+\frac {9 \ln \left (-d x +\sqrt {-c d}\right ) a \,b^{2}}{16 d^{2} \sqrt {-c d}}-\frac {15 c \ln \left (-d x +\sqrt {-c d}\right ) b^{3}}{16 d^{3} \sqrt {-c d}}\) | \(327\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.52, size = 187, normalized size = 1.44 \begin {gather*} \frac {b^{3} x}{d^{3}} + \frac {3 \, {\left (3 \, b^{3} c^{3} d - 5 \, a b^{2} c^{2} d^{2} + a^{2} b c d^{3} + a^{3} d^{4}\right )} x^{3} + {\left (7 \, b^{3} c^{4} - 9 \, a b^{2} c^{3} d - 3 \, a^{2} b c^{2} d^{2} + 5 \, a^{3} c d^{3}\right )} x}{8 \, {\left (c^{2} d^{5} x^{4} + 2 \, c^{3} d^{4} x^{2} + c^{4} d^{3}\right )}} - \frac {3 \, {\left (5 \, b^{3} c^{3} - 3 \, a b^{2} c^{2} d - a^{2} b c d^{2} - a^{3} d^{3}\right )} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{8 \, \sqrt {c d} c^{2} 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. 298 vs.
\(2 (116) = 232\).
time = 0.47, size = 618, normalized size = 4.75 \begin {gather*} \left [\frac {16 \, b^{3} c^{3} d^{3} x^{5} + 2 \, {\left (25 \, b^{3} c^{4} d^{2} - 15 \, a b^{2} c^{3} d^{3} + 3 \, a^{2} b c^{2} d^{4} + 3 \, a^{3} c d^{5}\right )} x^{3} + 3 \, {\left (5 \, b^{3} c^{5} - 3 \, a b^{2} c^{4} d - a^{2} b c^{3} d^{2} - a^{3} c^{2} d^{3} + {\left (5 \, b^{3} c^{3} d^{2} - 3 \, a b^{2} c^{2} d^{3} - a^{2} b c d^{4} - a^{3} d^{5}\right )} x^{4} + 2 \, {\left (5 \, b^{3} c^{4} d - 3 \, a b^{2} c^{3} d^{2} - a^{2} b c^{2} d^{3} - a^{3} c 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 ) + 2 \, {\left (15 \, b^{3} c^{5} d - 9 \, a b^{2} c^{4} d^{2} - 3 \, a^{2} b c^{3} d^{3} + 5 \, a^{3} c^{2} d^{4}\right )} x}{16 \, {\left (c^{3} d^{6} x^{4} + 2 \, c^{4} d^{5} x^{2} + c^{5} d^{4}\right )}}, \frac {8 \, b^{3} c^{3} d^{3} x^{5} + {\left (25 \, b^{3} c^{4} d^{2} - 15 \, a b^{2} c^{3} d^{3} + 3 \, a^{2} b c^{2} d^{4} + 3 \, a^{3} c d^{5}\right )} x^{3} - 3 \, {\left (5 \, b^{3} c^{5} - 3 \, a b^{2} c^{4} d - a^{2} b c^{3} d^{2} - a^{3} c^{2} d^{3} + {\left (5 \, b^{3} c^{3} d^{2} - 3 \, a b^{2} c^{2} d^{3} - a^{2} b c d^{4} - a^{3} d^{5}\right )} x^{4} + 2 \, {\left (5 \, b^{3} c^{4} d - 3 \, a b^{2} c^{3} d^{2} - a^{2} b c^{2} d^{3} - a^{3} c d^{4}\right )} x^{2}\right )} \sqrt {c d} \arctan \left (\frac {\sqrt {c d} x}{c}\right ) + {\left (15 \, b^{3} c^{5} d - 9 \, a b^{2} c^{4} d^{2} - 3 \, a^{2} b c^{3} d^{3} + 5 \, a^{3} c^{2} d^{4}\right )} x}{8 \, {\left (c^{3} d^{6} x^{4} + 2 \, c^{4} d^{5} x^{2} + c^{5} 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. 422 vs.
\(2 (122) = 244\).
time = 1.00, size = 422, normalized size = 3.25 \begin {gather*} \frac {b^{3} x}{d^{3}} - \frac {3 \sqrt {- \frac {1}{c^{5} d^{7}}} \left (a d - b c\right ) \left (a^{2} d^{2} + 2 a b c d + 5 b^{2} c^{2}\right ) \log {\left (- \frac {3 c^{3} d^{3} \sqrt {- \frac {1}{c^{5} d^{7}}} \left (a d - b c\right ) \left (a^{2} d^{2} + 2 a b c d + 5 b^{2} c^{2}\right )}{3 a^{3} d^{3} + 3 a^{2} b c d^{2} + 9 a b^{2} c^{2} d - 15 b^{3} c^{3}} + x \right )}}{16} + \frac {3 \sqrt {- \frac {1}{c^{5} d^{7}}} \left (a d - b c\right ) \left (a^{2} d^{2} + 2 a b c d + 5 b^{2} c^{2}\right ) \log {\left (\frac {3 c^{3} d^{3} \sqrt {- \frac {1}{c^{5} d^{7}}} \left (a d - b c\right ) \left (a^{2} d^{2} + 2 a b c d + 5 b^{2} c^{2}\right )}{3 a^{3} d^{3} + 3 a^{2} b c d^{2} + 9 a b^{2} c^{2} d - 15 b^{3} c^{3}} + x \right )}}{16} + \frac {x^{3} \cdot \left (3 a^{3} d^{4} + 3 a^{2} b c d^{3} - 15 a b^{2} c^{2} d^{2} + 9 b^{3} c^{3} d\right ) + x \left (5 a^{3} c d^{3} - 3 a^{2} b c^{2} d^{2} - 9 a b^{2} c^{3} d + 7 b^{3} c^{4}\right )}{8 c^{4} d^{3} + 16 c^{3} d^{4} x^{2} + 8 c^{2} d^{5} x^{4}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 1.23, size = 180, normalized size = 1.38 \begin {gather*} \frac {b^{3} x}{d^{3}} - \frac {3 \, {\left (5 \, b^{3} c^{3} - 3 \, a b^{2} c^{2} d - a^{2} b c d^{2} - a^{3} d^{3}\right )} \arctan \left (\frac {d x}{\sqrt {c d}}\right )}{8 \, \sqrt {c d} c^{2} d^{3}} + \frac {9 \, b^{3} c^{3} d x^{3} - 15 \, a b^{2} c^{2} d^{2} x^{3} + 3 \, a^{2} b c d^{3} x^{3} + 3 \, a^{3} d^{4} x^{3} + 7 \, b^{3} c^{4} x - 9 \, a b^{2} c^{3} d x - 3 \, a^{2} b c^{2} d^{2} x + 5 \, a^{3} c d^{3} x}{8 \, {\left (d x^{2} + c\right )}^{2} c^{2} d^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 4.96, size = 240, normalized size = 1.85 \begin {gather*} \frac {\frac {x\,\left (5\,a^3\,d^3-3\,a^2\,b\,c\,d^2-9\,a\,b^2\,c^2\,d+7\,b^3\,c^3\right )}{8\,c}+\frac {3\,x^3\,\left (a^3\,d^4+a^2\,b\,c\,d^3-5\,a\,b^2\,c^2\,d^2+3\,b^3\,c^3\,d\right )}{8\,c^2}}{c^2\,d^3+2\,c\,d^4\,x^2+d^5\,x^4}+\frac {b^3\,x}{d^3}+\frac {3\,\mathrm {atan}\left (\frac {\sqrt {d}\,x\,\left (a\,d-b\,c\right )\,\left (a^2\,d^2+2\,a\,b\,c\,d+5\,b^2\,c^2\right )}{\sqrt {c}\,\left (a^3\,d^3+a^2\,b\,c\,d^2+3\,a\,b^2\,c^2\,d-5\,b^3\,c^3\right )}\right )\,\left (a\,d-b\,c\right )\,\left (a^2\,d^2+2\,a\,b\,c\,d+5\,b^2\,c^2\right )}{8\,c^{5/2}\,d^{7/2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________