\(\int \frac {\sqrt {c+\frac {d}{x}}}{\sqrt {a+\frac {b}{x}} x} \, dx\) [478]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [B] (verified)
Fricas [A] (verification not implemented)
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 26, antiderivative size = 93 \[ \int \frac {\sqrt {c+\frac {d}{x}}}{\sqrt {a+\frac {b}{x}} x} \, dx=\frac {2 \sqrt {c} \text {arctanh}\left (\frac {\sqrt {c} \sqrt {a+\frac {b}{x}}}{\sqrt {a} \sqrt {c+\frac {d}{x}}}\right )}{\sqrt {a}}-\frac {2 \sqrt {d} \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a+\frac {b}{x}}}{\sqrt {b} \sqrt {c+\frac {d}{x}}}\right )}{\sqrt {b}} \] Output:

2*c^(1/2)*arctanh(c^(1/2)*(a+b/x)^(1/2)/a^(1/2)/(c+d/x)^(1/2))/a^(1/2)-2*d 
^(1/2)*arctanh(d^(1/2)*(a+b/x)^(1/2)/b^(1/2)/(c+d/x)^(1/2))/b^(1/2)
                                                                                    
                                                                                    
 

Mathematica [A] (verified)

Time = 10.36 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.53 \[ \int \frac {\sqrt {c+\frac {d}{x}}}{\sqrt {a+\frac {b}{x}} x} \, dx=-\frac {2 \sqrt {d} \sqrt {b c-a d} \sqrt {c+\frac {d}{x}} x \sqrt {\frac {b (d+c x)}{(b c-a d) x}} \text {arcsinh}\left (\frac {\sqrt {d} \sqrt {a+\frac {b}{x}}}{\sqrt {b c-a d}}\right )}{b d+b c x}+\frac {2 \sqrt {c} \text {arctanh}\left (\frac {\sqrt {c} \sqrt {a+\frac {b}{x}}}{\sqrt {a} \sqrt {c+\frac {d}{x}}}\right )}{\sqrt {a}} \] Input:

Integrate[Sqrt[c + d/x]/(Sqrt[a + b/x]*x),x]
 

Output:

(-2*Sqrt[d]*Sqrt[b*c - a*d]*Sqrt[c + d/x]*x*Sqrt[(b*(d + c*x))/((b*c - a*d 
)*x)]*ArcSinh[(Sqrt[d]*Sqrt[a + b/x])/Sqrt[b*c - a*d]])/(b*d + b*c*x) + (2 
*Sqrt[c]*ArcTanh[(Sqrt[c]*Sqrt[a + b/x])/(Sqrt[a]*Sqrt[c + d/x])])/Sqrt[a]
 

Rubi [A] (verified)

Time = 0.40 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {948, 140, 27, 66, 104, 221}

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 {\sqrt {c+\frac {d}{x}}}{x \sqrt {a+\frac {b}{x}}} \, dx\)

\(\Big \downarrow \) 948

\(\displaystyle -\int \frac {\sqrt {c+\frac {d}{x}} x}{\sqrt {a+\frac {b}{x}}}d\frac {1}{x}\)

\(\Big \downarrow \) 140

\(\displaystyle -d \int \frac {1}{\sqrt {a+\frac {b}{x}} \sqrt {c+\frac {d}{x}}}d\frac {1}{x}-\int \frac {c x}{\sqrt {a+\frac {b}{x}} \sqrt {c+\frac {d}{x}}}d\frac {1}{x}\)

\(\Big \downarrow \) 27

\(\displaystyle -d \int \frac {1}{\sqrt {a+\frac {b}{x}} \sqrt {c+\frac {d}{x}}}d\frac {1}{x}-c \int \frac {x}{\sqrt {a+\frac {b}{x}} \sqrt {c+\frac {d}{x}}}d\frac {1}{x}\)

\(\Big \downarrow \) 66

