\(\int \sqrt {a+\frac {c}{x^2}+\frac {b}{x}} \, dx\) [16]

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

Optimal result

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

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

Mathematica [A] (verified)

Time = 0.26 (sec) , antiderivative size = 131, normalized size of antiderivative = 1.25 \[ \int \sqrt {a+\frac {c}{x^2}+\frac {b}{x}} \, dx=\frac {x \sqrt {a+\frac {c+b x}{x^2}} \left (2 \sqrt {a} \sqrt {c+x (b+a x)}+4 \sqrt {a} \sqrt {c} \text {arctanh}\left (\frac {\sqrt {a} x-\sqrt {c+x (b+a x)}}{\sqrt {c}}\right )-b \log \left (b+2 a x-2 \sqrt {a} \sqrt {c+x (b+a x)}\right )\right )}{2 \sqrt {a} \sqrt {c+x (b+a x)}} \] Input:

Integrate[Sqrt[a + c/x^2 + b/x],x]
 

Output:

(x*Sqrt[a + (c + b*x)/x^2]*(2*Sqrt[a]*Sqrt[c + x*(b + a*x)] + 4*Sqrt[a]*Sq 
rt[c]*ArcTanh[(Sqrt[a]*x - Sqrt[c + x*(b + a*x)])/Sqrt[c]] - b*Log[b + 2*a 
*x - 2*Sqrt[a]*Sqrt[c + x*(b + a*x)]]))/(2*Sqrt[a]*Sqrt[c + x*(b + a*x)])
 

Rubi [A] (verified)

Time = 0.29 (sec) , antiderivative size = 107, normalized size of antiderivative = 1.02, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.438, Rules used = {1681, 1161, 1269, 1092, 219, 1154, 219}

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

\(\Big \downarrow \) 1681

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

\(\Big \downarrow \) 1161

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

\(\Big \downarrow \) 1269

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

\(\Big \downarrow \) 1092

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

\(\Big \downarrow \) 219

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

\(\Big \downarrow \) 1154

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

\(\Big \downarrow \) 219

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

Input:

Int[Sqrt[a + c/x^2 + b/x],x]
 

Output:

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

Defintions of rubi rules used

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

rule 1092
Int[1/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Simp[2   Subst[I 
nt[1/(4*c - x^2), x], x, (b + 2*c*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a 
, b, c}, x]
 

rule 1154
Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Sym 
bol] :> Simp[-2   Subst[Int[1/(4*c*d^2 - 4*b*d*e + 4*a*e^2 - x^2), x], x, ( 
2*a*e - b*d - (2*c*d - b*e)*x)/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a, b, c 
, d, e}, x]
 

rule 1161
Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_S 
ymbol] :> Simp[(d + e*x)^(m + 1)*((a + b*x + c*x^2)^p/(e*(m + 1))), x] - Si 
mp[p/(e*(m + 1))   Int[(d + e*x)^(m + 1)*(b + 2*c*x)*(a + b*x + c*x^2)^(p - 
 1), x], x] /; FreeQ[{a, b, c, d, e, m}, x] && GtQ[p, 0] && (IntegerQ[p] || 
 LtQ[m, -1]) && NeQ[m, -1] &&  !ILtQ[m + 2*p + 1, 0] && IntQuadraticQ[a, b, 
 c, d, e, m, p, x]
 

