Integrand size = 43, antiderivative size = 44 \[ \int \frac {a b-2 a x+x^2}{\sqrt {x (-a+x) (-b+x)} \left (a d-(b+d) x+x^2\right )} \, dx=\frac {2 \text {arctanh}\left (\frac {\sqrt {a b x+(-a-b) x^2+x^3}}{\sqrt {d} (a-x)}\right )}{\sqrt {d}} \]
Time = 15.24 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.84 \[ \int \frac {a b-2 a x+x^2}{\sqrt {x (-a+x) (-b+x)} \left (a d-(b+d) x+x^2\right )} \, dx=\frac {2 \text {arctanh}\left (\frac {\sqrt {x (-a+x) (-b+x)}}{\sqrt {d} (a-x)}\right )}{\sqrt {d}} \]
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 {a b-2 a x+x^2}{\sqrt {x (x-a) (x-b)} \left (a d-x (b+d)+x^2\right )} \, dx\) |
\(\Big \downarrow \) 2467 |
\(\displaystyle \frac {\sqrt {x} \sqrt {-x (a+b)+a b+x^2} \int \frac {x^2-2 a x+a b}{\sqrt {x} \sqrt {x^2-(a+b) x+a b} \left (x^2-(b+d) x+a d\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 {x^2-2 a x+a b}{\sqrt {x^2-(a+b) x+a b} \left (x^2-(b+d) x+a d\right )}d\sqrt {x}}{\sqrt {x (a-x) (b-x)}}\) |
\(\Big \downarrow \) 7279 |
\(\displaystyle \frac {2 \sqrt {x} \sqrt {-x (a+b)+a b+x^2} \int \left (\frac {a (b-d)-(2 a-b-d) x}{\sqrt {x^2-(a+b) x+a b} \left (x^2+(-b-d) x+a d\right )}+\frac {1}{\sqrt {x^2-(a+b) x+a b}}\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 {a (b-d)-(2 a-b-d) x}{\sqrt {x^2-(a+b) x+a b} \left (x^2-(b+d) x+a d\right )}+\frac {1}{\sqrt {x^2-(a+b) x+a b}}\right )d\sqrt {x}}{\sqrt {x (a-x) (b-x)}}\) |
\(\Big \downarrow \) 7299 |
\(\displaystyle \frac {2 \sqrt {x} \sqrt {-x (a+b)+a b+x^2} \int \left (\frac {a (b-d)-(2 a-b-d) x}{\sqrt {x^2-(a+b) x+a b} \left (x^2-(b+d) x+a d\right )}+\frac {1}{\sqrt {x^2-(a+b) x+a b}}\right )d\sqrt {x}}{\sqrt {x (a-x) (b-x)}}\) |
3.6.66.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]
Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[ {v = RationalFunctionExpand[u/(a + b*x^n + c*x^(2*n)), x]}, Int[v, x] /; Su mQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]
Result contains higher order function than in optimal. Order 4 vs. order 3.
Time = 1.45 (sec) , antiderivative size = 2291, normalized size of antiderivative = 52.07
method | result | size |
default | \(\text {Expression too large to display}\) | \(2291\) |
elliptic | \(\text {Expression too large to display}\) | \(2296\) |
-2*b*(-(-b+x)/b)^(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ipticPi((-(-b+x)/b)^(1/2),b/(1/2*b-1/ 2*d-1/2*(-4*a*d+b^2+2*b*d+d^2)^(1/2)),(b/(-a+b))^(1/2))*d-b^2*(1-x/b)^(1/2 )*(-1/(-a+b)*a+1/(-a+b)*x)^(1/2)*(x/b)^(1/2)/(a*b*x-a*x^2-b*x^2+x^3)^(1/2) /(1/2*b-1/2*d-1/2*(-4*a*d+b^2+2*b*d+d^2)^(1/2))*EllipticPi((-(-b+x)/b)^(1/ 2),b/(1/2*b-1/2*d-1/2*(-4*a*d+b^2+2*b*d+d^2)^(1/2)),(b/(-a+b))^(1/2))-1/(- 4*a*d+b^2+2*b*d+d^2)^(1/2)*b*(1-x/b)^(1/2)*(-1/(-a+b)*a+1/(-a+b)*x)^(1/...
Leaf count of result is larger than twice the leaf count of optimal. 73 vs. \(2 (35) = 70\).
Time = 0.41 (sec) , antiderivative size = 224, normalized size of antiderivative = 5.09 \[ \int \frac {a b-2 a x+x^2}{\sqrt {x (-a+x) (-b+x)} \left (a d-(b+d) x+x^2\right )} \, dx=\left [\frac {\log \left (\frac {a^{2} d^{2} - 2 \, {\left (b - 3 \, d\right )} x^{3} + x^{4} + {\left (b^{2} - 6 \, {\left (a + b\right )} d + d^{2}\right )} x^{2} + 4 \, \sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}} {\left (a d + {\left (b - d\right )} x - x^{2}\right )} \sqrt {d} + 2 \, {\left (3 \, a b d - a d^{2}\right )} x}{a^{2} d^{2} - 2 \, {\left (b + d\right )} x^{3} + x^{4} + {\left (b^{2} + 2 \, {\left (a + b\right )} d + d^{2}\right )} x^{2} - 2 \, {\left (a b d + a d^{2}\right )} x}\right )}{2 \, \sqrt {d}}, \frac {\sqrt {-d} \arctan \left (-\frac {\sqrt {a b x - {\left (a + b\right )} x^{2} + x^{3}} {\left (a d + {\left (b - d\right )} x - x^{2}\right )} \sqrt {-d}}{2 \, {\left (a b d x - {\left (a + b\right )} d x^{2} + d x^{3}\right )}}\right )}{d}\right ] \]
[1/2*log((a^2*d^2 - 2*(b - 3*d)*x^3 + x^4 + (b^2 - 6*(a + b)*d + d^2)*x^2 + 4*sqrt(a*b*x - (a + b)*x^2 + x^3)*(a*d + (b - d)*x - x^2)*sqrt(d) + 2*(3 *a*b*d - a*d^2)*x)/(a^2*d^2 - 2*(b + d)*x^3 + x^4 + (b^2 + 2*(a + b)*d + d ^2)*x^2 - 2*(a*b*d + a*d^2)*x))/sqrt(d), sqrt(-d)*arctan(-1/2*sqrt(a*b*x - (a + b)*x^2 + x^3)*(a*d + (b - d)*x - x^2)*sqrt(-d)/(a*b*d*x - (a + b)*d* x^2 + d*x^3))/d]
Timed out. \[ \int \frac {a b-2 a x+x^2}{\sqrt {x (-a+x) (-b+x)} \left (a d-(b+d) x+x^2\right )} \, dx=\text {Timed out} \]
Exception generated. \[ \int \frac {a b-2 a x+x^2}{\sqrt {x (-a+x) (-b+x)} \left (a d-(b+d) x+x^2\right )} \, dx=\text {Exception raised: ValueError} \]
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume((d+b)^2-4*a*d>0)', see `assume?` for more
\[ \int \frac {a b-2 a x+x^2}{\sqrt {x (-a+x) (-b+x)} \left (a d-(b+d) x+x^2\right )} \, dx=\int { \frac {a b - 2 \, a x + x^{2}}{\sqrt {{\left (a - x\right )} {\left (b - x\right )} x} {\left (a d - {\left (b + d\right )} x + x^{2}\right )}} \,d x } \]
Time = 5.14 (sec) , antiderivative size = 465, normalized size of antiderivative = 10.57 \[ \int \frac {a b-2 a x+x^2}{\sqrt {x (-a+x) (-b+x)} \left (a d-(b+d) x+x^2\right )} \, dx=\frac {2\,b\,\sqrt {\frac {x}{b}}\,\sqrt {\frac {b-x}{b}}\,\sqrt {\frac {a-x}{a-b}}\,\Pi \left (\frac {b}{\frac {b}{2}-\frac {d}{2}+\frac {\sqrt {b^2+2\,b\,d+d^2-4\,a\,d}}{2}};\mathrm {asin}\left (\sqrt {\frac {b-x}{b}}\right )\middle |-\frac {b}{a-b}\right )\,\left (\left (\frac {b}{2}+\frac {d}{2}-\frac {\sqrt {b^2+2\,b\,d+d^2-4\,a\,d}}{2}\right )\,\left (b-2\,a+d\right )+a\,b-a\,d\right )}{\sqrt {x^3+\left (-a-b\right )\,x^2+a\,b\,x}\,\left (\frac {b}{2}-\frac {d}{2}+\frac {\sqrt {b^2+2\,b\,d+d^2-4\,a\,d}}{2}\right )\,\sqrt {b^2+2\,b\,d+d^2-4\,a\,d}}-\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}}+\frac {2\,b\,\sqrt {\frac {x}{b}}\,\sqrt {\frac {b-x}{b}}\,\sqrt {\frac {a-x}{a-b}}\,\Pi \left (-\frac {b}{\frac {d}{2}-\frac {b}{2}+\frac {\sqrt {b^2+2\,b\,d+d^2-4\,a\,d}}{2}};\mathrm {asin}\left (\sqrt {\frac {b-x}{b}}\right )\middle |-\frac {b}{a-b}\right )\,\left (\left (\frac {b}{2}+\frac {d}{2}+\frac {\sqrt {b^2+2\,b\,d+d^2-4\,a\,d}}{2}\right )\,\left (b-2\,a+d\right )+a\,b-a\,d\right )}{\sqrt {x^3+\left (-a-b\right )\,x^2+a\,b\,x}\,\left (\frac {d}{2}-\frac {b}{2}+\frac {\sqrt {b^2+2\,b\,d+d^2-4\,a\,d}}{2}\right )\,\sqrt {b^2+2\,b\,d+d^2-4\,a\,d}} \]
(2*b*(x/b)^(1/2)*((b - x)/b)^(1/2)*((a - x)/(a - b))^(1/2)*ellipticPi(b/(b /2 - d/2 + (2*b*d - 4*a*d + b^2 + d^2)^(1/2)/2), asin(((b - x)/b)^(1/2)), -b/(a - b))*((b/2 + d/2 - (2*b*d - 4*a*d + b^2 + d^2)^(1/2)/2)*(b - 2*a + d) + a*b - a*d))/((x^3 - x^2*(a + b) + a*b*x)^(1/2)*(b/2 - d/2 + (2*b*d - 4*a*d + b^2 + d^2)^(1/2)/2)*(2*b*d - 4*a*d + b^2 + d^2)^(1/2)) - (2*b*elli pticF(asin(((b - x)/b)^(1/2)), -b/(a - b))*(x/b)^(1/2)*((b - x)/b)^(1/2)*( (a - x)/(a - b))^(1/2))/(x^3 - x^2*(a + b) + a*b*x)^(1/2) + (2*b*(x/b)^(1/ 2)*((b - x)/b)^(1/2)*((a - x)/(a - b))^(1/2)*ellipticPi(-b/(d/2 - b/2 + (2 *b*d - 4*a*d + b^2 + d^2)^(1/2)/2), asin(((b - x)/b)^(1/2)), -b/(a - b))*( (b/2 + d/2 + (2*b*d - 4*a*d + b^2 + d^2)^(1/2)/2)*(b - 2*a + d) + a*b - a* d))/((x^3 - x^2*(a + b) + a*b*x)^(1/2)*(d/2 - b/2 + (2*b*d - 4*a*d + b^2 + d^2)^(1/2)/2)*(2*b*d - 4*a*d + b^2 + d^2)^(1/2))