\(\displaystyle -2 d \int \frac {1}{b-\frac {d}{x^2}}d\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {c+\frac {d}{x}}}-c \int \frac {x}{\sqrt {a+\frac {b}{x}} \sqrt {c+\frac {d}{x}}}d\frac {1}{x}\)

\(\Big \downarrow \) 104

\(\displaystyle -2 c \int \frac {1}{\frac {c}{x^2}-a}d\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {c+\frac {d}{x}}}-2 d \int \frac {1}{b-\frac {d}{x^2}}d\frac {\sqrt {a+\frac {b}{x}}}{\sqrt {c+\frac {d}{x}}}\)

\(\Big \downarrow \) 221

\(\displaystyle \frac {2 \sqrt {c} \text {arctanh}\left (\frac {\sqrt {c} \sqrt {a+\frac {b}{x}}}{\sqrt {a} \sqrt {c+\frac {d}{x}}}\right )}{\sqrt {a}}-\frac {2 \sqrt {d} \text {arctanh}\left (\frac {\sqrt {d} \sqrt {a+\frac {b}{x}}}{\sqrt {b} \sqrt {c+\frac {d}{x}}}\right )}{\sqrt {b}}\)

Input:

Int[Sqrt[c + d/x]/(Sqrt[a + b/x]*x),x]
 

Output:

(2*Sqrt[c]*ArcTanh[(Sqrt[c]*Sqrt[a + b/x])/(Sqrt[a]*Sqrt[c + d/x])])/Sqrt[ 
a] - (2*Sqrt[d]*ArcTanh[(Sqrt[d]*Sqrt[a + b/x])/(Sqrt[b]*Sqrt[c + d/x])])/ 
Sqrt[b]
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 66
Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]), x_Symbol] :> Simp[ 
2   Subst[Int[1/(b - d*x^2), x], x, Sqrt[a + b*x]/Sqrt[c + d*x]], x] /; Fre 
eQ[{a, b, c, d}, x] &&  !GtQ[c - a*(d/b), 0]
 

rule 104
Int[(((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_))/((e_.) + (f_.)*(x 
_)), x_] :> With[{q = Denominator[m]}, Simp[q   Subst[Int[x^(q*(m + 1) - 1) 
/(b*e - a*f - (d*e - c*f)*x^q), x], x, (a + b*x)^(1/q)/(c + d*x)^(1/q)], x] 
] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[m + n + 1, 0] && RationalQ[n] && L 
tQ[-1, m, 0] && SimplerQ[a + b*x, c + d*x]
 

rule 140
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_), x_] :> Simp[b*d^(m + n)*f^p   Int[(a + b*x)^(m - 1)/(c + d*x)^m, x] 
, x] + Int[(a + b*x)^(m - 1)*((e + f*x)^p/(c + d*x)^m)*ExpandToSum[(a + b*x 
)*(c + d*x)^(-p - 1) - (b*d^(-p - 1)*f^p)/(e + f*x)^p, x], x] /; FreeQ[{a, 
b, c, d, e, f, m, n}, x] && EqQ[m + n + p + 1, 0] && ILtQ[p, 0] && (GtQ[m, 
0] || SumSimplerQ[m, -1] ||  !(GtQ[n, 0] || SumSimplerQ[n, -1]))
 

rule 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 