rule 1269
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c 
_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[g/e   Int[(d + e*x)^(m + 1)*(a + b*x + 
 c*x^2)^p, x], x] + Simp[(e*f - d*g)/e   Int[(d + e*x)^m*(a + b*x + c*x^2)^ 
p, x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] &&  !IGtQ[m, 0]
 

rule 1681
Int[((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> -Subst[ 
Int[(a + b/x^n + c/x^(2*n))^p/x^2, x], x, 1/x] /; FreeQ[{a, b, c, p}, x] && 
 EqQ[n2, 2*n] && ILtQ[n, 0]
 
Maple [A] (verified)

Time = 0.03 (sec) , antiderivative size = 121, normalized size of antiderivative = 1.15

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

Input:

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

Output:

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

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 590, normalized size of antiderivative = 5.62 \[ \int \sqrt {a+\frac {c}{x^2}+\frac {b}{x}} \, dx=\left [\frac {4 \, a x \sqrt {\frac {a x^{2} + b x + c}{x^{2}}} + \sqrt {a} b \log \left (-8 \, a^{2} x^{2} - 8 \, a b x - b^{2} - 4 \, a c - 4 \, {\left (2 \, a x^{2} + b x\right )} \sqrt {a} \sqrt {\frac {a x^{2} + b x + c}{x^{2}}}\right ) + 2 \, a \sqrt {c} \log \left (-\frac {8 \, b c x + {\left (b^{2} + 4 \, a c\right )} x^{2} + 8 \, c^{2} - 4 \, {\left (b x^{2} + 2 \, c x\right )} \sqrt {c} \sqrt {\frac {a x^{2} + b x + c}{x^{2}}}}{x^{2}}\right )}{4 \, a}, \frac {2 \, a x \sqrt {\frac {a x^{2} + b x + c}{x^{2}}} - \sqrt {-a} b \arctan \left (\frac {{\left (2 \, a x^{2} + b x\right )} \sqrt {-a} \sqrt {\frac {a x^{2} + b x + c}{x^{2}}}}{2 \, {\left (a^{2} x^{2} + a b x + a c\right )}}\right ) + a \sqrt {c} \log \left (-\frac {8 \, b c x + {\left (b^{2} + 4 \, a c\right )} x^{2} + 8 \, c^{2} - 4 \, {\left (b x^{2} + 2 \, c x\right )} \sqrt {c} \sqrt {\frac {a x^{2} + b x + c}{x^{2}}}}{x^{2}}\right )}{2 \, a}, \frac {4 \, a x \sqrt {\frac {a x^{2} + b x + c}{x^{2}}} + 4 \, a \sqrt {-c} \arctan \left (\frac {{\left (b x^{2} + 2 \, c x\right )} \sqrt {-c} \sqrt {\frac {a x^{2} + b x + c}{x^{2}}}}{2 \, {\left (a c x^{2} + b c x + c^{2}\right )}}\right ) + \sqrt {a} b \log \left (-8 \, a^{2} x^{2} - 8 \, a b x - b^{2} - 4 \, a c - 4 \, {\left (2 \, a x^{2} + b x\right )} \sqrt {a} \sqrt {\frac {a x^{2} + b x + c}{x^{2}}}\right )}{4 \, a}, \frac {2 \, a x \sqrt {\frac {a x^{2} + b x + c}{x^{2}}} - \sqrt {-a} b \arctan \left (\frac {{\left (2 \, a x^{2} + b x\right )} \sqrt {-a} \sqrt {\frac {a x^{2} + b x + c}{x^{2}}}}{2 \, {\left (a^{2} x^{2} + a b x + a c\right )}}\right ) + 2 \, a \sqrt {-c} \arctan \left (\frac {{\left (b x^{2} + 2 \, c x\right )} \sqrt {-c} \sqrt {\frac {a x^{2} + b x + c}{x^{2}}}}{2 \, {\left (a c x^{2} + b c x + c^{2}\right )}}\right )}{2 \, a}\right ] \] Input:

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

integrate(sqrt(a + b/x + c/x^2), x)
 

Giac [F(-2)]

Exception generated. \[ \int \sqrt {a+\frac {c}{x^2}+\frac {b}{x}} \, dx=\text {Exception raised: TypeError} \] Input:

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

Output:

Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Degree mismatch inside factorisatio 
n over extensionNot implemented, e.g. for multivariate mod/approx polynomi 
alsError:
 

Mupad [B] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 100, normalized size of antiderivative = 0.95 \[ \int \sqrt {a+\frac {c}{x^2}+\frac {b}{x}} \, dx=x\,\sqrt {\frac {1}{x^2}}\,\sqrt {a\,x^2+b\,x+c}-\sqrt {c}\,x\,\ln \left (\frac {2\,c+2\,\sqrt {c}\,\sqrt {a\,x^2+b\,x+c}+b\,x}{x}\right )\,\sqrt {\frac {1}{x^2}}+\frac {b\,x\,\ln \left (\frac {\frac {b}{2}+\sqrt {a}\,\sqrt {a\,x^2+b\,x+c}+a\,x}{\sqrt {a}}\right )\,\sqrt {\frac {1}{x^2}}}{2\,\sqrt {a}} \] Input:

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.19 (sec) , antiderivative size = 828, normalized size of antiderivative = 7.89 \[ \int \sqrt {a+\frac {c}{x^2}+\frac {b}{x}} \, dx =\text {Too large to display} \] Input:

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

Output:

( - 4*sqrt(a)*sqrt(4*sqrt(c)*sqrt(a)*b - 4*a*c - b**2)*atan((2*sqrt(a)*sqr 
t(a*x**2 + b*x + c) + 2*a*x + b)/sqrt(4*sqrt(c)*sqrt(a)*b - 4*a*c - b**2)) 
*a*c - 2*sqrt(c)*sqrt(4*sqrt(c)*sqrt(a)*b - 4*a*c - b**2)*atan((2*sqrt(a)* 
sqrt(a*x**2 + b*x + c) + 2*a*x + b)/sqrt(4*sqrt(c)*sqrt(a)*b - 4*a*c - b** 
2))*a*b + 8*sqrt(a*x**2 + b*x + c)*a**2*c - 2*sqrt(a*x**2 + b*x + c)*a*b** 
2 + 2*sqrt(a)*sqrt(4*sqrt(c)*sqrt(a)*b + 4*a*c + b**2)*log(2*sqrt(a)*sqrt( 
a*x**2 + b*x + c) - sqrt(4*sqrt(c)*sqrt(a)*b + 4*a*c + b**2) + 2*a*x + b)* 
a*c - 2*sqrt(a)*sqrt(4*sqrt(c)*sqrt(a)*b + 4*a*c + b**2)*log(2*sqrt(a)*sqr 
t(a*x**2 + b*x + c) + sqrt(4*sqrt(c)*sqrt(a)*b + 4*a*c + b**2) + 2*a*x + b 
)*a*c - sqrt(c)*sqrt(4*sqrt(c)*sqrt(a)*b + 4*a*c + b**2)*log(2*sqrt(a)*sqr 
t(a*x**2 + b*x + c) - sqrt(4*sqrt(c)*sqrt(a)*b + 4*a*c + b**2) + 2*a*x + b 
)*a*b + sqrt(c)*sqrt(4*sqrt(c)*sqrt(a)*b + 4*a*c + b**2)*log(2*sqrt(a)*sqr 
t(a*x**2 + b*x + c) + sqrt(4*sqrt(c)*sqrt(a)*b + 4*a*c + b**2) + 2*a*x + b 
)*a*b + 4*sqrt(a)*log((2*sqrt(a)*sqrt(a*x**2 + b*x + c) + 2*a*x + b)/sqrt( 
4*a*c - b**2))*a*b*c - sqrt(a)*log((2*sqrt(a)*sqrt(a*x**2 + b*x + c) + 2*a 
*x + b)/sqrt(4*a*c - b**2))*b**3 - 4*sqrt(c)*log(8*sqrt(a)*sqrt(a*x**2 + b 
*x + c)*a*x + 4*sqrt(a)*sqrt(a*x**2 + b*x + c)*b + 4*sqrt(c)*sqrt(a)*b + 8 
*a**2*x**2 + 8*a*b*x)*a**2*c + sqrt(c)*log(8*sqrt(a)*sqrt(a*x**2 + b*x + c 
)*a*x + 4*sqrt(a)*sqrt(a*x**2 + b*x + c)*b + 4*sqrt(c)*sqrt(a)*b + 8*a**2* 
x**2 + 8*a*b*x)*a*b**2 + 4*sqrt(c)*log(2*sqrt(a)*sqrt(a*x**2 + b*x + c)...