Integrand size = 51, antiderivative size = 46 \[ \int \frac {-a+(-1+2 a) x}{(-a+x) \sqrt {a^2 x-\left (-1+2 a+a^2\right ) x^2+(-1+2 a) x^3}} \, dx=\log \left (\frac {-a^2+2 a x+x^2-2 \left (x+\sqrt {(1-x) x \left (a^2+x-2 a x\right )}\right )}{(a-x)^2}\right ) \]
[Out]
Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.
Time = 1.04 (sec) , antiderivative size = 180, normalized size of antiderivative = 3.91, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.137, Rules used = {2081, 6865, 1724, 1118, 430, 1234, 551} \[ \int \frac {-a+(-1+2 a) x}{(-a+x) \sqrt {a^2 x-\left (-1+2 a+a^2\right ) x^2+(-1+2 a) x^3}} \, dx=\frac {4 (1-a) \sqrt {1-x} \sqrt {x} \sqrt {\frac {(1-2 a) x}{a^2}+1} \operatorname {EllipticPi}\left (\frac {1}{a},\arcsin \left (\sqrt {x}\right ),-\frac {1-2 a}{a^2}\right )}{\sqrt {\left (-a^2-2 a+1\right ) x^2+a^2 x-\left ((1-2 a) x^3\right )}}-\frac {2 (1-2 a) \sqrt {1-x} \sqrt {x} \sqrt {\frac {(1-2 a) x}{a^2}+1} \operatorname {EllipticF}\left (\arcsin \left (\sqrt {x}\right ),-\frac {1-2 a}{a^2}\right )}{\sqrt {\left (-a^2-2 a+1\right ) x^2+a^2 x-\left ((1-2 a) x^3\right )}} \]
[In]
[Out]
Rule 430
Rule 551
Rule 1118
Rule 1234
Rule 1724
Rule 2081
Rule 6865
Rubi steps \begin{align*} \text {integral}& = \frac {\left (\sqrt {x} \sqrt {a^2-\left (-1+2 a+a^2\right ) x+(-1+2 a) x^2}\right ) \int \frac {-a+(-1+2 a) x}{\sqrt {x} (-a+x) \sqrt {a^2-\left (-1+2 a+a^2\right ) x+(-1+2 a) x^2}} \, dx}{\sqrt {a^2 x-\left (-1+2 a+a^2\right ) x^2+(-1+2 a) x^3}} \\ & = \frac {\left (2 \sqrt {x} \sqrt {a^2-\left (-1+2 a+a^2\right ) x+(-1+2 a) x^2}\right ) \text {Subst}\left (\int \frac {-a+(-1+2 a) x^2}{\left (-a+x^2\right ) \sqrt {a^2+\left (1-2 a-a^2\right ) x^2+(-1+2 a) x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {a^2 x-\left (-1+2 a+a^2\right ) x^2+(-1+2 a) x^3}} \\ & = -\frac {\left (4 (1-a) a \sqrt {x} \sqrt {a^2-\left (-1+2 a+a^2\right ) x+(-1+2 a) x^2}\right ) \text {Subst}\left (\int \frac {1}{\left (-a+x^2\right ) \sqrt {a^2+\left (1-2 a-a^2\right ) x^2+(-1+2 a) x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {a^2 x-\left (-1+2 a+a^2\right ) x^2+(-1+2 a) x^3}}+\frac {\left (2 (-1+2 a) \sqrt {x} \sqrt {a^2-\left (-1+2 a+a^2\right ) x+(-1+2 a) x^2}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a^2+\left (1-2 a-a^2\right ) x^2+(-1+2 a) x^4}} \, dx,x,\sqrt {x}\right )}{\sqrt {a^2 x-\left (-1+2 a+a^2\right ) x^2+(-1+2 a) x^3}} \\ & = -\frac {\left (4 (1-a) a \sqrt {1-x} \sqrt {x} \sqrt {1+\frac {(1-2 a) x}{a^2}} \sqrt {a^2-\left (-1+2 a+a^2\right ) x+(-1+2 a) x^2}\right ) \text {Subst}\left (\int \frac {1}{\left (-a+x^2\right ) \sqrt {1+\frac {2 (-1+2 a) x^2}{1-(-1+a)^2-2 a-a^2}} \sqrt {1+\frac {2 (-1+2 a) x^2}{1+(-1+a)^2-2 a-a^2}}} \, dx,x,\sqrt {x}\right )}{\sqrt {a^2+\left (1-2 a-a^2\right ) x+(-1+2 a) x^2} \sqrt {a^2 x-\left (-1+2 a+a^2\right ) x^2+(-1+2 a) x^3}}+\frac {\left (2 (-1+2 a) \sqrt {1-x} \sqrt {x} \sqrt {1+\frac {(1-2 a) x}{a^2}} \sqrt {a^2-\left (-1+2 a+a^2\right ) x+(-1+2 a) x^2}\right ) \text {Subst}\left (\int \frac {1}{\sqrt {1+\frac {2 (-1+2 a) x^2}{1-(-1+a)^2-2 a-a^2}} \sqrt {1+\frac {2 (-1+2 a) x^2}{1+(-1+a)^2-2 a-a^2}}} \, dx,x,\sqrt {x}\right )}{\sqrt {a^2+\left (1-2 a-a^2\right ) x+(-1+2 a) x^2} \sqrt {a^2 x-\left (-1+2 a+a^2\right ) x^2+(-1+2 a) x^3}} \\ & = -\frac {2 (1-2 a) \sqrt {1-x} \sqrt {x} \sqrt {1+\frac {(1-2 a) x}{a^2}} \operatorname {EllipticF}\left (\arcsin \left (\sqrt {x}\right ),-\frac {1-2 a}{a^2}\right )}{\sqrt {a^2 x+\left (1-2 a-a^2\right ) x^2-(1-2 a) x^3}}+\frac {4 (1-a) \sqrt {1-x} \sqrt {x} \sqrt {1+\frac {(1-2 a) x}{a^2}} \operatorname {EllipticPi}\left (\frac {1}{a},\arcsin \left (\sqrt {x}\right ),-\frac {1-2 a}{a^2}\right )}{\sqrt {a^2 x+\left (1-2 a-a^2\right ) x^2-(1-2 a) x^3}} \\ \end{align*}
Time = 10.88 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.13 \[ \int \frac {-a+(-1+2 a) x}{(-a+x) \sqrt {a^2 x-\left (-1+2 a+a^2\right ) x^2+(-1+2 a) x^3}} \, dx=-2 \text {arctanh}\left (\frac {\sqrt {a^2 x+\left (1-2 a-a^2\right ) x^2+(-1+2 a) x^3}}{-a^2+(-1+2 a) x}\right ) \]
[In]
[Out]
Result contains higher order function than in optimal. Order 4 vs. order 3.
Time = 0.66 (sec) , antiderivative size = 367, normalized size of antiderivative = 7.98
method | result | size |
elliptic | \(-\frac {2 a^{2} \sqrt {-\frac {\left (x -\frac {a^{2}}{-1+2 a}\right ) \left (-1+2 a \right )}{a^{2}}}\, \sqrt {\frac {-1+x}{\frac {a^{2}}{-1+2 a}-1}}\, \sqrt {\frac {x \left (-1+2 a \right )}{a^{2}}}\, F\left (\sqrt {-\frac {\left (x -\frac {a^{2}}{-1+2 a}\right ) \left (-1+2 a \right )}{a^{2}}}, \sqrt {\frac {a^{2}}{\left (-1+2 a \right ) \left (\frac {a^{2}}{-1+2 a}-1\right )}}\right )}{\sqrt {-a^{2} x^{2}+2 a \,x^{3}+a^{2} x -2 a \,x^{2}-x^{3}+x^{2}}}-\frac {4 a^{3} \left (a -1\right ) \sqrt {-\frac {\left (x -\frac {a^{2}}{-1+2 a}\right ) \left (-1+2 a \right )}{a^{2}}}\, \sqrt {\frac {-1+x}{\frac {a^{2}}{-1+2 a}-1}}\, \sqrt {\frac {x \left (-1+2 a \right )}{a^{2}}}\, \Pi \left (\sqrt {-\frac {\left (x -\frac {a^{2}}{-1+2 a}\right ) \left (-1+2 a \right )}{a^{2}}}, \frac {a^{2}}{\left (-1+2 a \right ) \left (\frac {a^{2}}{-1+2 a}-a \right )}, \sqrt {\frac {a^{2}}{\left (-1+2 a \right ) \left (\frac {a^{2}}{-1+2 a}-1\right )}}\right )}{\left (-1+2 a \right ) \sqrt {-a^{2} x^{2}+2 a \,x^{3}+a^{2} x -2 a \,x^{2}-x^{3}+x^{2}}\, \left (\frac {a^{2}}{-1+2 a}-a \right )}\) | \(367\) |
default | \(\frac {2 a^{2} \sqrt {-\frac {\left (x -\frac {a^{2}}{-1+2 a}\right ) \left (-1+2 a \right )}{a^{2}}}\, \sqrt {\frac {-1+x}{\frac {a^{2}}{-1+2 a}-1}}\, \sqrt {\frac {x \left (-1+2 a \right )}{a^{2}}}\, F\left (\sqrt {-\frac {\left (x -\frac {a^{2}}{-1+2 a}\right ) \left (-1+2 a \right )}{a^{2}}}, \sqrt {\frac {a^{2}}{\left (-1+2 a \right ) \left (\frac {a^{2}}{-1+2 a}-1\right )}}\right )}{\left (-1+2 a \right ) \sqrt {-a^{2} x^{2}+2 a \,x^{3}+a^{2} x -2 a \,x^{2}-x^{3}+x^{2}}}-\frac {4 a^{3} \sqrt {-\frac {\left (x -\frac {a^{2}}{-1+2 a}\right ) \left (-1+2 a \right )}{a^{2}}}\, \sqrt {\frac {-1+x}{\frac {a^{2}}{-1+2 a}-1}}\, \sqrt {\frac {x \left (-1+2 a \right )}{a^{2}}}\, F\left (\sqrt {-\frac {\left (x -\frac {a^{2}}{-1+2 a}\right ) \left (-1+2 a \right )}{a^{2}}}, \sqrt {\frac {a^{2}}{\left (-1+2 a \right ) \left (\frac {a^{2}}{-1+2 a}-1\right )}}\right )}{\left (-1+2 a \right ) \sqrt {-a^{2} x^{2}+2 a \,x^{3}+a^{2} x -2 a \,x^{2}-x^{3}+x^{2}}}-\frac {4 a^{3} \left (a -1\right ) \sqrt {-\frac {\left (x -\frac {a^{2}}{-1+2 a}\right ) \left (-1+2 a \right )}{a^{2}}}\, \sqrt {\frac {-1+x}{\frac {a^{2}}{-1+2 a}-1}}\, \sqrt {\frac {x \left (-1+2 a \right )}{a^{2}}}\, \Pi \left (\sqrt {-\frac {\left (x -\frac {a^{2}}{-1+2 a}\right ) \left (-1+2 a \right )}{a^{2}}}, \frac {a^{2}}{\left (-1+2 a \right ) \left (\frac {a^{2}}{-1+2 a}-a \right )}, \sqrt {\frac {a^{2}}{\left (-1+2 a \right ) \left (\frac {a^{2}}{-1+2 a}-1\right )}}\right )}{\left (-1+2 a \right ) \sqrt {-a^{2} x^{2}+2 a \,x^{3}+a^{2} x -2 a \,x^{2}-x^{3}+x^{2}}\, \left (\frac {a^{2}}{-1+2 a}-a \right )}\) | \(536\) |
[In]
[Out]
none
Time = 0.28 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.37 \[ \int \frac {-a+(-1+2 a) x}{(-a+x) \sqrt {a^2 x-\left (-1+2 a+a^2\right ) x^2+(-1+2 a) x^3}} \, dx=\log \left (-\frac {a^{2} - 2 \, {\left (a - 1\right )} x - x^{2} + 2 \, \sqrt {{\left (2 \, a - 1\right )} x^{3} + a^{2} x - {\left (a^{2} + 2 \, a - 1\right )} x^{2}}}{a^{2} - 2 \, a x + x^{2}}\right ) \]
[In]
[Out]
\[ \int \frac {-a+(-1+2 a) x}{(-a+x) \sqrt {a^2 x-\left (-1+2 a+a^2\right ) x^2+(-1+2 a) x^3}} \, dx=\int \frac {2 a x - a - x}{\sqrt {x \left (x - 1\right ) \left (- a^{2} + 2 a x - x\right )} \left (- a + x\right )}\, dx \]
[In]
[Out]
\[ \int \frac {-a+(-1+2 a) x}{(-a+x) \sqrt {a^2 x-\left (-1+2 a+a^2\right ) x^2+(-1+2 a) x^3}} \, dx=\int { -\frac {{\left (2 \, a - 1\right )} x - a}{\sqrt {{\left (2 \, a - 1\right )} x^{3} + a^{2} x - {\left (a^{2} + 2 \, a - 1\right )} x^{2}} {\left (a - x\right )}} \,d x } \]
[In]
[Out]
\[ \int \frac {-a+(-1+2 a) x}{(-a+x) \sqrt {a^2 x-\left (-1+2 a+a^2\right ) x^2+(-1+2 a) x^3}} \, dx=\int { -\frac {{\left (2 \, a - 1\right )} x - a}{\sqrt {{\left (2 \, a - 1\right )} x^{3} + a^{2} x - {\left (a^{2} + 2 \, a - 1\right )} x^{2}} {\left (a - x\right )}} \,d x } \]
[In]
[Out]
Timed out. \[ \int \frac {-a+(-1+2 a) x}{(-a+x) \sqrt {a^2 x-\left (-1+2 a+a^2\right ) x^2+(-1+2 a) x^3}} \, dx=\text {Hanged} \]
[In]
[Out]