rule 948
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_. 
), x_Symbol] :> Simp[1/n   Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^ 
p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] && NeQ 
[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(142\) vs. \(2(69)=138\).

Time = 0.18 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.54

method result size
default \(-\frac {\sqrt {\frac {a x +b}{x}}\, x \sqrt {\frac {c x +d}{x}}\, \left (\ln \left (\frac {a d x +c b x +2 \sqrt {b d}\, \sqrt {\left (c x +d \right ) \left (a x +b \right )}+2 b d}{x}\right ) \sqrt {a c}\, d -\ln \left (\frac {2 a c x +2 \sqrt {\left (c x +d \right ) \left (a x +b \right )}\, \sqrt {a c}+a d +c b}{2 \sqrt {a c}}\right ) \sqrt {b d}\, c \right )}{\sqrt {b d}\, \sqrt {a c}\, \sqrt {\left (c x +d \right ) \left (a x +b \right )}}\) \(143\)

Input:

int((c+d/x)^(1/2)/(a+b/x)^(1/2)/x,x,method=_RETURNVERBOSE)
 

Output:

-((a*x+b)/x)^(1/2)*x*((c*x+d)/x)^(1/2)*(ln((a*d*x+c*b*x+2*(b*d)^(1/2)*((c* 
x+d)*(a*x+b))^(1/2)+2*b*d)/x)*(a*c)^(1/2)*d-ln(1/2*(2*a*c*x+2*((c*x+d)*(a* 
x+b))^(1/2)*(a*c)^(1/2)+a*d+c*b)/(a*c)^(1/2))*(b*d)^(1/2)*c)/(b*d)^(1/2)/( 
a*c)^(1/2)/((c*x+d)*(a*x+b))^(1/2)
 

Fricas [A] (verification not implemented)

Time = 0.23 (sec) , antiderivative size = 705, normalized size of antiderivative = 7.58 \[ \int \frac {\sqrt {c+\frac {d}{x}}}{\sqrt {a+\frac {b}{x}} x} \, dx=\left [\frac {1}{2} \, \sqrt {\frac {c}{a}} \log \left (-8 \, a^{2} c^{2} x^{2} - b^{2} c^{2} - 6 \, a b c d - a^{2} d^{2} - 4 \, {\left (2 \, a^{2} c x^{2} + {\left (a b c + a^{2} d\right )} x\right )} \sqrt {\frac {c}{a}} \sqrt {\frac {a x + b}{x}} \sqrt {\frac {c x + d}{x}} - 8 \, {\left (a b c^{2} + a^{2} c d\right )} x\right ) + \frac {1}{2} \, \sqrt {\frac {d}{b}} \log \left (-\frac {8 \, b^{2} d^{2} + {\left (b^{2} c^{2} + 6 \, a b c d + a^{2} d^{2}\right )} x^{2} - 4 \, {\left (2 \, b^{2} d x + {\left (b^{2} c + a b d\right )} x^{2}\right )} \sqrt {\frac {d}{b}} \sqrt {\frac {a x + b}{x}} \sqrt {\frac {c x + d}{x}} + 8 \, {\left (b^{2} c d + a b d^{2}\right )} x}{x^{2}}\right ), -\sqrt {-\frac {c}{a}} \arctan \left (\frac {2 \, a x \sqrt {-\frac {c}{a}} \sqrt {\frac {a x + b}{x}} \sqrt {\frac {c x + d}{x}}}{2 \, a c x + b c + a d}\right ) + \frac {1}{2} \, \sqrt {\frac {d}{b}} \log \left (-\frac {8 \, b^{2} d^{2} + {\left (b^{2} c^{2} + 6 \, a b c d + a^{2} d^{2}\right )} x^{2} - 4 \, {\left (2 \, b^{2} d x + {\left (b^{2} c + a b d\right )} x^{2}\right )} \sqrt {\frac {d}{b}} \sqrt {\frac {a x + b}{x}} \sqrt {\frac {c x + d}{x}} + 8 \, {\left (b^{2} c d + a b d^{2}\right )} x}{x^{2}}\right ), \sqrt {-\frac {d}{b}} \arctan \left (\frac {2 \, b x \sqrt {-\frac {d}{b}} \sqrt {\frac {a x + b}{x}} \sqrt {\frac {c x + d}{x}}}{2 \, b d + {\left (b c + a d\right )} x}\right ) + \frac {1}{2} \, \sqrt {\frac {c}{a}} \log \left (-8 \, a^{2} c^{2} x^{2} - b^{2} c^{2} - 6 \, a b c d - a^{2} d^{2} - 4 \, {\left (2 \, a^{2} c x^{2} + {\left (a b c + a^{2} d\right )} x\right )} \sqrt {\frac {c}{a}} \sqrt {\frac {a x + b}{x}} \sqrt {\frac {c x + d}{x}} - 8 \, {\left (a b c^{2} + a^{2} c d\right )} x\right ), -\sqrt {-\frac {c}{a}} \arctan \left (\frac {2 \, a x \sqrt {-\frac {c}{a}} \sqrt {\frac {a x + b}{x}} \sqrt {\frac {c x + d}{x}}}{2 \, a c x + b c + a d}\right ) + \sqrt {-\frac {d}{b}} \arctan \left (\frac {2 \, b x \sqrt {-\frac {d}{b}} \sqrt {\frac {a x + b}{x}} \sqrt {\frac {c x + d}{x}}}{2 \, b d + {\left (b c + a d\right )} x}\right )\right ] \] Input:

integrate((c+d/x)^(1/2)/(a+b/x)^(1/2)/x,x, algorithm="fricas")
 

Output:

[1/2*sqrt(c/a)*log(-8*a^2*c^2*x^2 - b^2*c^2 - 6*a*b*c*d - a^2*d^2 - 4*(2*a 
^2*c*x^2 + (a*b*c + a^2*d)*x)*sqrt(c/a)*sqrt((a*x + b)/x)*sqrt((c*x + d)/x 
) - 8*(a*b*c^2 + a^2*c*d)*x) + 1/2*sqrt(d/b)*log(-(8*b^2*d^2 + (b^2*c^2 + 
6*a*b*c*d + a^2*d^2)*x^2 - 4*(2*b^2*d*x + (b^2*c + a*b*d)*x^2)*sqrt(d/b)*s 
qrt((a*x + b)/x)*sqrt((c*x + d)/x) + 8*(b^2*c*d + a*b*d^2)*x)/x^2), -sqrt( 
-c/a)*arctan(2*a*x*sqrt(-c/a)*sqrt((a*x + b)/x)*sqrt((c*x + d)/x)/(2*a*c*x 
 + b*c + a*d)) + 1/2*sqrt(d/b)*log(-(8*b^2*d^2 + (b^2*c^2 + 6*a*b*c*d + a^ 
2*d^2)*x^2 - 4*(2*b^2*d*x + (b^2*c + a*b*d)*x^2)*sqrt(d/b)*sqrt((a*x + b)/ 
x)*sqrt((c*x + d)/x) + 8*(b^2*c*d + a*b*d^2)*x)/x^2), sqrt(-d/b)*arctan(2* 
b*x*sqrt(-d/b)*sqrt((a*x + b)/x)*sqrt((c*x + d)/x)/(2*b*d + (b*c + a*d)*x) 
) + 1/2*sqrt(c/a)*log(-8*a^2*c^2*x^2 - b^2*c^2 - 6*a*b*c*d - a^2*d^2 - 4*( 
2*a^2*c*x^2 + (a*b*c + a^2*d)*x)*sqrt(c/a)*sqrt((a*x + b)/x)*sqrt((c*x + d 
)/x) - 8*(a*b*c^2 + a^2*c*d)*x), -sqrt(-c/a)*arctan(2*a*x*sqrt(-c/a)*sqrt( 
(a*x + b)/x)*sqrt((c*x + d)/x)/(2*a*c*x + b*c + a*d)) + sqrt(-d/b)*arctan( 
2*b*x*sqrt(-d/b)*sqrt((a*x + b)/x)*sqrt((c*x + d)/x)/(2*b*d + (b*c + a*d)* 
x))]
 

Sympy [F]

\[ \int \frac {\sqrt {c+\frac {d}{x}}}{\sqrt {a+\frac {b}{x}} x} \, dx=\int \frac {\sqrt {c + \frac {d}{x}}}{x \sqrt {a + \frac {b}{x}}}\, dx \] Input:

integrate((c+d/x)**(1/2)/(a+b/x)**(1/2)/x,x)
 

Output:

Integral(sqrt(c + d/x)/(x*sqrt(a + b/x)), x)
 

Maxima [F]

\[ \int \frac {\sqrt {c+\frac {d}{x}}}{\sqrt {a+\frac {b}{x}} x} \, dx=\int { \frac {\sqrt {c + \frac {d}{x}}}{\sqrt {a + \frac {b}{x}} x} \,d x } \] Input:

integrate((c+d/x)^(1/2)/(a+b/x)^(1/2)/x,x, algorithm="maxima")
 

Output:

integrate(sqrt(c + d/x)/(sqrt(a + b/x)*x), x)
 

Giac [F]

\[ \int \frac {\sqrt {c+\frac {d}{x}}}{\sqrt {a+\frac {b}{x}} x} \, dx=\int { \frac {\sqrt {c + \frac {d}{x}}}{\sqrt {a + \frac {b}{x}} x} \,d x } \] Input:

integrate((c+d/x)^(1/2)/(a+b/x)^(1/2)/x,x, algorithm="giac")
 

Output:

integrate(sqrt(c + d/x)/(sqrt(a + b/x)*x), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {\sqrt {c+\frac {d}{x}}}{\sqrt {a+\frac {b}{x}} x} \, dx=\int \frac {\sqrt {c+\frac {d}{x}}}{x\,\sqrt {a+\frac {b}{x}}} \,d x \] Input:

int((c + d/x)^(1/2)/(x*(a + b/x)^(1/2)),x)
 

Output:

int((c + d/x)^(1/2)/(x*(a + b/x)^(1/2)), x)
                                                                                    
                                                                                    
 

Reduce [B] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 179, normalized size of antiderivative = 1.92 \[ \int \frac {\sqrt {c+\frac {d}{x}}}{\sqrt {a+\frac {b}{x}} x} \, dx=\frac {2 \sqrt {c}\, \sqrt {a}\, \mathrm {log}\left (\frac {\sqrt {c}\, \sqrt {a x +b}+\sqrt {a}\, \sqrt {c x +d}}{\sqrt {a d -b c}}\right ) b +\sqrt {d}\, \sqrt {b}\, \mathrm {log}\left (\sqrt {c}\, \sqrt {a x +b}+\sqrt {a}\, \sqrt {c x +d}-\sqrt {2 \sqrt {d}\, \sqrt {c}\, \sqrt {b}\, \sqrt {a}+a d +b c}\right ) a +\sqrt {d}\, \sqrt {b}\, \mathrm {log}\left (\sqrt {c}\, \sqrt {a x +b}+\sqrt {a}\, \sqrt {c x +d}+\sqrt {2 \sqrt {d}\, \sqrt {c}\, \sqrt {b}\, \sqrt {a}+a d +b c}\right ) a -\sqrt {d}\, \sqrt {b}\, \mathrm {log}\left (2 \sqrt {c}\, \sqrt {a}\, \sqrt {c x +d}\, \sqrt {a x +b}+2 \sqrt {d}\, \sqrt {c}\, \sqrt {b}\, \sqrt {a}+2 a c x \right ) a}{a b} \] Input:

int((c+d/x)^(1/2)/(a+b/x)^(1/2)/x,x)
 

Output:

(2*sqrt(c)*sqrt(a)*log((sqrt(c)*sqrt(a*x + b) + sqrt(a)*sqrt(c*x + d))/sqr 
t(a*d - b*c))*b + sqrt(d)*sqrt(b)*log(sqrt(c)*sqrt(a*x + b) + sqrt(a)*sqrt 
(c*x + d) - sqrt(2*sqrt(d)*sqrt(c)*sqrt(b)*sqrt(a) + a*d + b*c))*a + sqrt( 
d)*sqrt(b)*log(sqrt(c)*sqrt(a*x + b) + sqrt(a)*sqrt(c*x + d) + sqrt(2*sqrt 
(d)*sqrt(c)*sqrt(b)*sqrt(a) + a*d + b*c))*a - sqrt(d)*sqrt(b)*log(2*sqrt(c 
)*sqrt(a)*sqrt(c*x + d)*sqrt(a*x + b) + 2*sqrt(d)*sqrt(c)*sqrt(b)*sqrt(a) 
+ 2*a*c*x)*a)/(a*b)