Integrand size = 82, antiderivative size = 77 \[ \int \frac {(-a+x) (-b+x) \left (-a b+x^2\right )}{\sqrt {x (-a+x) (-b+x)} \left (a^2 b^2-2 a b (a+b) x+\left (a^2+4 a b+b^2-d\right ) x^2-2 (a+b) x^3+x^4\right )} \, dx=-\frac {\arctan \left (\frac {\sqrt [4]{d} x}{\sqrt {a b x+(-a-b) x^2+x^3}}\right )}{\sqrt [4]{d}}-\frac {\text {arctanh}\left (\frac {\sqrt [4]{d} x}{\sqrt {a b x+(-a-b) x^2+x^3}}\right )}{\sqrt [4]{d}} \]
[Out]
\[ \int \frac {(-a+x) (-b+x) \left (-a b+x^2\right )}{\sqrt {x (-a+x) (-b+x)} \left (a^2 b^2-2 a b (a+b) x+\left (a^2+4 a b+b^2-d\right ) x^2-2 (a+b) x^3+x^4\right )} \, dx=\int \frac {(-a+x) (-b+x) \left (-a b+x^2\right )}{\sqrt {x (-a+x) (-b+x)} \left (a^2 b^2-2 a b (a+b) x+\left (a^2+4 a b+b^2-d\right ) x^2-2 (a+b) x^3+x^4\right )} \, dx \]
[In]
[Out]
Rubi steps \begin{align*} \text {integral}& = \frac {\left (\sqrt {x} \sqrt {-a+x} \sqrt {-b+x}\right ) \int \frac {\sqrt {-a+x} \sqrt {-b+x} \left (-a b+x^2\right )}{\sqrt {x} \left (a^2 b^2-2 a b (a+b) x+\left (a^2+4 a b+b^2-d\right ) x^2-2 (a+b) x^3+x^4\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} \sqrt {-b+x^2} \left (-a b+x^4\right )}{a^2 b^2-2 a b (a+b) x^2+\left (a^2+4 a b+b^2-d\right ) x^4-2 (a+b) x^6+x^8} \, 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}}{-a^2 b^2+2 a^2 b \left (1+\frac {b}{a}\right ) x^2-a^2 \left (1+\frac {4 a b+b^2-d}{a^2}\right ) x^4+2 a \left (1+\frac {b}{a}\right ) x^6-x^8}+\frac {x^4 \sqrt {-a+x^2} \sqrt {-b+x^2}}{a^2 b^2-2 a^2 b \left (1+\frac {b}{a}\right ) x^2+a^2 \left (1+\frac {4 a b+b^2-d}{a^2}\right ) x^4-2 a \left (1+\frac {b}{a}\right ) x^6+x^8}\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}}{a^2 b^2-2 a^2 b \left (1+\frac {b}{a}\right ) x^2+a^2 \left (1+\frac {4 a b+b^2-d}{a^2}\right ) x^4-2 a \left (1+\frac {b}{a}\right ) x^6+x^8} \, 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}}{-a^2 b^2+2 a^2 b \left (1+\frac {b}{a}\right ) x^2-a^2 \left (1+\frac {4 a b+b^2-d}{a^2}\right ) x^4+2 a \left (1+\frac {b}{a}\right ) x^6-x^8} \, 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}}{a^2 \left (b-x^2\right )^2-2 a \left (-b x+x^3\right )^2+x^4 \left (b^2-d-2 b x^2+x^4\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}}{-a^2 \left (b-x^2\right )^2+2 a \left (-b x+x^3\right )^2-x^4 \left (b^2-d-2 b x^2+x^4\right )} \, dx,x,\sqrt {x}\right )}{\sqrt {x (-a+x) (-b+x)}} \\ \end{align*}
Time = 9.36 (sec) , antiderivative size = 56, normalized size of antiderivative = 0.73 \[ \int \frac {(-a+x) (-b+x) \left (-a b+x^2\right )}{\sqrt {x (-a+x) (-b+x)} \left (a^2 b^2-2 a b (a+b) x+\left (a^2+4 a b+b^2-d\right ) x^2-2 (a+b) x^3+x^4\right )} \, dx=-\frac {\arctan \left (\frac {\sqrt [4]{d} x}{\sqrt {x (-a+x) (-b+x)}}\right )+\text {arctanh}\left (\frac {\sqrt [4]{d} x}{\sqrt {x (-a+x) (-b+x)}}\right )}{\sqrt [4]{d}} \]
[In]
[Out]
Time = 1.54 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.99
method | result | size |
default | \(-\frac {-2 \arctan \left (\frac {\sqrt {x \left (a -x \right ) \left (b -x \right )}}{x \,d^{\frac {1}{4}}}\right )+\ln \left (\frac {d^{\frac {1}{4}} x +\sqrt {x \left (a -x \right ) \left (b -x \right )}}{-d^{\frac {1}{4}} x +\sqrt {x \left (a -x \right ) \left (b -x \right )}}\right )}{2 d^{\frac {1}{4}}}\) | \(76\) |
pseudoelliptic | \(\frac {2 \arctan \left (\frac {\sqrt {x \left (a -x \right ) \left (b -x \right )}}{x \,d^{\frac {1}{4}}}\right )-\ln \left (\frac {d^{\frac {1}{4}} x +\sqrt {x \left (a -x \right ) \left (b -x \right )}}{-d^{\frac {1}{4}} x +\sqrt {x \left (a -x \right ) \left (b -x \right )}}\right )}{2 d^{\frac {1}{4}}}\) | \(78\) |
elliptic | \(-\frac {2 b \sqrt {-\frac {-b +x}{b}}\, \sqrt {\frac {-a +x}{-a +b}}\, \sqrt {\frac {x}{b}}\, \operatorname {EllipticF}\left (\sqrt {-\frac {-b +x}{b}}, \sqrt {\frac {b}{-a +b}}\right )}{\sqrt {a b x -a \,x^{2}-b \,x^{2}+x^{3}}}-\frac {\munderset {\underline {\hspace {1.25 ex}}\alpha =\operatorname {RootOf}\left (\textit {\_Z}^{4}+\left (-2 a -2 b \right ) \textit {\_Z}^{3}+\left (a^{2}+4 a b +b^{2}-d \right ) \textit {\_Z}^{2}+\left (-2 a^{2} b -2 a \,b^{2}\right ) \textit {\_Z} +a^{2} b^{2}\right )}{\sum }\frac {\left (-\underline {\hspace {1.25 ex}}\alpha ^{3} a -\underline {\hspace {1.25 ex}}\alpha ^{3} b +\underline {\hspace {1.25 ex}}\alpha ^{2} a^{2}+4 \underline {\hspace {1.25 ex}}\alpha ^{2} a b +\underline {\hspace {1.25 ex}}\alpha ^{2} b^{2}-3 \underline {\hspace {1.25 ex}}\alpha \,a^{2} b -3 \underline {\hspace {1.25 ex}}\alpha a \,b^{2}+2 a^{2} b^{2}-\underline {\hspace {1.25 ex}}\alpha ^{2} d \right ) \left (-\underline {\hspace {1.25 ex}}\alpha ^{3}+2 \underline {\hspace {1.25 ex}}\alpha ^{2} a +\underline {\hspace {1.25 ex}}\alpha ^{2} b -\underline {\hspace {1.25 ex}}\alpha \,a^{2}-2 a b \underline {\hspace {1.25 ex}}\alpha +a^{2} b +\underline {\hspace {1.25 ex}}\alpha d +d b \right ) \sqrt {-\frac {-b +x}{b}}\, \sqrt {\frac {-a +x}{-a +b}}\, \sqrt {\frac {x}{b}}\, \operatorname {EllipticPi}\left (\sqrt {-\frac {-b +x}{b}}, \frac {-\underline {\hspace {1.25 ex}}\alpha ^{3}+2 \underline {\hspace {1.25 ex}}\alpha ^{2} a +\underline {\hspace {1.25 ex}}\alpha ^{2} b -\underline {\hspace {1.25 ex}}\alpha \,a^{2}-2 a b \underline {\hspace {1.25 ex}}\alpha +a^{2} b +\underline {\hspace {1.25 ex}}\alpha d +d b}{d b}, \sqrt {\frac {b}{-a +b}}\right )}{\left (-2 \underline {\hspace {1.25 ex}}\alpha ^{3}+3 \underline {\hspace {1.25 ex}}\alpha ^{2} a +3 \underline {\hspace {1.25 ex}}\alpha ^{2} b -\underline {\hspace {1.25 ex}}\alpha \,a^{2}-4 a b \underline {\hspace {1.25 ex}}\alpha -\underline {\hspace {1.25 ex}}\alpha \,b^{2}+a^{2} b +a \,b^{2}+\underline {\hspace {1.25 ex}}\alpha d \right ) \sqrt {x \left (a b -a x -b x +x^{2}\right )}}}{b d}\) | \(427\) |
[In]
[Out]
Result contains complex when optimal does not.
Time = 0.46 (sec) , antiderivative size = 731, normalized size of antiderivative = 9.49 \[ \int \frac {(-a+x) (-b+x) \left (-a b+x^2\right )}{\sqrt {x (-a+x) (-b+x)} \left (a^2 b^2-2 a b (a+b) x+\left (a^2+4 a b+b^2-d\right ) x^2-2 (a+b) x^3+x^4\right )} \, dx=-\frac {\log \left (\frac {a^{2} b^{2} - 2 \, {\left (a + b\right )} x^{3} + x^{4} + {\left (a^{2} + 4 \, a b + b^{2} + d\right )} x^{2} - 2 \, {\left (a^{2} b + a b^{2}\right )} x + 2 \, \sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}} {\left (d^{\frac {3}{4}} x + \frac {a b d - {\left (a + b\right )} d x + d x^{2}}{d^{\frac {3}{4}}}\right )} + \frac {2 \, {\left (a b d x - {\left (a + b\right )} d x^{2} + d x^{3}\right )}}{\sqrt {d}}}{a^{2} b^{2} - 2 \, {\left (a + b\right )} x^{3} + x^{4} + {\left (a^{2} + 4 \, a b + b^{2} - d\right )} x^{2} - 2 \, {\left (a^{2} b + a b^{2}\right )} x}\right )}{4 \, d^{\frac {1}{4}}} + \frac {\log \left (\frac {a^{2} b^{2} - 2 \, {\left (a + b\right )} x^{3} + x^{4} + {\left (a^{2} + 4 \, a b + b^{2} + d\right )} x^{2} - 2 \, {\left (a^{2} b + a b^{2}\right )} x - 2 \, \sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}} {\left (d^{\frac {3}{4}} x + \frac {a b d - {\left (a + b\right )} d x + d x^{2}}{d^{\frac {3}{4}}}\right )} + \frac {2 \, {\left (a b d x - {\left (a + b\right )} d x^{2} + d x^{3}\right )}}{\sqrt {d}}}{a^{2} b^{2} - 2 \, {\left (a + b\right )} x^{3} + x^{4} + {\left (a^{2} + 4 \, a b + b^{2} - d\right )} x^{2} - 2 \, {\left (a^{2} b + a b^{2}\right )} x}\right )}{4 \, d^{\frac {1}{4}}} + \frac {i \, \log \left (\frac {a^{2} b^{2} - 2 \, {\left (a + b\right )} x^{3} + x^{4} + {\left (a^{2} + 4 \, a b + b^{2} + d\right )} x^{2} - 2 \, {\left (a^{2} b + a b^{2}\right )} x - 2 \, \sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}} {\left (i \, d^{\frac {3}{4}} x + \frac {-i \, a b d + i \, {\left (a + b\right )} d x - i \, d x^{2}}{d^{\frac {3}{4}}}\right )} - \frac {2 \, {\left (a b d x - {\left (a + b\right )} d x^{2} + d x^{3}\right )}}{\sqrt {d}}}{a^{2} b^{2} - 2 \, {\left (a + b\right )} x^{3} + x^{4} + {\left (a^{2} + 4 \, a b + b^{2} - d\right )} x^{2} - 2 \, {\left (a^{2} b + a b^{2}\right )} x}\right )}{4 \, d^{\frac {1}{4}}} - \frac {i \, \log \left (\frac {a^{2} b^{2} - 2 \, {\left (a + b\right )} x^{3} + x^{4} + {\left (a^{2} + 4 \, a b + b^{2} + d\right )} x^{2} - 2 \, {\left (a^{2} b + a b^{2}\right )} x - 2 \, \sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}} {\left (-i \, d^{\frac {3}{4}} x + \frac {i \, a b d - i \, {\left (a + b\right )} d x + i \, d x^{2}}{d^{\frac {3}{4}}}\right )} - \frac {2 \, {\left (a b d x - {\left (a + b\right )} d x^{2} + d x^{3}\right )}}{\sqrt {d}}}{a^{2} b^{2} - 2 \, {\left (a + b\right )} x^{3} + x^{4} + {\left (a^{2} + 4 \, a b + b^{2} - d\right )} x^{2} - 2 \, {\left (a^{2} b + a b^{2}\right )} x}\right )}{4 \, d^{\frac {1}{4}}} \]
[In]
[Out]
Timed out. \[ \int \frac {(-a+x) (-b+x) \left (-a b+x^2\right )}{\sqrt {x (-a+x) (-b+x)} \left (a^2 b^2-2 a b (a+b) x+\left (a^2+4 a b+b^2-d\right ) x^2-2 (a+b) x^3+x^4\right )} \, dx=\text {Timed out} \]
[In]
[Out]
\[ \int \frac {(-a+x) (-b+x) \left (-a b+x^2\right )}{\sqrt {x (-a+x) (-b+x)} \left (a^2 b^2-2 a b (a+b) x+\left (a^2+4 a b+b^2-d\right ) x^2-2 (a+b) x^3+x^4\right )} \, dx=\int { -\frac {{\left (a b - x^{2}\right )} {\left (a - x\right )} {\left (b - x\right )}}{{\left (a^{2} b^{2} - 2 \, {\left (a + b\right )} a b x - 2 \, {\left (a + b\right )} x^{3} + x^{4} + {\left (a^{2} + 4 \, a b + b^{2} - d\right )} x^{2}\right )} \sqrt {{\left (a - x\right )} {\left (b - x\right )} x}} \,d x } \]
[In]
[Out]
\[ \int \frac {(-a+x) (-b+x) \left (-a b+x^2\right )}{\sqrt {x (-a+x) (-b+x)} \left (a^2 b^2-2 a b (a+b) x+\left (a^2+4 a b+b^2-d\right ) x^2-2 (a+b) x^3+x^4\right )} \, dx=\int { -\frac {{\left (a b - x^{2}\right )} {\left (a - x\right )} {\left (b - x\right )}}{{\left (a^{2} b^{2} - 2 \, {\left (a + b\right )} a b x - 2 \, {\left (a + b\right )} x^{3} + x^{4} + {\left (a^{2} + 4 \, a b + b^{2} - d\right )} x^{2}\right )} \sqrt {{\left (a - x\right )} {\left (b - x\right )} x}} \,d x } \]
[In]
[Out]
Time = 6.89 (sec) , antiderivative size = 1150, normalized size of antiderivative = 14.94 \[ \int \frac {(-a+x) (-b+x) \left (-a b+x^2\right )}{\sqrt {x (-a+x) (-b+x)} \left (a^2 b^2-2 a b (a+b) x+\left (a^2+4 a b+b^2-d\right ) x^2-2 (a+b) x^3+x^4\right )} \, dx=\left (\sum _{k=1}^4\left (-\frac {b\,\sqrt {\frac {x}{b}}\,\sqrt {\frac {b-x}{b}}\,\sqrt {\frac {a-x}{a-b}}\,\Pi \left (-\frac {b}{\mathrm {root}\left (z^4-z^3\,\left (2\,a+2\,b\right )+z^2\,\left (-d+4\,a\,b+a^2+b^2\right )-2\,a\,b\,z\,\left (a+b\right )+a^2\,b^2,z,k\right )-b};\mathrm {asin}\left (\sqrt {\frac {b-x}{b}}\right )\middle |-\frac {b}{a-b}\right )\,\left (-2\,a^2\,b^2+a^2\,b\,\mathrm {root}\left (z^4-z^3\,\left (2\,a+2\,b\right )+z^2\,\left (-d+4\,a\,b+a^2+b^2\right )-2\,a\,b\,z\,\left (a+b\right )+a^2\,b^2,z,k\right )\,3-a^2\,{\mathrm {root}\left (z^4-z^3\,\left (2\,a+2\,b\right )+z^2\,\left (-d+4\,a\,b+a^2+b^2\right )-2\,a\,b\,z\,\left (a+b\right )+a^2\,b^2,z,k\right )}^2+3\,a\,b^2\,\mathrm {root}\left (z^4-z^3\,\left (2\,a+2\,b\right )+z^2\,\left (-d+4\,a\,b+a^2+b^2\right )-2\,a\,b\,z\,\left (a+b\right )+a^2\,b^2,z,k\right )-4\,a\,b\,{\mathrm {root}\left (z^4-z^3\,\left (2\,a+2\,b\right )+z^2\,\left (-d+4\,a\,b+a^2+b^2\right )-2\,a\,b\,z\,\left (a+b\right )+a^2\,b^2,z,k\right )}^2+a\,{\mathrm {root}\left (z^4-z^3\,\left (2\,a+2\,b\right )+z^2\,\left (-d+4\,a\,b+a^2+b^2\right )-2\,a\,b\,z\,\left (a+b\right )+a^2\,b^2,z,k\right )}^3-b^2\,{\mathrm {root}\left (z^4-z^3\,\left (2\,a+2\,b\right )+z^2\,\left (-d+4\,a\,b+a^2+b^2\right )-2\,a\,b\,z\,\left (a+b\right )+a^2\,b^2,z,k\right )}^2+b\,{\mathrm {root}\left (z^4-z^3\,\left (2\,a+2\,b\right )+z^2\,\left (-d+4\,a\,b+a^2+b^2\right )-2\,a\,b\,z\,\left (a+b\right )+a^2\,b^2,z,k\right )}^3+d\,{\mathrm {root}\left (z^4-z^3\,\left (2\,a+2\,b\right )+z^2\,\left (-d+4\,a\,b+a^2+b^2\right )-2\,a\,b\,z\,\left (a+b\right )+a^2\,b^2,z,k\right )}^2\right )}{\left (\mathrm {root}\left (z^4-z^3\,\left (2\,a+2\,b\right )+z^2\,\left (-d+4\,a\,b+a^2+b^2\right )-2\,a\,b\,z\,\left (a+b\right )+a^2\,b^2,z,k\right )-b\right )\,\sqrt {x\,\left (a-x\right )\,\left (b-x\right )}\,\left (a^2\,b-a^2\,\mathrm {root}\left (z^4-z^3\,\left (2\,a+2\,b\right )+z^2\,\left (-d+4\,a\,b+a^2+b^2\right )-2\,a\,b\,z\,\left (a+b\right )+a^2\,b^2,z,k\right )+a\,b^2-4\,a\,b\,\mathrm {root}\left (z^4-z^3\,\left (2\,a+2\,b\right )+z^2\,\left (-d+4\,a\,b+a^2+b^2\right )-2\,a\,b\,z\,\left (a+b\right )+a^2\,b^2,z,k\right )+3\,a\,{\mathrm {root}\left (z^4-z^3\,\left (2\,a+2\,b\right )+z^2\,\left (-d+4\,a\,b+a^2+b^2\right )-2\,a\,b\,z\,\left (a+b\right )+a^2\,b^2,z,k\right )}^2-b^2\,\mathrm {root}\left (z^4-z^3\,\left (2\,a+2\,b\right )+z^2\,\left (-d+4\,a\,b+a^2+b^2\right )-2\,a\,b\,z\,\left (a+b\right )+a^2\,b^2,z,k\right )+3\,b\,{\mathrm {root}\left (z^4-z^3\,\left (2\,a+2\,b\right )+z^2\,\left (-d+4\,a\,b+a^2+b^2\right )-2\,a\,b\,z\,\left (a+b\right )+a^2\,b^2,z,k\right )}^2-2\,{\mathrm {root}\left (z^4-z^3\,\left (2\,a+2\,b\right )+z^2\,\left (-d+4\,a\,b+a^2+b^2\right )-2\,a\,b\,z\,\left (a+b\right )+a^2\,b^2,z,k\right )}^3+d\,\mathrm {root}\left (z^4-z^3\,\left (2\,a+2\,b\right )+z^2\,\left (-d+4\,a\,b+a^2+b^2\right )-2\,a\,b\,z\,\left (a+b\right )+a^2\,b^2,z,k\right )\right )}\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}} \]
[In]
[Out]