Optimal. Leaf size=44 \[ -\frac {2 \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {a b x+(-a-b) x^2+x^3}}{(a-x)^2}\right )}{\sqrt {d}} \]
[Out]
________________________________________________________________________________________
Rubi [F]
time = 4.97, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps
used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {}
\begin {gather*} \int \frac {a^2 b-a (2 a-b) x-(-a+2 b) x^2+x^3}{\sqrt {x (-a+x) (-b+x)} \left (-a^3+\left (3 a^2+b d\right ) x-(3 a+d) x^2+x^3\right )} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
Rubi steps
\begin {align*} \int \frac {a^2 b-a (2 a-b) x-(-a+2 b) x^2+x^3}{\sqrt {x (-a+x) (-b+x)} \left (-a^3+\left (3 a^2+b d\right ) x-(3 a+d) x^2+x^3\right )} \, dx &=\frac {\left (\sqrt {x} \sqrt {-a+x} \sqrt {-b+x}\right ) \int \frac {a^2 b-a (2 a-b) x-(-a+2 b) x^2+x^3}{\sqrt {x} \sqrt {-a+x} \sqrt {-b+x} \left (-a^3+\left (3 a^2+b d\right ) x-(3 a+d) x^2+x^3\right )} \, dx}{\sqrt {x (-a+x) (-b+x)}}\\ &=\frac {\left (\sqrt {x} \sqrt {-a+x} \sqrt {-b+x}\right ) \int \frac {\sqrt {-a+x} \left (-a b+(2 a-2 b) x+x^2\right )}{\sqrt {x} \sqrt {-b+x} \left (-a^3+\left (3 a^2+b d\right ) x-(3 a+d) x^2+x^3\right )} \, dx}{\sqrt {x (-a+x) (-b+x)}}\\ &=\frac {\left (2 \sqrt {x} \sqrt {-a+x} \sqrt {-b+x}\right ) \text {Subst}\left (\int \frac {\sqrt {-a+x^2} \left (-a b+(2 a-2 b) x^2+x^4\right )}{\sqrt {-b+x^2} \left (-a^3+\left (3 a^2+b d\right ) x^2-(3 a+d) x^4+x^6\right )} \, dx,x,\sqrt {x}\right )}{\sqrt {x (-a+x) (-b+x)}}\\ &=\frac {\left (2 \sqrt {x} \sqrt {-a+x} \sqrt {-b+x}\right ) \text {Subst}\left (\int \left (\frac {a b \sqrt {-a+x^2}}{\sqrt {-b+x^2} \left (a^3-3 a^2 \left (1+\frac {b d}{3 a^2}\right ) x^2+3 a \left (1+\frac {d}{3 a}\right ) x^4-x^6\right )}+\frac {2 (-a+b) x^2 \sqrt {-a+x^2}}{\sqrt {-b+x^2} \left (a^3-3 a^2 \left (1+\frac {b d}{3 a^2}\right ) x^2+3 a \left (1+\frac {d}{3 a}\right ) x^4-x^6\right )}+\frac {x^4 \sqrt {-a+x^2}}{\sqrt {-b+x^2} \left (-a^3+3 a^2 \left (1+\frac {b d}{3 a^2}\right ) x^2-3 a \left (1+\frac {d}{3 a}\right ) x^4+x^6\right )}\right ) \, dx,x,\sqrt {x}\right )}{\sqrt {x (-a+x) (-b+x)}}\\ &=\frac {\left (2 \sqrt {x} \sqrt {-a+x} \sqrt {-b+x}\right ) \text {Subst}\left (\int \frac {x^4 \sqrt {-a+x^2}}{\sqrt {-b+x^2} \left (-a^3+3 a^2 \left (1+\frac {b d}{3 a^2}\right ) x^2-3 a \left (1+\frac {d}{3 a}\right ) x^4+x^6\right )} \, dx,x,\sqrt {x}\right )}{\sqrt {x (-a+x) (-b+x)}}-\frac {\left (4 (a-b) \sqrt {x} \sqrt {-a+x} \sqrt {-b+x}\right ) \text {Subst}\left (\int \frac {x^2 \sqrt {-a+x^2}}{\sqrt {-b+x^2} \left (a^3-3 a^2 \left (1+\frac {b d}{3 a^2}\right ) x^2+3 a \left (1+\frac {d}{3 a}\right ) x^4-x^6\right )} \, dx,x,\sqrt {x}\right )}{\sqrt {x (-a+x) (-b+x)}}+\frac {\left (2 a b \sqrt {x} \sqrt {-a+x} \sqrt {-b+x}\right ) \text {Subst}\left (\int \frac {\sqrt {-a+x^2}}{\sqrt {-b+x^2} \left (a^3-3 a^2 \left (1+\frac {b d}{3 a^2}\right ) x^2+3 a \left (1+\frac {d}{3 a}\right ) x^4-x^6\right )} \, dx,x,\sqrt {x}\right )}{\sqrt {x (-a+x) (-b+x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in
optimal.
time = 21.10, size = 2730, normalized size = 62.05 \begin {gather*} \text {Result too large to show} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.25, size = 370, normalized size = 8.41
method | result | size |
default | \(-\frac {2 a \sqrt {-\frac {-a +x}{a}}\, \sqrt {\frac {-b +x}{a -b}}\, \sqrt {\frac {x}{a}}\, \EllipticF \left (\sqrt {-\frac {-a +x}{a}}, \sqrt {\frac {a}{a -b}}\right )}{\sqrt {b x a -a \,x^{2}-b \,x^{2}+x^{3}}}-2 b \left (\munderset {\underline {\hspace {1.25 ex}}\alpha =\RootOf \left (\textit {\_Z}^{3}+\left (-3 a -d \right ) \textit {\_Z}^{2}+\left (3 a^{2}+b d \right ) \textit {\_Z} -a^{3}\right )}{\sum }\frac {\left (4 \underline {\hspace {1.25 ex}}\alpha ^{2} a -2 \underline {\hspace {1.25 ex}}\alpha ^{2} b +\underline {\hspace {1.25 ex}}\alpha ^{2} d -5 \underline {\hspace {1.25 ex}}\alpha \,a^{2}+\underline {\hspace {1.25 ex}}\alpha a b -\underline {\hspace {1.25 ex}}\alpha b d +a^{3}+a^{2} b \right ) \left (\underline {\hspace {1.25 ex}}\alpha ^{2}-3 \underline {\hspace {1.25 ex}}\alpha a +\underline {\hspace {1.25 ex}}\alpha b -\underline {\hspace {1.25 ex}}\alpha d +3 a^{2}-3 a b +b^{2}\right ) \sqrt {-\frac {-b +x}{b}}\, \sqrt {\frac {-a +x}{-a +b}}\, \sqrt {\frac {x}{b}}\, \EllipticPi \left (\sqrt {-\frac {-b +x}{b}}, -\frac {\left (\underline {\hspace {1.25 ex}}\alpha ^{2}-3 \underline {\hspace {1.25 ex}}\alpha a +\underline {\hspace {1.25 ex}}\alpha b -\underline {\hspace {1.25 ex}}\alpha d +3 a^{2}-3 a b +b^{2}\right ) b}{a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}}, \sqrt {\frac {b}{-a +b}}\right )}{\left (-3 \underline {\hspace {1.25 ex}}\alpha ^{2}+6 \underline {\hspace {1.25 ex}}\alpha a +2 \underline {\hspace {1.25 ex}}\alpha d -3 a^{2}-b d \right ) \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right ) \sqrt {x \left (a b -a x -b x +x^{2}\right )}}\right )\) | \(370\) |
elliptic | \(-\frac {2 b \sqrt {-\frac {-b +x}{b}}\, \sqrt {\frac {-a +x}{-a +b}}\, \sqrt {\frac {x}{b}}\, \EllipticF \left (\sqrt {-\frac {-b +x}{b}}, \sqrt {\frac {b}{-a +b}}\right )}{\sqrt {b x a -a \,x^{2}-b \,x^{2}+x^{3}}}+2 b \left (\munderset {\underline {\hspace {1.25 ex}}\alpha =\RootOf \left (\textit {\_Z}^{3}+\left (-3 a -d \right ) \textit {\_Z}^{2}+\left (3 a^{2}+b d \right ) \textit {\_Z} -a^{3}\right )}{\sum }\frac {\left (-4 \underline {\hspace {1.25 ex}}\alpha ^{2} a +2 \underline {\hspace {1.25 ex}}\alpha ^{2} b -\underline {\hspace {1.25 ex}}\alpha ^{2} d +5 \underline {\hspace {1.25 ex}}\alpha \,a^{2}-\underline {\hspace {1.25 ex}}\alpha a b +\underline {\hspace {1.25 ex}}\alpha b d -a^{3}-a^{2} b \right ) \left (\underline {\hspace {1.25 ex}}\alpha ^{2}-3 \underline {\hspace {1.25 ex}}\alpha a +\underline {\hspace {1.25 ex}}\alpha b -\underline {\hspace {1.25 ex}}\alpha d +3 a^{2}-3 a b +b^{2}\right ) \sqrt {-\frac {-b +x}{b}}\, \sqrt {\frac {-a +x}{-a +b}}\, \sqrt {\frac {x}{b}}\, \EllipticPi \left (\sqrt {-\frac {-b +x}{b}}, -\frac {\left (\underline {\hspace {1.25 ex}}\alpha ^{2}-3 \underline {\hspace {1.25 ex}}\alpha a +\underline {\hspace {1.25 ex}}\alpha b -\underline {\hspace {1.25 ex}}\alpha d +3 a^{2}-3 a b +b^{2}\right ) b}{a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}}, \sqrt {\frac {b}{-a +b}}\right )}{\left (-3 \underline {\hspace {1.25 ex}}\alpha ^{2}+6 \underline {\hspace {1.25 ex}}\alpha a +2 \underline {\hspace {1.25 ex}}\alpha d -3 a^{2}-b d \right ) \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right ) \sqrt {x \left (a b -a x -b x +x^{2}\right )}}\right )\) | \(374\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 108 vs.
\(2 (35) = 70\).
time = 0.58, size = 407, normalized size = 9.25 \begin {gather*} \left [\frac {\log \left (\frac {a^{6} - 6 \, {\left (a - d\right )} x^{5} + x^{6} + {\left (15 \, a^{2} - 6 \, {\left (3 \, a + b\right )} d + d^{2}\right )} x^{4} - 2 \, {\left (10 \, a^{3} + b d^{2} - 9 \, {\left (a^{2} + a b\right )} d\right )} x^{3} + {\left (15 \, a^{4} + b^{2} d^{2} - 6 \, {\left (a^{3} + 3 \, a^{2} b\right )} d\right )} x^{2} - 4 \, {\left (a^{4} - {\left (4 \, a - d\right )} x^{3} + x^{4} + {\left (6 \, a^{2} - {\left (a + b\right )} d\right )} x^{2} - {\left (4 \, a^{3} - a b d\right )} x\right )} \sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}} \sqrt {d} - 6 \, {\left (a^{5} - a^{3} b d\right )} x}{a^{6} - 2 \, {\left (3 \, a + d\right )} x^{5} + x^{6} + {\left (15 \, a^{2} + 2 \, {\left (3 \, a + b\right )} d + d^{2}\right )} x^{4} - 2 \, {\left (10 \, a^{3} + b d^{2} + 3 \, {\left (a^{2} + a b\right )} d\right )} x^{3} + {\left (15 \, a^{4} + b^{2} d^{2} + 2 \, {\left (a^{3} + 3 \, a^{2} b\right )} d\right )} x^{2} - 2 \, {\left (3 \, a^{5} + a^{3} b d\right )} x}\right )}{2 \, \sqrt {d}}, \frac {\sqrt {-d} \arctan \left (\frac {{\left (a^{3} + {\left (3 \, a - d\right )} x^{2} - x^{3} - {\left (3 \, a^{2} - b d\right )} x\right )} \sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}} \sqrt {-d}}{2 \, {\left (a^{2} b d x + {\left (2 \, a + b\right )} d x^{3} - d x^{4} - {\left (a^{2} + 2 \, a b\right )} d x^{2}\right )}}\right )}{d}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.69, size = 589, normalized size = 13.39 \begin {gather*} \left (\sum _{k=1}^3\frac {2\,b\,\sqrt {\frac {x}{b}}\,\sqrt {\frac {b-x}{b}}\,\sqrt {\frac {a-x}{a-b}}\,\Pi \left (-\frac {b}{\mathrm {root}\left (z^3-z^2\,\left (3\,a+d\right )+z\,\left (b\,d+3\,a^2\right )-a^3,z,k\right )-b};\mathrm {asin}\left (\sqrt {\frac {b-x}{b}}\right )\middle |-\frac {b}{a-b}\right )\,\left (a^2\,b+a^3+4\,a\,{\mathrm {root}\left (z^3-z^2\,\left (3\,a+d\right )+z\,\left (b\,d+3\,a^2\right )-a^3,z,k\right )}^2-5\,a^2\,\mathrm {root}\left (z^3-z^2\,\left (3\,a+d\right )+z\,\left (b\,d+3\,a^2\right )-a^3,z,k\right )-2\,b\,{\mathrm {root}\left (z^3-z^2\,\left (3\,a+d\right )+z\,\left (b\,d+3\,a^2\right )-a^3,z,k\right )}^2+d\,{\mathrm {root}\left (z^3-z^2\,\left (3\,a+d\right )+z\,\left (b\,d+3\,a^2\right )-a^3,z,k\right )}^2+a\,b\,\mathrm {root}\left (z^3-z^2\,\left (3\,a+d\right )+z\,\left (b\,d+3\,a^2\right )-a^3,z,k\right )-b\,d\,\mathrm {root}\left (z^3-z^2\,\left (3\,a+d\right )+z\,\left (b\,d+3\,a^2\right )-a^3,z,k\right )\right )}{\left (\mathrm {root}\left (z^3-z^2\,\left (3\,a+d\right )+z\,\left (b\,d+3\,a^2\right )-a^3,z,k\right )-b\right )\,\sqrt {x\,\left (a-x\right )\,\left (b-x\right )}\,\left (3\,a^2-6\,a\,\mathrm {root}\left (z^3-z^2\,\left (3\,a+d\right )+z\,\left (b\,d+3\,a^2\right )-a^3,z,k\right )+3\,{\mathrm {root}\left (z^3-z^2\,\left (3\,a+d\right )+z\,\left (b\,d+3\,a^2\right )-a^3,z,k\right )}^2-2\,d\,\mathrm {root}\left (z^3-z^2\,\left (3\,a+d\right )+z\,\left (b\,d+3\,a^2\right )-a^3,z,k\right )+b\,d\right )}\right )-\frac {2\,b\,\mathrm {F}\left (\mathrm {asin}\left (\sqrt {\frac {b-x}{b}}\right )\middle |-\frac {b}{a-b}\right )\,\sqrt {\frac {x}{b}}\,\sqrt {\frac {b-x}{b}}\,\sqrt {\frac {a-x}{a-b}}}{\sqrt {x^3+\left (-a-b\right )\,x^2+a\,b\,x}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________