Optimal. Leaf size=80 \[ 2 \sqrt {d} \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {x^2 (-a-b)+a b x+x^3}}{a-x}\right )+\frac {2 \sqrt {x^2 (-a-b)+a b x+x^3}}{x (x-b)} \]
________________________________________________________________________________________
Rubi [F] time = 12.22, 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-3 a x^2+x^3}{x (-b+x) \sqrt {x (-a+x) (-b+x)} \left (a-(1+b d) x+d x^2\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-3 a x^2+x^3}{x (-b+x) \sqrt {x (-a+x) (-b+x)} \left (a-(1+b d) x+d x^2\right )} \, dx &=\int \frac {\sqrt {(a-x) (b-x) x} \left (a b-2 a x+x^2\right )}{(b-x)^2 x^2 \left (a-(1+b d) x+d x^2\right )} \, dx\\ &=\frac {\sqrt {(a-x) (b-x) x} \int \frac {\sqrt {a-x} \left (a b-2 a x+x^2\right )}{(b-x)^{3/2} x^{3/2} \left (a-(1+b d) x+d x^2\right )} \, dx}{\sqrt {a-x} \sqrt {b-x} \sqrt {x}}\\ &=\frac {\sqrt {(a-x) (b-x) x} \int \left (\frac {\sqrt {a-x}}{d (b-x)^{3/2} x^{3/2}}-\frac {\sqrt {a-x} (a-a b d-(1-2 a d+b d) x)}{d (b-x)^{3/2} x^{3/2} \left (a+(-1-b d) x+d x^2\right )}\right ) \, dx}{\sqrt {a-x} \sqrt {b-x} \sqrt {x}}\\ &=\frac {\sqrt {(a-x) (b-x) x} \int \frac {\sqrt {a-x}}{(b-x)^{3/2} x^{3/2}} \, dx}{d \sqrt {a-x} \sqrt {b-x} \sqrt {x}}-\frac {\sqrt {(a-x) (b-x) x} \int \frac {\sqrt {a-x} (a-a b d-(1-2 a d+b d) x)}{(b-x)^{3/2} x^{3/2} \left (a+(-1-b d) x+d x^2\right )} \, dx}{d \sqrt {a-x} \sqrt {b-x} \sqrt {x}}\\ &=\frac {2 \sqrt {(a-x) (b-x) x}}{b d (b-x) x}-\frac {\sqrt {(a-x) (b-x) x} \int \left (\frac {\left (-1+2 a d-b d-\sqrt {-4 a d+(1+b d)^2}\right ) \sqrt {a-x}}{(b-x)^{3/2} x^{3/2} \left (-1-b d-\sqrt {1-4 a d+2 b d+b^2 d^2}+2 d x\right )}+\frac {\left (-1+2 a d-b d+\sqrt {-4 a d+(1+b d)^2}\right ) \sqrt {a-x}}{(b-x)^{3/2} x^{3/2} \left (-1-b d+\sqrt {1-4 a d+2 b d+b^2 d^2}+2 d x\right )}\right ) \, dx}{d \sqrt {a-x} \sqrt {b-x} \sqrt {x}}-\frac {\left (2 \sqrt {(a-x) (b-x) x}\right ) \int \frac {-a+\frac {x}{2}}{\sqrt {a-x} \sqrt {b-x} x^{3/2}} \, dx}{b d \sqrt {a-x} \sqrt {b-x} \sqrt {x}}\\ &=-\frac {4 \sqrt {(a-x) (b-x) x}}{b^2 d x}+\frac {2 \sqrt {(a-x) (b-x) x}}{b d (b-x) x}+\frac {\left (4 \sqrt {(a-x) (b-x) x}\right ) \int \frac {-\frac {a b}{4}+\frac {a x}{2}}{\sqrt {a-x} \sqrt {b-x} \sqrt {x}} \, dx}{a b^2 d \sqrt {a-x} \sqrt {b-x} \sqrt {x}}-\frac {\left (\left (-1+2 a d-b d-\sqrt {-4 a d+(1+b d)^2}\right ) \sqrt {(a-x) (b-x) x}\right ) \int \frac {\sqrt {a-x}}{(b-x)^{3/2} x^{3/2} \left (-1-b d-\sqrt {1-4 a d+2 b d+b^2 d^2}+2 d x\right )} \, dx}{d \sqrt {a-x} \sqrt {b-x} \sqrt {x}}-\frac {\left (\left (-1+2 a d-b d+\sqrt {-4 a d+(1+b d)^2}\right ) \sqrt {(a-x) (b-x) x}\right ) \int \frac {\sqrt {a-x}}{(b-x)^{3/2} x^{3/2} \left (-1-b d+\sqrt {1-4 a d+2 b d+b^2 d^2}+2 d x\right )} \, dx}{d \sqrt {a-x} \sqrt {b-x} \sqrt {x}}\\ &=-\frac {4 \sqrt {(a-x) (b-x) x}}{b^2 d x}+\frac {2 \sqrt {(a-x) (b-x) x}}{b d (b-x) x}-\frac {\left (2 \sqrt {(a-x) (b-x) x}\right ) \int \frac {\sqrt {b-x}}{\sqrt {a-x} \sqrt {x}} \, dx}{b^2 d \sqrt {a-x} \sqrt {b-x} \sqrt {x}}+\frac {\sqrt {(a-x) (b-x) x} \int \frac {1}{\sqrt {a-x} \sqrt {b-x} \sqrt {x}} \, dx}{b d \sqrt {a-x} \sqrt {b-x} \sqrt {x}}-\frac {\left (\left (-1+2 a d-b d-\sqrt {-4 a d+(1+b d)^2}\right ) \sqrt {(a-x) (b-x) x}\right ) \int \frac {\sqrt {a-x}}{(b-x)^{3/2} x^{3/2} \left (-1-b d-\sqrt {1-4 a d+2 b d+b^2 d^2}+2 d x\right )} \, dx}{d \sqrt {a-x} \sqrt {b-x} \sqrt {x}}-\frac {\left (\left (-1+2 a d-b d+\sqrt {-4 a d+(1+b d)^2}\right ) \sqrt {(a-x) (b-x) x}\right ) \int \frac {\sqrt {a-x}}{(b-x)^{3/2} x^{3/2} \left (-1-b d+\sqrt {1-4 a d+2 b d+b^2 d^2}+2 d x\right )} \, dx}{d \sqrt {a-x} \sqrt {b-x} \sqrt {x}}\\ &=-\frac {4 \sqrt {(a-x) (b-x) x}}{b^2 d x}+\frac {2 \sqrt {(a-x) (b-x) x}}{b d (b-x) x}-\frac {\left (\left (-1+2 a d-b d-\sqrt {-4 a d+(1+b d)^2}\right ) \sqrt {(a-x) (b-x) x}\right ) \int \frac {\sqrt {a-x}}{(b-x)^{3/2} x^{3/2} \left (-1-b d-\sqrt {1-4 a d+2 b d+b^2 d^2}+2 d x\right )} \, dx}{d \sqrt {a-x} \sqrt {b-x} \sqrt {x}}-\frac {\left (\left (-1+2 a d-b d+\sqrt {-4 a d+(1+b d)^2}\right ) \sqrt {(a-x) (b-x) x}\right ) \int \frac {\sqrt {a-x}}{(b-x)^{3/2} x^{3/2} \left (-1-b d+\sqrt {1-4 a d+2 b d+b^2 d^2}+2 d x\right )} \, dx}{d \sqrt {a-x} \sqrt {b-x} \sqrt {x}}-\frac {\left (2 \sqrt {(a-x) (b-x) x} \sqrt {1-\frac {x}{a}}\right ) \int \frac {\sqrt {1-\frac {x}{b}}}{\sqrt {x} \sqrt {1-\frac {x}{a}}} \, dx}{b^2 d (a-x) \sqrt {x} \sqrt {1-\frac {x}{b}}}+\frac {\left (\sqrt {(a-x) (b-x) 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}{b d (a-x) (b-x) \sqrt {x}}\\ &=-\frac {4 \sqrt {(a-x) (b-x) x}}{b^2 d x}+\frac {2 \sqrt {(a-x) (b-x) x}}{b d (b-x) x}-\frac {4 \sqrt {a} \sqrt {(a-x) (b-x) x} \sqrt {1-\frac {x}{a}} E\left (\sin ^{-1}\left (\frac {\sqrt {x}}{\sqrt {a}}\right )|\frac {a}{b}\right )}{b^2 d (a-x) \sqrt {x} \sqrt {1-\frac {x}{b}}}+\frac {2 \sqrt {a} \sqrt {(a-x) (b-x) 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 )}{b d (a-x) (b-x) \sqrt {x}}-\frac {\left (\left (-1+2 a d-b d-\sqrt {-4 a d+(1+b d)^2}\right ) \sqrt {(a-x) (b-x) x}\right ) \int \frac {\sqrt {a-x}}{(b-x)^{3/2} x^{3/2} \left (-1-b d-\sqrt {1-4 a d+2 b d+b^2 d^2}+2 d x\right )} \, dx}{d \sqrt {a-x} \sqrt {b-x} \sqrt {x}}-\frac {\left (\left (-1+2 a d-b d+\sqrt {-4 a d+(1+b d)^2}\right ) \sqrt {(a-x) (b-x) x}\right ) \int \frac {\sqrt {a-x}}{(b-x)^{3/2} x^{3/2} \left (-1-b d+\sqrt {1-4 a d+2 b d+b^2 d^2}+2 d x\right )} \, dx}{d \sqrt {a-x} \sqrt {b-x} \sqrt {x}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 4.76, size = 277, normalized size = 3.46 \begin {gather*} \frac {2 (x-a) \left (i \sqrt {\frac {x}{a}} \sqrt {\frac {x-b}{a-b}} \Pi \left (\frac {2 a d}{2 a d-b d+\sqrt {(b d+1)^2-4 a d}-1};i \sinh ^{-1}\left (\sqrt {\frac {x}{a}-1}\right )|\frac {a}{a-b}\right )+i \sqrt {\frac {x}{a}} \sqrt {\frac {x-b}{a-b}} \Pi \left (-\frac {2 a d}{-2 a d+b d+\sqrt {(b d+1)^2-4 a d}+1};i \sinh ^{-1}\left (\sqrt {\frac {x}{a}-1}\right )|\frac {a}{a-b}\right )-i \sqrt {\frac {x}{a}} \sqrt {\frac {x-b}{a-b}} F\left (i \sinh ^{-1}\left (\sqrt {\frac {x}{a}-1}\right )|\frac {a}{a-b}\right )+\sqrt {\frac {x}{a}-1}\right )}{\sqrt {\frac {x}{a}-1} \sqrt {x (x-a) (x-b)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [A] time = 1.18, size = 80, normalized size = 1.00 \begin {gather*} 2 \sqrt {d} \tanh ^{-1}\left (\frac {\sqrt {d} \sqrt {x^2 (-a-b)+a b x+x^3}}{a-x}\right )+\frac {2 \sqrt {x^2 (-a-b)+a b x+x^3}}{x (x-b)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.85, size = 312, normalized size = 3.90 \begin {gather*} \left [\frac {{\left (b x - x^{2}\right )} \sqrt {d} \log \left (\frac {d^{2} x^{4} - 2 \, {\left (b d^{2} - 3 \, d\right )} x^{3} + {\left (b^{2} d^{2} - 6 \, {\left (a + b\right )} d + 1\right )} x^{2} + a^{2} - 4 \, \sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}} {\left (d x^{2} - {\left (b d - 1\right )} x - a\right )} \sqrt {d} + 2 \, {\left (3 \, a b d - a\right )} x}{d^{2} x^{4} - 2 \, {\left (b d^{2} + d\right )} x^{3} + {\left (b^{2} d^{2} + 2 \, {\left (a + b\right )} d + 1\right )} x^{2} + a^{2} - 2 \, {\left (a b d + a\right )} x}\right ) - 4 \, \sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}}}{2 \, {\left (b x - x^{2}\right )}}, \frac {{\left (b x - x^{2}\right )} \sqrt {-d} \arctan \left (\frac {\sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}} {\left (d x^{2} - {\left (b d - 1\right )} x - a\right )} \sqrt {-d}}{2 \, {\left (a b d x - {\left (a + b\right )} d x^{2} + d x^{3}\right )}}\right ) - 2 \, \sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}}}{b x - x^{2}}\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^{2} b - {\left (2 \, a + b\right )} a x + 3 \, a x^{2} - x^{3}}{\sqrt {{\left (a - x\right )} {\left (b - x\right )} x} {\left (d x^{2} - {\left (b d + 1\right )} x + a\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.03, size = 2958, normalized size = 36.98 \begin {gather*} \text {output too large to display} \end {gather*}
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*} \int \frac {a^{2} b - {\left (2 \, a + b\right )} a x + 3 \, a x^{2} - x^{3}}{\sqrt {{\left (a - x\right )} {\left (b - x\right )} x} {\left (d x^{2} - {\left (b d + 1\right )} x + a\right )} {\left (b - x\right )} x}\,{d x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.87, size = 628, normalized size = 7.85 \begin {gather*} \frac {2\,a\,\left (\frac {\mathrm {E}\left (\mathrm {asin}\left (\sqrt {\frac {b-x}{b}}\right )\middle |-\frac {b}{a-b}\right )-\frac {\sqrt {\frac {b-x}{a-b}+1}\,\sqrt {\frac {b-x}{b}}}{\sqrt {1-\frac {b-x}{b}}}}{\frac {b}{a-b}+1}-\mathrm {F}\left (\mathrm {asin}\left (\sqrt {\frac {b-x}{b}}\right )\middle |-\frac {b}{a-b}\right )\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}}+\frac {b\,\sqrt {\frac {x}{b}}\,\sqrt {\frac {b-x}{b}}\,\sqrt {\frac {a-x}{a-b}}\,\Pi \left (\frac {b}{b-\frac {b\,d-\sqrt {b^2\,d^2+2\,b\,d-4\,a\,d+1}+1}{2\,d}};\mathrm {asin}\left (\sqrt {\frac {b-x}{b}}\right )\middle |-\frac {b}{a-b}\right )\,\left (2\,a\,d-b\,d+\sqrt {b^2\,d^2+2\,b\,d-4\,a\,d+1}-1\right )}{d\,\left (b-\frac {b\,d-\sqrt {b^2\,d^2+2\,b\,d-4\,a\,d+1}+1}{2\,d}\right )\,\sqrt {x^3+\left (-a-b\right )\,x^2+a\,b\,x}}+\frac {2\,a\,\left (a-b\right )\,\sqrt {\frac {x}{a}}\,\left (\mathrm {E}\left (\mathrm {asin}\left (\sqrt {\frac {x}{a}}\right )\middle |\frac {a}{b}\right )-\frac {a\,\sin \left (2\,\mathrm {asin}\left (\sqrt {\frac {x}{a}}\right )\right )}{2\,b\,\sqrt {1-\frac {x}{b}}}\right )\,\sqrt {\frac {a-x}{a}}\,\sqrt {\frac {b-x}{b}}}{b\,\left (\frac {a}{b}-1\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 {b\,d+\sqrt {b^2\,d^2+2\,b\,d-4\,a\,d+1}+1}{2\,d}};\mathrm {asin}\left (\sqrt {\frac {b-x}{b}}\right )\middle |-\frac {b}{a-b}\right )\,\left (b\,d-2\,a\,d+\sqrt {b^2\,d^2+2\,b\,d-4\,a\,d+1}+1\right )}{d\,\left (b-\frac {b\,d+\sqrt {b^2\,d^2+2\,b\,d-4\,a\,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]
________________________________________________________________________________________