Integrand size = 68, antiderivative size = 80 \[ \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=\frac {2 \sqrt {a b x+(-a-b) x^2+x^3}}{x (-b+x)}+2 \sqrt {d} \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a b x+(-a-b) x^2+x^3}}{a-x}\right ) \]
[Out]
\[ \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 {-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 \]
[In]
[Out]
Rubi steps \begin{align*} \text {integral}& = \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 (\arcsin \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}} \operatorname {EllipticF}\left (\arcsin \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*}
Time = 14.29 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.74 \[ \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=\frac {2 (-a+x)}{\sqrt {x (-a+x) (-b+x)}}-2 \sqrt {d} \text {arctanh}\left (\frac {-a+x}{\sqrt {d} \sqrt {x (-a+x) (-b+x)}}\right ) \]
[In]
[Out]
Result contains higher order function than in optimal. Order 4 vs. order 3.
Time = 3.91 (sec) , antiderivative size = 2557, normalized size of antiderivative = 31.96
method | result | size |
elliptic | \(\text {Expression too large to display}\) | \(2557\) |
risch | \(\text {Expression too large to display}\) | \(2838\) |
default | \(\text {Expression too large to display}\) | \(2937\) |
[In]
[Out]
none
Time = 0.48 (sec) , antiderivative size = 312, normalized size of antiderivative = 3.90 \[ \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=\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 ] \]
[In]
[Out]
Timed out. \[ \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=\text {Timed out} \]
[In]
[Out]
\[ \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 {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 } \]
[In]
[Out]
\[ \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 {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 } \]
[In]
[Out]
Time = 5.69 (sec) , antiderivative size = 628, normalized size of antiderivative = 7.85 \[ \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=\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}} \]
[In]
[Out]