Optimal. Leaf size=38 \[ \frac {2 \tanh ^{-1}\left (\frac {x}{\sqrt {d} \sqrt {x^2 (-a-b)+a b x+x^3}}\right )}{\sqrt {d}} \]
________________________________________________________________________________________
Rubi [C] time = 8.70, antiderivative size = 308, normalized size of antiderivative = 8.11, number of steps used = 15, number of rules used = 7, integrand size = 49, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {6718, 6728, 117, 116, 169, 538, 537} \begin {gather*} \frac {2 \sqrt {a} \sqrt {x} \sqrt {1-\frac {x}{a}} \sqrt {1-\frac {x}{b}} \Pi \left (\frac {2 a d}{a d+b d-\sqrt {a^2 d^2+2 a (1-b d) d+(b d+1)^2}+1};\sin ^{-1}\left (\frac {\sqrt {x}}{\sqrt {a}}\right )|\frac {a}{b}\right )}{d \sqrt {x (a-x) (b-x)}}+\frac {2 \sqrt {a} \sqrt {x} \sqrt {1-\frac {x}{a}} \sqrt {1-\frac {x}{b}} \Pi \left (\frac {2 a d}{a d+b d+\sqrt {a^2 d^2+2 a (1-b d) d+(b d+1)^2}+1};\sin ^{-1}\left (\frac {\sqrt {x}}{\sqrt {a}}\right )|\frac {a}{b}\right )}{d \sqrt {x (a-x) (b-x)}}-\frac {2 \sqrt {a} \sqrt {x} \sqrt {1-\frac {x}{a}} \sqrt {1-\frac {x}{b}} F\left (\sin ^{-1}\left (\frac {\sqrt {x}}{\sqrt {a}}\right )|\frac {a}{b}\right )}{d \sqrt {x (a-x) (b-x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 116
Rule 117
Rule 169
Rule 537
Rule 538
Rule 6718
Rule 6728
Rubi steps
\begin {align*} \int \frac {a b-x^2}{\sqrt {x (-a+x) (-b+x)} \left (a b d-(1+a d+b d) x+d x^2\right )} \, dx &=\frac {\left (\sqrt {x} \sqrt {-a+x} \sqrt {-b+x}\right ) \int \frac {a b-x^2}{\sqrt {x} \sqrt {-a+x} \sqrt {-b+x} \left (a b d-(1+a d+b d) x+d x^2\right )} \, dx}{\sqrt {x (-a+x) (-b+x)}}\\ &=\frac {\left (\sqrt {x} \sqrt {-a+x} \sqrt {-b+x}\right ) \int \left (-\frac {1}{d \sqrt {x} \sqrt {-a+x} \sqrt {-b+x}}+\frac {2 a b d-(1+a d+b d) x}{d \sqrt {x} \sqrt {-a+x} \sqrt {-b+x} \left (a b d+(-1-a d-b d) x+d x^2\right )}\right ) \, dx}{\sqrt {x (-a+x) (-b+x)}}\\ &=-\frac {\left (\sqrt {x} \sqrt {-a+x} \sqrt {-b+x}\right ) \int \frac {1}{\sqrt {x} \sqrt {-a+x} \sqrt {-b+x}} \, dx}{d \sqrt {x (-a+x) (-b+x)}}+\frac {\left (\sqrt {x} \sqrt {-a+x} \sqrt {-b+x}\right ) \int \frac {2 a b d-(1+a d+b d) x}{\sqrt {x} \sqrt {-a+x} \sqrt {-b+x} \left (a b d+(-1-a d-b d) x+d x^2\right )} \, dx}{d \sqrt {x (-a+x) (-b+x)}}\\ &=\frac {\left (\sqrt {x} \sqrt {-a+x} \sqrt {-b+x}\right ) \int \left (\frac {-1-a d-b d-\sqrt {1+2 a d+2 b d+a^2 d^2-2 a b d^2+b^2 d^2}}{\sqrt {x} \sqrt {-a+x} \sqrt {-b+x} \left (-1-a d-b d-\sqrt {1+2 a d+2 b d+a^2 d^2-2 a b d^2+b^2 d^2}+2 d x\right )}+\frac {-1-a d-b d+\sqrt {1+2 a d+2 b d+a^2 d^2-2 a b d^2+b^2 d^2}}{\sqrt {x} \sqrt {-a+x} \sqrt {-b+x} \left (-1-a d-b d+\sqrt {1+2 a d+2 b d+a^2 d^2-2 a b d^2+b^2 d^2}+2 d x\right )}\right ) \, dx}{d \sqrt {x (-a+x) (-b+x)}}-\frac {\left (\sqrt {x} \sqrt {1-\frac {x}{a}} \sqrt {1-\frac {x}{b}}\right ) \int \frac {1}{\sqrt {x} \sqrt {1-\frac {x}{a}} \sqrt {1-\frac {x}{b}}} \, dx}{d \sqrt {x (-a+x) (-b+x)}}\\ &=-\frac {2 \sqrt {a} \sqrt {x} \sqrt {1-\frac {x}{a}} \sqrt {1-\frac {x}{b}} F\left (\sin ^{-1}\left (\frac {\sqrt {x}}{\sqrt {a}}\right )|\frac {a}{b}\right )}{d \sqrt {(a-x) (b-x) x}}+\frac {\left (\left (-1-a d-b d-\sqrt {a^2 d^2+2 a d (1-b d)+(1+b d)^2}\right ) \sqrt {x} \sqrt {-a+x} \sqrt {-b+x}\right ) \int \frac {1}{\sqrt {x} \sqrt {-a+x} \sqrt {-b+x} \left (-1-a d-b d-\sqrt {1+2 a d+2 b d+a^2 d^2-2 a b d^2+b^2 d^2}+2 d x\right )} \, dx}{d \sqrt {x (-a+x) (-b+x)}}+\frac {\left (\left (-1-a d-b d+\sqrt {a^2 d^2+2 a d (1-b d)+(1+b d)^2}\right ) \sqrt {x} \sqrt {-a+x} \sqrt {-b+x}\right ) \int \frac {1}{\sqrt {x} \sqrt {-a+x} \sqrt {-b+x} \left (-1-a d-b d+\sqrt {1+2 a d+2 b d+a^2 d^2-2 a b d^2+b^2 d^2}+2 d x\right )} \, dx}{d \sqrt {x (-a+x) (-b+x)}}\\ &=-\frac {2 \sqrt {a} \sqrt {x} \sqrt {1-\frac {x}{a}} \sqrt {1-\frac {x}{b}} F\left (\sin ^{-1}\left (\frac {\sqrt {x}}{\sqrt {a}}\right )|\frac {a}{b}\right )}{d \sqrt {(a-x) (b-x) x}}-\frac {\left (2 \left (-1-a d-b d-\sqrt {a^2 d^2+2 a d (1-b d)+(1+b d)^2}\right ) \sqrt {x} \sqrt {-a+x} \sqrt {-b+x}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {-a+x^2} \sqrt {-b+x^2} \left (1+a d+b d+\sqrt {a^2 d^2+2 a d (1-b d)+(1+b d)^2}-2 d x^2\right )} \, dx,x,\sqrt {x}\right )}{d \sqrt {x (-a+x) (-b+x)}}-\frac {\left (2 \left (-1-a d-b d+\sqrt {a^2 d^2+2 a d (1-b d)+(1+b d)^2}\right ) \sqrt {x} \sqrt {-a+x} \sqrt {-b+x}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {-a+x^2} \sqrt {-b+x^2} \left (1+a d+b d-\sqrt {a^2 d^2+2 a d (1-b d)+(1+b d)^2}-2 d x^2\right )} \, dx,x,\sqrt {x}\right )}{d \sqrt {x (-a+x) (-b+x)}}\\ &=-\frac {2 \sqrt {a} \sqrt {x} \sqrt {1-\frac {x}{a}} \sqrt {1-\frac {x}{b}} F\left (\sin ^{-1}\left (\frac {\sqrt {x}}{\sqrt {a}}\right )|\frac {a}{b}\right )}{d \sqrt {(a-x) (b-x) x}}-\frac {\left (2 \left (-1-a d-b d-\sqrt {a^2 d^2+2 a d (1-b d)+(1+b d)^2}\right ) \sqrt {x} \sqrt {-b+x} \sqrt {1-\frac {x}{a}}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {-b+x^2} \sqrt {1-\frac {x^2}{a}} \left (1+a d+b d+\sqrt {a^2 d^2+2 a d (1-b d)+(1+b d)^2}-2 d x^2\right )} \, dx,x,\sqrt {x}\right )}{d \sqrt {x (-a+x) (-b+x)}}-\frac {\left (2 \left (-1-a d-b d+\sqrt {a^2 d^2+2 a d (1-b d)+(1+b d)^2}\right ) \sqrt {x} \sqrt {-b+x} \sqrt {1-\frac {x}{a}}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {-b+x^2} \sqrt {1-\frac {x^2}{a}} \left (1+a d+b d-\sqrt {a^2 d^2+2 a d (1-b d)+(1+b d)^2}-2 d x^2\right )} \, dx,x,\sqrt {x}\right )}{d \sqrt {x (-a+x) (-b+x)}}\\ &=-\frac {2 \sqrt {a} \sqrt {x} \sqrt {1-\frac {x}{a}} \sqrt {1-\frac {x}{b}} F\left (\sin ^{-1}\left (\frac {\sqrt {x}}{\sqrt {a}}\right )|\frac {a}{b}\right )}{d \sqrt {(a-x) (b-x) x}}-\frac {\left (2 \left (-1-a d-b d-\sqrt {a^2 d^2+2 a d (1-b d)+(1+b d)^2}\right ) \sqrt {x} \sqrt {1-\frac {x}{a}} \sqrt {1-\frac {x}{b}}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {1-\frac {x^2}{a}} \sqrt {1-\frac {x^2}{b}} \left (1+a d+b d+\sqrt {a^2 d^2+2 a d (1-b d)+(1+b d)^2}-2 d x^2\right )} \, dx,x,\sqrt {x}\right )}{d \sqrt {x (-a+x) (-b+x)}}-\frac {\left (2 \left (-1-a d-b d+\sqrt {a^2 d^2+2 a d (1-b d)+(1+b d)^2}\right ) \sqrt {x} \sqrt {1-\frac {x}{a}} \sqrt {1-\frac {x}{b}}\right ) \operatorname {Subst}\left (\int \frac {1}{\sqrt {1-\frac {x^2}{a}} \sqrt {1-\frac {x^2}{b}} \left (1+a d+b d-\sqrt {a^2 d^2+2 a d (1-b d)+(1+b d)^2}-2 d x^2\right )} \, dx,x,\sqrt {x}\right )}{d \sqrt {x (-a+x) (-b+x)}}\\ &=-\frac {2 \sqrt {a} \sqrt {x} \sqrt {1-\frac {x}{a}} \sqrt {1-\frac {x}{b}} F\left (\sin ^{-1}\left (\frac {\sqrt {x}}{\sqrt {a}}\right )|\frac {a}{b}\right )}{d \sqrt {(a-x) (b-x) x}}+\frac {2 \sqrt {a} \sqrt {x} \sqrt {1-\frac {x}{a}} \sqrt {1-\frac {x}{b}} \Pi \left (\frac {2 a d}{1+a d+b d-\sqrt {a^2 d^2+2 a d (1-b d)+(1+b d)^2}};\sin ^{-1}\left (\frac {\sqrt {x}}{\sqrt {a}}\right )|\frac {a}{b}\right )}{d \sqrt {(a-x) (b-x) x}}+\frac {2 \sqrt {a} \sqrt {x} \sqrt {1-\frac {x}{a}} \sqrt {1-\frac {x}{b}} \Pi \left (\frac {2 a d}{1+a d+b d+\sqrt {a^2 d^2+2 a d (1-b d)+(1+b d)^2}};\sin ^{-1}\left (\frac {\sqrt {x}}{\sqrt {a}}\right )|\frac {a}{b}\right )}{d \sqrt {(a-x) (b-x) x}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 5.77, size = 210, normalized size = 5.53 \begin {gather*} \frac {2 i x^{3/2} \sqrt {1-\frac {a}{x}} \sqrt {1-\frac {b}{x}} \left (-\Pi \left (\frac {2 b d}{a d+b d-\sqrt {(a d+b d+1)^2-4 a b d^2}+1};i \sinh ^{-1}\left (\frac {\sqrt {-a}}{\sqrt {x}}\right )|\frac {b}{a}\right )-\Pi \left (\frac {2 b d}{a d+b d+\sqrt {(a d+b d+1)^2-4 a b d^2}+1};i \sinh ^{-1}\left (\frac {\sqrt {-a}}{\sqrt {x}}\right )|\frac {b}{a}\right )+F\left (i \sinh ^{-1}\left (\frac {\sqrt {-a}}{\sqrt {x}}\right )|\frac {b}{a}\right )\right )}{\sqrt {-a} d \sqrt {x (x-a) (x-b)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 0.19, size = 38, normalized size = 1.00 \begin {gather*} \frac {2 \tanh ^{-1}\left (\frac {x}{\sqrt {d} \sqrt {a b x+(-a-b) x^2+x^3}}\right )}{\sqrt {d}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.86, size = 299, normalized size = 7.87 \begin {gather*} \left [\frac {\log \left (\frac {a^{2} b^{2} d^{2} + d^{2} x^{4} - 2 \, {\left ({\left (a + b\right )} d^{2} - 3 \, d\right )} x^{3} + {\left ({\left (a^{2} + 4 \, a b + b^{2}\right )} d^{2} - 6 \, {\left (a + b\right )} d + 1\right )} x^{2} + 4 \, {\left (a b d + d x^{2} - {\left ({\left (a + b\right )} d - 1\right )} x\right )} \sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}} \sqrt {d} + 2 \, {\left (3 \, a b d - {\left (a^{2} b + a b^{2}\right )} d^{2}\right )} x}{a^{2} b^{2} d^{2} + d^{2} x^{4} - 2 \, {\left ({\left (a + b\right )} d^{2} + d\right )} x^{3} + {\left ({\left (a^{2} + 4 \, a b + b^{2}\right )} d^{2} + 2 \, {\left (a + b\right )} d + 1\right )} x^{2} - 2 \, {\left (a b d + {\left (a^{2} b + a b^{2}\right )} d^{2}\right )} x}\right )}{2 \, \sqrt {d}}, -\frac {\sqrt {-d} \arctan \left (\frac {{\left (a b d + d x^{2} - {\left ({\left (a + b\right )} d - 1\right )} x\right )} \sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}} \sqrt {-d}}{2 \, {\left (a b d x - {\left (a + b\right )} d x^{2} + d x^{3}\right )}}\right )}{d}\right ] \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*} \int \frac {a b - x^{2}}{{\left (a b d + d x^{2} - {\left (a d + b d + 1\right )} x\right )} \sqrt {{\left (a - x\right )} {\left (b - x\right )} x}}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.32, size = 4000, normalized size = 105.26
method | result | size |
default | \(\text {Expression too large to display}\) | \(4000\) |
elliptic | \(\text {Expression too large to display}\) | \(4018\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.35, size = 531, normalized size = 13.97 \begin {gather*} \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}}}{d\,\sqrt {x^3+\left (-a-b\right )\,x^2+a\,b\,x}}+\frac {b\,\sqrt {\frac {x}{b}}\,\sqrt {\frac {b-x}{b}}\,\sqrt {\frac {a-x}{a-b}}\,\Pi \left (\frac {b}{b-\frac {a\,d+b\,d+\sqrt {a^2\,d^2-2\,a\,b\,d^2+2\,a\,d+b^2\,d^2+2\,b\,d+1}+1}{2\,d}};\mathrm {asin}\left (\sqrt {\frac {b-x}{b}}\right )\middle |-\frac {b}{a-b}\right )\,\left (a\,d+b\,d+\sqrt {a^2\,d^2-2\,a\,b\,d^2+2\,a\,d+b^2\,d^2+2\,b\,d+1}+1\right )}{d^2\,\left (b-\frac {a\,d+b\,d+\sqrt {a^2\,d^2-2\,a\,b\,d^2+2\,a\,d+b^2\,d^2+2\,b\,d+1}+1}{2\,d}\right )\,\sqrt {x^3+\left (-a-b\right )\,x^2+a\,b\,x}}+\frac {b\,\sqrt {\frac {x}{b}}\,\sqrt {\frac {b-x}{b}}\,\sqrt {\frac {a-x}{a-b}}\,\Pi \left (\frac {b}{b-\frac {a\,d+b\,d-\sqrt {a^2\,d^2-2\,a\,b\,d^2+2\,a\,d+b^2\,d^2+2\,b\,d+1}+1}{2\,d}};\mathrm {asin}\left (\sqrt {\frac {b-x}{b}}\right )\middle |-\frac {b}{a-b}\right )\,\left (a\,d+b\,d-\sqrt {a^2\,d^2-2\,a\,b\,d^2+2\,a\,d+b^2\,d^2+2\,b\,d+1}+1\right )}{d^2\,\left (b-\frac {a\,d+b\,d-\sqrt {a^2\,d^2-2\,a\,b\,d^2+2\,a\,d+b^2\,d^2+2\,b\,d+1}+1}{2\,d}\right )\,\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]
________________________________________________________________________________________
sympy [F(-1)] 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]
________________________________________________________________________________________