Integrand size = 69, antiderivative size = 88 \[ \int \frac {x (-b+x) \left (a b-2 a x+x^2\right )}{\sqrt {x (-a+x) (-b+x)} \left (-a^2+2 a x+\left (-1+b^2 d\right ) x^2-2 b d x^3+d x^4\right )} \, dx=-\frac {\arctan \left (\frac {\sqrt [4]{d} \sqrt {a b x+(-a-b) x^2+x^3}}{a-x}\right )}{d^{3/4}}+\frac {\text {arctanh}\left (\frac {\sqrt [4]{d} \sqrt {a b x+(-a-b) x^2+x^3}}{a-x}\right )}{d^{3/4}} \]
-arctan(d^(1/4)*(a*b*x+(-a-b)*x^2+x^3)^(1/2)/(a-x))/d^(3/4)+arctanh(d^(1/4 )*(a*b*x+(-a-b)*x^2+x^3)^(1/2)/(a-x))/d^(3/4)
Time = 15.47 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.75 \[ \int \frac {x (-b+x) \left (a b-2 a x+x^2\right )}{\sqrt {x (-a+x) (-b+x)} \left (-a^2+2 a x+\left (-1+b^2 d\right ) x^2-2 b d x^3+d x^4\right )} \, dx=\frac {\arctan \left (\frac {\sqrt [4]{d} x (-b+x)}{\sqrt {x (-a+x) (-b+x)}}\right )+\text {arctanh}\left (\frac {\sqrt [4]{d} \sqrt {x (-a+x) (-b+x)}}{a-x}\right )}{d^{3/4}} \]
Integrate[(x*(-b + x)*(a*b - 2*a*x + x^2))/(Sqrt[x*(-a + x)*(-b + x)]*(-a^ 2 + 2*a*x + (-1 + b^2*d)*x^2 - 2*b*d*x^3 + d*x^4)),x]
(ArcTan[(d^(1/4)*x*(-b + x))/Sqrt[x*(-a + x)*(-b + x)]] + ArcTanh[(d^(1/4) *Sqrt[x*(-a + x)*(-b + x)])/(a - x)])/d^(3/4)
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {x (x-b) \left (a b-2 a x+x^2\right )}{\sqrt {x (x-a) (x-b)} \left (-a^2+2 a x+x^2 \left (b^2 d-1\right )-2 b d x^3+d x^4\right )} \, dx\) |
\(\Big \downarrow \) 2467 |
\(\displaystyle \frac {\sqrt {x} \sqrt {-x (a+b)+a b+x^2} \int \frac {(b-x) \sqrt {x} \left (x^2-2 a x+a b\right )}{\sqrt {x^2-(a+b) x+a b} \left (-d x^4+2 b d x^3+\left (1-b^2 d\right ) x^2-2 a x+a^2\right )}dx}{\sqrt {x (a-x) (b-x)}}\) |
\(\Big \downarrow \) 2035 |
\(\displaystyle \frac {2 \sqrt {x} \sqrt {-x (a+b)+a b+x^2} \int \frac {(b-x) x \left (x^2-2 a x+a b\right )}{\sqrt {x^2-(a+b) x+a b} \left (-d x^4+2 b d x^3+\left (1-b^2 d\right ) x^2-2 a x+a^2\right )}d\sqrt {x}}{\sqrt {x (a-x) (b-x)}}\) |
\(\Big \downarrow \) 7293 |
\(\displaystyle \frac {2 \sqrt {x} \sqrt {-x (a+b)+a b+x^2} \int \left (\frac {1}{d \sqrt {x^2-(a+b) x+a b}}-\frac {-\left ((2 a-b) d x^3\right )+\left (-d b^2+3 a d b+1\right ) x^2-a \left (d b^2+2\right ) x+a^2}{d \sqrt {x^2-(a+b) x+a b} \left (-d x^4+2 b d x^3+\left (1-b^2 d\right ) x^2-2 a x+a^2\right )}\right )d\sqrt {x}}{\sqrt {x (a-x) (b-x)}}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {2 \sqrt {x} \sqrt {-x (a+b)+a b+x^2} \left (-\frac {a^2 \int \frac {1}{\sqrt {x^2-(a+b) x+a b} \left (-d x^4+2 b d x^3+\left (1-b^2 d\right ) x^2-2 a x+a^2\right )}d\sqrt {x}}{d}+\frac {a \left (b^2 d+2\right ) \int \frac {x}{\sqrt {x^2-(a+b) x+a b} \left (-d x^4+2 b d x^3+\left (1-b^2 d\right ) x^2-2 a x+a^2\right )}d\sqrt {x}}{d}-\frac {\left (3 a b d+b^2 (-d)+1\right ) \int \frac {x^2}{\sqrt {x^2-(a+b) x+a b} \left (-d x^4+2 b d x^3+\left (1-b^2 d\right ) x^2-2 a x+a^2\right )}d\sqrt {x}}{d}+(2 a-b) \int \frac {x^3}{\sqrt {x^2-(a+b) x+a b} \left (-d x^4+2 b d x^3+\left (1-b^2 d\right ) x^2-2 a x+a^2\right )}d\sqrt {x}+\frac {\left (\sqrt {a} \sqrt {b}+x\right ) \sqrt {\frac {-x (a+b)+a b+x^2}{\left (\sqrt {a} \sqrt {b}+x\right )^2}} \operatorname {EllipticF}\left (2 \arctan \left (\frac {\sqrt {x}}{\sqrt [4]{a} \sqrt [4]{b}}\right ),\frac {1}{4} \left (\frac {a+b}{\sqrt {a} \sqrt {b}}+2\right )\right )}{2 \sqrt [4]{a} \sqrt [4]{b} d \sqrt {-x (a+b)+a b+x^2}}\right )}{\sqrt {x (a-x) (b-x)}}\) |
Int[(x*(-b + x)*(a*b - 2*a*x + x^2))/(Sqrt[x*(-a + x)*(-b + x)]*(-a^2 + 2* a*x + (-1 + b^2*d)*x^2 - 2*b*d*x^3 + d*x^4)),x]
3.13.1.3.1 Defintions of rubi rules used
Int[(Fx_)*(x_)^(m_), x_Symbol] :> With[{k = Denominator[m]}, Simp[k Subst [Int[x^(k*(m + 1) - 1)*SubstPower[Fx, x, k], x], x, x^(1/k)], x]] /; Fracti onQ[m] && AlgebraicFunctionQ[Fx, x]
Int[(Fx_.)*(Px_)^(p_), x_Symbol] :> With[{r = Expon[Px, x, Min]}, Simp[Px^F racPart[p]/(x^(r*FracPart[p])*ExpandToSum[Px/x^r, x]^FracPart[p]) Int[x^( p*r)*ExpandToSum[Px/x^r, x]^p*Fx, x], x] /; IGtQ[r, 0]] /; FreeQ[p, x] && P olyQ[Px, x] && !IntegerQ[p] && !MonomialQ[Px, x] && !PolyQ[Fx, x]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 1.43 (sec) , antiderivative size = 358, normalized size of antiderivative = 4.07
method | result | size |
default | \(-\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 )}{d \sqrt {a b x -a \,x^{2}-b \,x^{2}+x^{3}}}-\frac {b \left (\munderset {\underline {\hspace {1.25 ex}}\alpha =\operatorname {RootOf}\left (d \,\textit {\_Z}^{4}-2 d b \,\textit {\_Z}^{3}+\left (d \,b^{2}-1\right ) \textit {\_Z}^{2}+2 \textit {\_Z} a -a^{2}\right )}{\sum }\frac {\left (-2 \underline {\hspace {1.25 ex}}\alpha ^{3} a d +\underline {\hspace {1.25 ex}}\alpha ^{3} b d +3 \underline {\hspace {1.25 ex}}\alpha ^{2} a b d -\underline {\hspace {1.25 ex}}\alpha ^{2} b^{2} d -\underline {\hspace {1.25 ex}}\alpha a \,b^{2} d +\underline {\hspace {1.25 ex}}\alpha ^{2}-2 \underline {\hspace {1.25 ex}}\alpha a +a^{2}\right ) \left (d \,\underline {\hspace {1.25 ex}}\alpha ^{3}-\underline {\hspace {1.25 ex}}\alpha ^{2} b d -\underline {\hspace {1.25 ex}}\alpha +2 a -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 {\left (d \,\underline {\hspace {1.25 ex}}\alpha ^{3}-\underline {\hspace {1.25 ex}}\alpha ^{2} b d -\underline {\hspace {1.25 ex}}\alpha +2 a -b \right ) b}{a^{2}-2 a b +b^{2}}, \sqrt {\frac {b}{-a +b}}\right )}{\left (-2 d \,\underline {\hspace {1.25 ex}}\alpha ^{3}+3 \underline {\hspace {1.25 ex}}\alpha ^{2} b d -\underline {\hspace {1.25 ex}}\alpha \,b^{2} d +\underline {\hspace {1.25 ex}}\alpha -a \right ) \left (a^{2}-2 a b +b^{2}\right ) \sqrt {x \left (a b -a x -b x +x^{2}\right )}}\right )}{d}\) | \(358\) |
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 )}{d \sqrt {a b x -a \,x^{2}-b \,x^{2}+x^{3}}}-\frac {b \left (\munderset {\underline {\hspace {1.25 ex}}\alpha =\operatorname {RootOf}\left (d \,\textit {\_Z}^{4}-2 d b \,\textit {\_Z}^{3}+\left (d \,b^{2}-1\right ) \textit {\_Z}^{2}+2 \textit {\_Z} a -a^{2}\right )}{\sum }\frac {\left (2 \underline {\hspace {1.25 ex}}\alpha ^{3} a d -\underline {\hspace {1.25 ex}}\alpha ^{3} b d -3 \underline {\hspace {1.25 ex}}\alpha ^{2} a b d +\underline {\hspace {1.25 ex}}\alpha ^{2} b^{2} d +\underline {\hspace {1.25 ex}}\alpha a \,b^{2} d -\underline {\hspace {1.25 ex}}\alpha ^{2}+2 \underline {\hspace {1.25 ex}}\alpha a -a^{2}\right ) \left (d \,\underline {\hspace {1.25 ex}}\alpha ^{3}-\underline {\hspace {1.25 ex}}\alpha ^{2} b d -\underline {\hspace {1.25 ex}}\alpha +2 a -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 {\left (d \,\underline {\hspace {1.25 ex}}\alpha ^{3}-\underline {\hspace {1.25 ex}}\alpha ^{2} b d -\underline {\hspace {1.25 ex}}\alpha +2 a -b \right ) b}{a^{2}-2 a b +b^{2}}, \sqrt {\frac {b}{-a +b}}\right )}{\left (2 d \,\underline {\hspace {1.25 ex}}\alpha ^{3}-3 \underline {\hspace {1.25 ex}}\alpha ^{2} b d +\underline {\hspace {1.25 ex}}\alpha \,b^{2} d -\underline {\hspace {1.25 ex}}\alpha +a \right ) \left (a^{2}-2 a b +b^{2}\right ) \sqrt {x \left (a b -a x -b x +x^{2}\right )}}\right )}{d}\) | \(360\) |
int(x*(-b+x)*(a*b-2*a*x+x^2)/(x*(-a+x)*(-b+x))^(1/2)/(-a^2+2*a*x+(b^2*d-1) *x^2-2*b*d*x^3+d*x^4),x,method=_RETURNVERBOSE)
-2/d*b*(-(-b+x)/b)^(1/2)*((-a+x)/(-a+b))^(1/2)*(x/b)^(1/2)/(a*b*x-a*x^2-b* x^2+x^3)^(1/2)*EllipticF((-(-b+x)/b)^(1/2),(b/(-a+b))^(1/2))-1/d*b*sum((-2 *_alpha^3*a*d+_alpha^3*b*d+3*_alpha^2*a*b*d-_alpha^2*b^2*d-_alpha*a*b^2*d+ _alpha^2-2*_alpha*a+a^2)/(-2*_alpha^3*d+3*_alpha^2*b*d-_alpha*b^2*d+_alpha -a)*(_alpha^3*d-_alpha^2*b*d-_alpha+2*a-b)/(a^2-2*a*b+b^2)*(-(-b+x)/b)^(1/ 2)*((-a+x)/(-a+b))^(1/2)*(x/b)^(1/2)/(x*(a*b-a*x-b*x+x^2))^(1/2)*EllipticP i((-(-b+x)/b)^(1/2),-(_alpha^3*d-_alpha^2*b*d-_alpha+2*a-b)*b/(a^2-2*a*b+b ^2),(b/(-a+b))^(1/2)),_alpha=RootOf(d*_Z^4-2*d*b*_Z^3+(b^2*d-1)*_Z^2+2*_Z* a-a^2))
Result contains complex when optimal does not.
Time = 0.73 (sec) , antiderivative size = 677, normalized size of antiderivative = 7.69 \[ \int \frac {x (-b+x) \left (a b-2 a x+x^2\right )}{\sqrt {x (-a+x) (-b+x)} \left (-a^2+2 a x+\left (-1+b^2 d\right ) x^2-2 b d x^3+d x^4\right )} \, dx=-\frac {1}{4} \, \frac {1}{d^{3}}^{\frac {1}{4}} \log \left (\frac {2 \, b d x^{3} - d x^{4} - {\left (b^{2} d + 1\right )} x^{2} - a^{2} + 2 \, a x + 2 \, \sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}} {\left ({\left (b d^{3} x - d^{3} x^{2}\right )} \frac {1}{d^{3}}^{\frac {3}{4}} + {\left (a d - d x\right )} \frac {1}{d^{3}}^{\frac {1}{4}}\right )} - 2 \, {\left (a b d^{2} x - {\left (a + b\right )} d^{2} x^{2} + d^{2} x^{3}\right )} \sqrt {\frac {1}{d^{3}}}}{2 \, b d x^{3} - d x^{4} - {\left (b^{2} d - 1\right )} x^{2} + a^{2} - 2 \, a x}\right ) + \frac {1}{4} \, \frac {1}{d^{3}}^{\frac {1}{4}} \log \left (\frac {2 \, b d x^{3} - d x^{4} - {\left (b^{2} d + 1\right )} x^{2} - a^{2} + 2 \, a x - 2 \, \sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}} {\left ({\left (b d^{3} x - d^{3} x^{2}\right )} \frac {1}{d^{3}}^{\frac {3}{4}} + {\left (a d - d x\right )} \frac {1}{d^{3}}^{\frac {1}{4}}\right )} - 2 \, {\left (a b d^{2} x - {\left (a + b\right )} d^{2} x^{2} + d^{2} x^{3}\right )} \sqrt {\frac {1}{d^{3}}}}{2 \, b d x^{3} - d x^{4} - {\left (b^{2} d - 1\right )} x^{2} + a^{2} - 2 \, a x}\right ) + \frac {1}{4} i \, \frac {1}{d^{3}}^{\frac {1}{4}} \log \left (\frac {2 \, b d x^{3} - d x^{4} - {\left (b^{2} d + 1\right )} x^{2} - a^{2} + 2 \, a x + 2 \, \sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}} {\left ({\left (i \, b d^{3} x - i \, d^{3} x^{2}\right )} \frac {1}{d^{3}}^{\frac {3}{4}} + {\left (-i \, a d + i \, d x\right )} \frac {1}{d^{3}}^{\frac {1}{4}}\right )} + 2 \, {\left (a b d^{2} x - {\left (a + b\right )} d^{2} x^{2} + d^{2} x^{3}\right )} \sqrt {\frac {1}{d^{3}}}}{2 \, b d x^{3} - d x^{4} - {\left (b^{2} d - 1\right )} x^{2} + a^{2} - 2 \, a x}\right ) - \frac {1}{4} i \, \frac {1}{d^{3}}^{\frac {1}{4}} \log \left (\frac {2 \, b d x^{3} - d x^{4} - {\left (b^{2} d + 1\right )} x^{2} - a^{2} + 2 \, a x + 2 \, \sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}} {\left ({\left (-i \, b d^{3} x + i \, d^{3} x^{2}\right )} \frac {1}{d^{3}}^{\frac {3}{4}} + {\left (i \, a d - i \, d x\right )} \frac {1}{d^{3}}^{\frac {1}{4}}\right )} + 2 \, {\left (a b d^{2} x - {\left (a + b\right )} d^{2} x^{2} + d^{2} x^{3}\right )} \sqrt {\frac {1}{d^{3}}}}{2 \, b d x^{3} - d x^{4} - {\left (b^{2} d - 1\right )} x^{2} + a^{2} - 2 \, a x}\right ) \]
integrate(x*(-b+x)*(a*b-2*a*x+x^2)/(x*(-a+x)*(-b+x))^(1/2)/(-a^2+2*a*x+(b^ 2*d-1)*x^2-2*b*d*x^3+d*x^4),x, algorithm="fricas")
-1/4*(d^(-3))^(1/4)*log((2*b*d*x^3 - d*x^4 - (b^2*d + 1)*x^2 - a^2 + 2*a*x + 2*sqrt(a*b*x - (a + b)*x^2 + x^3)*((b*d^3*x - d^3*x^2)*(d^(-3))^(3/4) + (a*d - d*x)*(d^(-3))^(1/4)) - 2*(a*b*d^2*x - (a + b)*d^2*x^2 + d^2*x^3)*s qrt(d^(-3)))/(2*b*d*x^3 - d*x^4 - (b^2*d - 1)*x^2 + a^2 - 2*a*x)) + 1/4*(d ^(-3))^(1/4)*log((2*b*d*x^3 - d*x^4 - (b^2*d + 1)*x^2 - a^2 + 2*a*x - 2*sq rt(a*b*x - (a + b)*x^2 + x^3)*((b*d^3*x - d^3*x^2)*(d^(-3))^(3/4) + (a*d - d*x)*(d^(-3))^(1/4)) - 2*(a*b*d^2*x - (a + b)*d^2*x^2 + d^2*x^3)*sqrt(d^( -3)))/(2*b*d*x^3 - d*x^4 - (b^2*d - 1)*x^2 + a^2 - 2*a*x)) + 1/4*I*(d^(-3) )^(1/4)*log((2*b*d*x^3 - d*x^4 - (b^2*d + 1)*x^2 - a^2 + 2*a*x + 2*sqrt(a* b*x - (a + b)*x^2 + x^3)*((I*b*d^3*x - I*d^3*x^2)*(d^(-3))^(3/4) + (-I*a*d + I*d*x)*(d^(-3))^(1/4)) + 2*(a*b*d^2*x - (a + b)*d^2*x^2 + d^2*x^3)*sqrt (d^(-3)))/(2*b*d*x^3 - d*x^4 - (b^2*d - 1)*x^2 + a^2 - 2*a*x)) - 1/4*I*(d^ (-3))^(1/4)*log((2*b*d*x^3 - d*x^4 - (b^2*d + 1)*x^2 - a^2 + 2*a*x + 2*sqr t(a*b*x - (a + b)*x^2 + x^3)*((-I*b*d^3*x + I*d^3*x^2)*(d^(-3))^(3/4) + (I *a*d - I*d*x)*(d^(-3))^(1/4)) + 2*(a*b*d^2*x - (a + b)*d^2*x^2 + d^2*x^3)* sqrt(d^(-3)))/(2*b*d*x^3 - d*x^4 - (b^2*d - 1)*x^2 + a^2 - 2*a*x))
Timed out. \[ \int \frac {x (-b+x) \left (a b-2 a x+x^2\right )}{\sqrt {x (-a+x) (-b+x)} \left (-a^2+2 a x+\left (-1+b^2 d\right ) x^2-2 b d x^3+d x^4\right )} \, dx=\text {Timed out} \]
integrate(x*(-b+x)*(a*b-2*a*x+x**2)/(x*(-a+x)*(-b+x))**(1/2)/(-a**2+2*a*x+ (b**2*d-1)*x**2-2*b*d*x**3+d*x**4),x)
\[ \int \frac {x (-b+x) \left (a b-2 a x+x^2\right )}{\sqrt {x (-a+x) (-b+x)} \left (-a^2+2 a x+\left (-1+b^2 d\right ) x^2-2 b d x^3+d x^4\right )} \, dx=\int { \frac {{\left (a b - 2 \, a x + x^{2}\right )} {\left (b - x\right )} x}{{\left (2 \, b d x^{3} - d x^{4} - {\left (b^{2} d - 1\right )} x^{2} + a^{2} - 2 \, a x\right )} \sqrt {{\left (a - x\right )} {\left (b - x\right )} x}} \,d x } \]
integrate(x*(-b+x)*(a*b-2*a*x+x^2)/(x*(-a+x)*(-b+x))^(1/2)/(-a^2+2*a*x+(b^ 2*d-1)*x^2-2*b*d*x^3+d*x^4),x, algorithm="maxima")
integrate((a*b - 2*a*x + x^2)*(b - x)*x/((2*b*d*x^3 - d*x^4 - (b^2*d - 1)* x^2 + a^2 - 2*a*x)*sqrt((a - x)*(b - x)*x)), x)
\[ \int \frac {x (-b+x) \left (a b-2 a x+x^2\right )}{\sqrt {x (-a+x) (-b+x)} \left (-a^2+2 a x+\left (-1+b^2 d\right ) x^2-2 b d x^3+d x^4\right )} \, dx=\int { \frac {{\left (a b - 2 \, a x + x^{2}\right )} {\left (b - x\right )} x}{{\left (2 \, b d x^{3} - d x^{4} - {\left (b^{2} d - 1\right )} x^{2} + a^{2} - 2 \, a x\right )} \sqrt {{\left (a - x\right )} {\left (b - x\right )} x}} \,d x } \]
integrate(x*(-b+x)*(a*b-2*a*x+x^2)/(x*(-a+x)*(-b+x))^(1/2)/(-a^2+2*a*x+(b^ 2*d-1)*x^2-2*b*d*x^3+d*x^4),x, algorithm="giac")
integrate((a*b - 2*a*x + x^2)*(b - x)*x/((2*b*d*x^3 - d*x^4 - (b^2*d - 1)* x^2 + a^2 - 2*a*x)*sqrt((a - x)*(b - x)*x)), x)
Timed out. \[ \int \frac {x (-b+x) \left (a b-2 a x+x^2\right )}{\sqrt {x (-a+x) (-b+x)} \left (-a^2+2 a x+\left (-1+b^2 d\right ) x^2-2 b d x^3+d x^4\right )} \, dx=\int -\frac {x\,\left (b-x\right )\,\left (x^2-2\,a\,x+a\,b\right )}{\sqrt {x\,\left (a-x\right )\,\left (b-x\right )}\,\left (-a^2+2\,a\,x+d\,x^4-2\,b\,d\,x^3+\left (b^2\,d-1\right )\,x^2\right )} \,d x \]
int(-(x*(b - x)*(a*b - 2*a*x + x^2))/((x*(a - x)*(b - x))^(1/2)*(x^2*(b^2* d - 1) + 2*a*x + d*x^4 - a^2 - 2*b*d*x^3)),x)