Integrand size = 35, antiderivative size = 91 \[ \int \frac {-\sqrt {a b}+x}{\sqrt {x (a+x) (b+x)} \left (\sqrt {a b}+x\right )} \, dx=\frac {2 \arctan \left (\frac {(b+x) \left (\frac {a}{\sqrt {-a-b+2 \sqrt {a b}}}+\frac {x}{\sqrt {-a-b+2 \sqrt {a b}}}\right )}{\sqrt {a b x+(a+b) x^2+x^3}}\right )}{\sqrt {-a-b+2 \sqrt {a b}}} \] Output:
2*arctan((b+x)*(a/(-a-b+2*(a*b)^(1/2))^(1/2)+x/(-a-b+2*(a*b)^(1/2))^(1/2)) /(a*b*x+(a+b)*x^2+x^3)^(1/2))/(-a-b+2*(a*b)^(1/2))^(1/2)
Result contains higher order function than in optimal. Order 4 vs. order 3 in optimal.
Time = 17.62 (sec) , antiderivative size = 101, normalized size of antiderivative = 1.11 \[ \int \frac {-\sqrt {a b}+x}{\sqrt {x (a+x) (b+x)} \left (\sqrt {a b}+x\right )} \, dx=-\frac {2 a \sqrt {1+\frac {a}{x}} \sqrt {1+\frac {b}{x}} x^{3/2} \left (\operatorname {EllipticF}\left (\arcsin \left (\frac {\sqrt {-a}}{\sqrt {x}}\right ),\frac {b}{a}\right )-2 \operatorname {EllipticPi}\left (\frac {b}{\sqrt {a b}},\arcsin \left (\frac {\sqrt {-a}}{\sqrt {x}}\right ),\frac {b}{a}\right )\right )}{(-a)^{3/2} \sqrt {x (a+x) (b+x)}} \] Input:
Integrate[(-Sqrt[a*b] + x)/(Sqrt[x*(a + x)*(b + x)]*(Sqrt[a*b] + x)),x]
Output:
(-2*a*Sqrt[1 + a/x]*Sqrt[1 + b/x]*x^(3/2)*(EllipticF[ArcSin[Sqrt[-a]/Sqrt[ x]], b/a] - 2*EllipticPi[b/Sqrt[a*b], ArcSin[Sqrt[-a]/Sqrt[x]], b/a]))/((- a)^(3/2)*Sqrt[x*(a + x)*(b + x)])
Time = 0.67 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.43, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2467, 25, 2035, 2212, 218}
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-\sqrt {a b}}{\sqrt {x (a+x) (b+x)} \left (\sqrt {a b}+x\right )} \, dx\) |
\(\Big \downarrow \) 2467 |
\(\displaystyle \frac {\sqrt {x} \sqrt {x (a+b)+a b+x^2} \int -\frac {\sqrt {a b}-x}{\sqrt {x} \left (x+\sqrt {a b}\right ) \sqrt {x^2+(a+b) x+a b}}dx}{\sqrt {x (a+x) (b+x)}}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\sqrt {x} \sqrt {x (a+b)+a b+x^2} \int \frac {\sqrt {a b}-x}{\sqrt {x} \left (x+\sqrt {a b}\right ) \sqrt {x^2+(a+b) x+a b}}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 {\sqrt {a b}-x}{\left (x+\sqrt {a b}\right ) \sqrt {x^2+(a+b) x+a b}}d\sqrt {x}}{\sqrt {x (a+x) (b+x)}}\) |
\(\Big \downarrow \) 2212 |
\(\displaystyle -\frac {2 \sqrt {x} \sqrt {a b} \sqrt {x (a+b)+a b+x^2} \int \frac {1}{\left (2 a b-\sqrt {a b} (a+b)\right ) x+\sqrt {a b}}d\frac {\sqrt {x}}{\sqrt {x^2+(a+b) x+a b}}}{\sqrt {x (a+x) (b+x)}}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle -\frac {2 \sqrt {x} \sqrt [4]{a b} \sqrt {x (a+b)+a b+x^2} \arctan \left (\frac {\sqrt {x} \sqrt {2 a b-a \sqrt {a b}-b \sqrt {a b}}}{\sqrt [4]{a b} \sqrt {x (a+b)+a b+x^2}}\right )}{\sqrt {2 a b-a \sqrt {a b}-b \sqrt {a b}} \sqrt {x (a+x) (b+x)}}\) |
Input:
Int[(-Sqrt[a*b] + x)/(Sqrt[x*(a + x)*(b + x)]*(Sqrt[a*b] + x)),x]
Output:
(-2*(a*b)^(1/4)*Sqrt[x]*Sqrt[a*b + (a + b)*x + x^2]*ArcTan[(Sqrt[2*a*b - a *Sqrt[a*b] - b*Sqrt[a*b]]*Sqrt[x])/((a*b)^(1/4)*Sqrt[a*b + (a + b)*x + x^2 ])])/(Sqrt[2*a*b - a*Sqrt[a*b] - b*Sqrt[a*b]]*Sqrt[x*(a + x)*(b + x)])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
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[((A_) + (B_.)*(x_)^2)/(((d_) + (e_.)*(x_)^2)*Sqrt[(a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4]), x_Symbol] :> Simp[A Subst[Int[1/(d - (b*d - 2*a*e)*x^2), x], x, x/Sqrt[a + b*x^2 + c*x^4]], x] /; FreeQ[{a, b, c, d, e, A, B}, x] & & EqQ[c*d^2 - a*e^2, 0] && EqQ[B*d + A*e, 0]
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]
Time = 0.98 (sec) , antiderivative size = 50, normalized size of antiderivative = 0.55
method | result | size |
pseudoelliptic | \(\frac {2 \arctan \left (\frac {\sqrt {x \left (a +x \right ) \left (b +x \right )}}{x \sqrt {-a -b +2 \sqrt {a b}}}\right )}{\sqrt {-a -b +2 \sqrt {a b}}}\) | \(50\) |
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 )}{\sqrt {a b x +a \,x^{2}+b \,x^{2}+x^{3}}}-\frac {2 \sqrt {a b}\, \left (a b -x^{2}\right ) \sqrt {x \left (a +x \right ) \left (b +x \right ) a b}\, \left (\frac {b \sqrt {1+\frac {x}{b}}\, \sqrt {\frac {x}{a -b}+\frac {a}{a -b}}\, \sqrt {-\frac {x}{b}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {b +x}{b}}, -\frac {b}{-b -\sqrt {a b}}, \sqrt {-\frac {b}{a -b}}\right )}{\sqrt {a b x +a \,x^{2}+b \,x^{2}+x^{3}}\, \left (-b -\sqrt {a b}\right )}+\frac {b \sqrt {1+\frac {x}{b}}\, \sqrt {\frac {x}{a -b}+\frac {a}{a -b}}\, \sqrt {-\frac {x}{b}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {b +x}{b}}, -\frac {b}{-b +\sqrt {a b}}, \sqrt {-\frac {b}{a -b}}\right )}{\sqrt {a b x +a \,x^{2}+b \,x^{2}+x^{3}}\, \left (-b +\sqrt {a b}\right )}-\frac {a \,b^{2} \sqrt {1+\frac {x}{b}}\, \sqrt {\frac {x}{a -b}+\frac {a}{a -b}}\, \sqrt {-\frac {x}{b}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {b +x}{b}}, -\frac {b}{-b -\sqrt {a b}}, \sqrt {-\frac {b}{a -b}}\right )}{\sqrt {a b}\, \sqrt {a^{2} b^{2} x +a^{2} b \,x^{2}+a \,b^{2} x^{2}+a b \,x^{3}}\, \left (-b -\sqrt {a b}\right )}+\frac {a \,b^{2} \sqrt {1+\frac {x}{b}}\, \sqrt {\frac {x}{a -b}+\frac {a}{a -b}}\, \sqrt {-\frac {x}{b}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {b +x}{b}}, -\frac {b}{-b +\sqrt {a b}}, \sqrt {-\frac {b}{a -b}}\right )}{\sqrt {a b}\, \sqrt {a^{2} b^{2} x +a^{2} b \,x^{2}+a \,b^{2} x^{2}+a b \,x^{3}}\, \left (-b +\sqrt {a b}\right )}\right )}{\left (\sqrt {a b}+x \right ) \left (a b \sqrt {x \left (a +x \right ) \left (b +x \right )}-x \sqrt {x \left (a +x \right ) \left (b +x \right ) a b}\right )}\) | \(625\) |
elliptic | \(\frac {\left (-\sqrt {a b}+x \right ) \left (a b -x^{2}\right ) \sqrt {x \left (a +x \right ) \left (b +x \right ) a b}\, \left (\frac {2 b \sqrt {1+\frac {x}{b}}\, \sqrt {\frac {x}{a -b}+\frac {a}{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 {2 a \,b^{2} \sqrt {1+\frac {x}{b}}\, \sqrt {\frac {x}{a -b}+\frac {a}{a -b}}\, \sqrt {-\frac {x}{b}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {b +x}{b}}, -\frac {b}{-b -\sqrt {a b}}, \sqrt {-\frac {b}{a -b}}\right )}{\sqrt {a b}\, \sqrt {a b x +a \,x^{2}+b \,x^{2}+x^{3}}\, \left (-b -\sqrt {a b}\right )}-\frac {2 a \,b^{2} \sqrt {1+\frac {x}{b}}\, \sqrt {\frac {x}{a -b}+\frac {a}{a -b}}\, \sqrt {-\frac {x}{b}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {b +x}{b}}, -\frac {b}{-b +\sqrt {a b}}, \sqrt {-\frac {b}{a -b}}\right )}{\sqrt {a b}\, \sqrt {a b x +a \,x^{2}+b \,x^{2}+x^{3}}\, \left (-b +\sqrt {a b}\right )}-\frac {2 a \,b^{2} \sqrt {1+\frac {x}{b}}\, \sqrt {\frac {x}{a -b}+\frac {a}{a -b}}\, \sqrt {-\frac {x}{b}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {b +x}{b}}, -\frac {b}{-b -\sqrt {a b}}, \sqrt {-\frac {b}{a -b}}\right )}{\sqrt {a^{2} b^{2} x +a^{2} b \,x^{2}+a \,b^{2} x^{2}+a b \,x^{3}}\, \left (-b -\sqrt {a b}\right )}-\frac {2 a \,b^{2} \sqrt {1+\frac {x}{b}}\, \sqrt {\frac {x}{a -b}+\frac {a}{a -b}}\, \sqrt {-\frac {x}{b}}\, \operatorname {EllipticPi}\left (\sqrt {\frac {b +x}{b}}, -\frac {b}{-b +\sqrt {a b}}, \sqrt {-\frac {b}{a -b}}\right )}{\sqrt {a^{2} b^{2} x +a^{2} b \,x^{2}+a \,b^{2} x^{2}+a b \,x^{3}}\, \left (-b +\sqrt {a b}\right )}\right )}{\left (\sqrt {a b}+x \right ) \left (2 a b x \sqrt {x \left (a +x \right ) \left (b +x \right )}-\sqrt {x \left (a +x \right ) \left (b +x \right ) a b}\, a b -\sqrt {x \left (a +x \right ) \left (b +x \right ) a b}\, x^{2}\right )}\) | \(664\) |
Input:
int((-(a*b)^(1/2)+x)/(x*(a+x)*(b+x))^(1/2)/((a*b)^(1/2)+x),x,method=_RETUR NVERBOSE)
Output:
2/(-a-b+2*(a*b)^(1/2))^(1/2)*arctan((x*(a+x)*(b+x))^(1/2)/x/(-a-b+2*(a*b)^ (1/2))^(1/2))
Time = 0.18 (sec) , antiderivative size = 791, normalized size of antiderivative = 8.69 \[ \int \frac {-\sqrt {a b}+x}{\sqrt {x (a+x) (b+x)} \left (\sqrt {a b}+x\right )} \, dx =\text {Too large to display} \] Input:
integrate((-(a*b)^(1/2)+x)/(x*(a+x)*(b+x))^(1/2)/((a*b)^(1/2)+x),x, algori thm="fricas")
Output:
[-1/2*sqrt(a + b + 2*sqrt(a*b))*log(-(a^5*b^4 - a^4*b^5 + (a - b)*x^8 + 8* (a^2 - b^2)*x^7 + 4*(2*a^3 + 17*a^2*b - 17*a*b^2 - 2*b^3)*x^6 + 120*(a^3*b - a*b^3)*x^5 + 2*(24*a^4*b + 91*a^3*b^2 - 91*a^2*b^3 - 24*a*b^4)*x^4 + 12 0*(a^4*b^2 - a^2*b^4)*x^3 + 4*(2*a^5*b^2 + 17*a^4*b^3 - 17*a^3*b^4 - 2*a^2 *b^5)*x^2 + 4*(a^4*b^3 + a^3*b^4 + (a + b)*x^6 + 2*(a^2 + 8*a*b + b^2)*x^5 + 31*(a^2*b + a*b^2)*x^4 + 4*(3*a^3*b + 16*a^2*b^2 + 3*a*b^3)*x^3 + 31*(a ^3*b^2 + a^2*b^3)*x^2 + 2*(a^4*b^2 + 8*a^3*b^3 + a^2*b^4)*x - 2*(a^3*b^3 + 5*(a + b)*x^5 + x^6 + (4*a^2 + 23*a*b + 4*b^2)*x^4 + 22*(a^2*b + a*b^2)*x ^3 + (4*a^3*b + 23*a^2*b^2 + 4*a*b^3)*x^2 + 5*(a^3*b^2 + a^2*b^3)*x)*sqrt( a*b))*sqrt(a*b*x + (a + b)*x^2 + x^3)*sqrt(a + b + 2*sqrt(a*b)) + 8*(a^5*b ^3 - a^3*b^5)*x - 16*((a - b)*x^7 + 3*(a^2 - b^2)*x^6 + (2*a^3 + 9*a^2*b - 9*a*b^2 - 2*b^3)*x^5 + 10*(a^3*b - a*b^3)*x^4 + (2*a^4*b + 9*a^3*b^2 - 9* a^2*b^3 - 2*a*b^4)*x^3 + 3*(a^4*b^2 - a^2*b^4)*x^2 + (a^4*b^3 - a^3*b^4)*x )*sqrt(a*b))/(a^4*b^4 - 4*a^3*b^3*x^2 + 6*a^2*b^2*x^4 - 4*a*b*x^6 + x^8))/ (a - b), sqrt(-a - b - 2*sqrt(a*b))*arctan(1/2*sqrt(a*b*x + (a + b)*x^2 + x^3)*(a*b + 2*(a + b)*x + x^2 - 2*sqrt(a*b)*x)*sqrt(-a - b - 2*sqrt(a*b))/ ((a - b)*x^3 + (a^2 - b^2)*x^2 + (a^2*b - a*b^2)*x))/(a - b)]
Timed out. \[ \int \frac {-\sqrt {a b}+x}{\sqrt {x (a+x) (b+x)} \left (\sqrt {a b}+x\right )} \, dx=\text {Timed out} \] Input:
integrate((-(a*b)**(1/2)+x)/(x*(a+x)*(b+x))**(1/2)/((a*b)**(1/2)+x),x)
Output:
Timed out
\[ \int \frac {-\sqrt {a b}+x}{\sqrt {x (a+x) (b+x)} \left (\sqrt {a b}+x\right )} \, dx=\int { \frac {x - \sqrt {a b}}{\sqrt {{\left (a + x\right )} {\left (b + x\right )} x} {\left (x + \sqrt {a b}\right )}} \,d x } \] Input:
integrate((-(a*b)^(1/2)+x)/(x*(a+x)*(b+x))^(1/2)/((a*b)^(1/2)+x),x, algori thm="maxima")
Output:
integrate((x - sqrt(a*b))/(sqrt((a + x)*(b + x)*x)*(x + sqrt(a*b))), x)
\[ \int \frac {-\sqrt {a b}+x}{\sqrt {x (a+x) (b+x)} \left (\sqrt {a b}+x\right )} \, dx=\int { \frac {x - \sqrt {a b}}{\sqrt {{\left (a + x\right )} {\left (b + x\right )} x} {\left (x + \sqrt {a b}\right )}} \,d x } \] Input:
integrate((-(a*b)^(1/2)+x)/(x*(a+x)*(b+x))^(1/2)/((a*b)^(1/2)+x),x, algori thm="giac")
Output:
integrate((x - sqrt(a*b))/(sqrt((a + x)*(b + x)*x)*(x + sqrt(a*b))), x)
Timed out. \[ \int \frac {-\sqrt {a b}+x}{\sqrt {x (a+x) (b+x)} \left (\sqrt {a b}+x\right )} \, dx=\int \frac {x-\sqrt {a\,b}}{\left (x+\sqrt {a\,b}\right )\,\sqrt {x\,\left (a+x\right )\,\left (b+x\right )}} \,d x \] Input:
int((x - (a*b)^(1/2))/((x + (a*b)^(1/2))*(x*(a + x)*(b + x))^(1/2)),x)
Output:
int((x - (a*b)^(1/2))/((x + (a*b)^(1/2))*(x*(a + x)*(b + x))^(1/2)), x)
\[ \int \frac {-\sqrt {a b}+x}{\sqrt {x (a+x) (b+x)} \left (\sqrt {a b}+x\right )} \, dx=\int \frac {-\sqrt {a b}+x}{\sqrt {x \left (a +x \right ) \left (b +x \right )}\, \left (\sqrt {a b}+x \right )}d x \] Input:
int((-(a*b)^(1/2)+x)/(x*(a+x)*(b+x))^(1/2)/((a*b)^(1/2)+x),x)
Output:
int((-(a*b)^(1/2)+x)/(x*(a+x)*(b+x))^(1/2)/((a*b)^(1/2)+x),x)