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

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

Optimal result

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

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

Mathematica [A] (verified)

Time = 0.29 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.18 \[ \int \frac {\sqrt {a+b x^2}}{x (c+d x)} \, dx=-\frac {2 \sqrt {-b c^2-a d^2} \arctan \left (\frac {\sqrt {b} (c+d x)-d \sqrt {a+b x^2}}{\sqrt {-b c^2-a d^2}}\right )-2 \sqrt {a} d \text {arctanh}\left (\frac {\sqrt {b} x-\sqrt {a+b x^2}}{\sqrt {a}}\right )+\sqrt {b} c \log \left (-\sqrt {b} x+\sqrt {a+b x^2}\right )}{c d} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.53 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.05, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.409, Rules used = {606, 243, 73, 221, 719, 224, 219, 488, 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 \frac {\sqrt {a+b x^2}}{x (c+d x)} \, dx\)

\(\Big \downarrow \) 606

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

\(\Big \downarrow \) 243

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

\(\Big \downarrow \) 73

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

\(\Big \downarrow \) 221

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

\(\Big \downarrow \) 719

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

\(\Big \downarrow \) 224

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

\(\Big \downarrow \) 219

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

\(\Big \downarrow \) 488

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

\(\Big \downarrow \) 219

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 73
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ 
{p = Denominator[m]}, Simp[p/b   Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + 
 d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt 
Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL 
inearQ[a, b, c, d, m, n, x]
 

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 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 224
Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Subst[Int[1/(1 - b*x^2), x], 
x, x/Sqrt[a + b*x^2]] /; FreeQ[{a, b}, x] &&  !GtQ[a, 0]
 

rule 243
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[1/2   Subst[In 
t[x^((m - 1)/2)*(a + b*x)^p, x], x, x^2], x] /; FreeQ[{a, b, m, p}, x] && I 
ntegerQ[(m - 1)/2]
 

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

rule 606
Int[(((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_))/(x_), x_Symbol] : 
> Simp[a/c   Int[(c + d*x)^(n + 1)*((a + b*x^2)^(p - 1)/x), x], x] - Simp[1 
/c   Int[(c + d*x)^n*(a*d - b*c*x)*(a + b*x^2)^(p - 1), x], x] /; FreeQ[{a, 
 b, c, d}, x] && GtQ[p, 0] && ILtQ[n, 0]
 

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

Leaf count of result is larger than twice the leaf count of optimal. \(304\) vs. \(2(98)=196\).

Time = 0.36 (sec) , antiderivative size = 305, normalized size of antiderivative = 2.63

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

Input:

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

Output:

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

Fricas [A] (verification not implemented)

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

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

Output:

[1/2*(sqrt(b)*c*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x - a) + sqrt(a)* 
d*log(-(b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(a) + 2*a)/x^2) + sqrt(b*c^2 + a*d^2 
)*log((2*a*b*c*d*x - a*b*c^2 - 2*a^2*d^2 - (2*b^2*c^2 + a*b*d^2)*x^2 + 2*s 
qrt(b*c^2 + a*d^2)*(b*c*x - a*d)*sqrt(b*x^2 + a))/(d^2*x^2 + 2*c*d*x + c^2 
)))/(c*d), -1/2*(2*sqrt(-b)*c*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)) - sqrt(a) 
*d*log(-(b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(a) + 2*a)/x^2) - sqrt(b*c^2 + a*d^ 
2)*log((2*a*b*c*d*x - a*b*c^2 - 2*a^2*d^2 - (2*b^2*c^2 + a*b*d^2)*x^2 + 2* 
sqrt(b*c^2 + a*d^2)*(b*c*x - a*d)*sqrt(b*x^2 + a))/(d^2*x^2 + 2*c*d*x + c^ 
2)))/(c*d), 1/2*(sqrt(b)*c*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x - a) 
 + sqrt(a)*d*log(-(b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(a) + 2*a)/x^2) + 2*sqrt( 
-b*c^2 - a*d^2)*arctan(sqrt(-b*c^2 - a*d^2)*(b*c*x - a*d)*sqrt(b*x^2 + a)/ 
(a*b*c^2 + a^2*d^2 + (b^2*c^2 + a*b*d^2)*x^2)))/(c*d), -1/2*(2*sqrt(-b)*c* 
arctan(sqrt(-b)*x/sqrt(b*x^2 + a)) - sqrt(a)*d*log(-(b*x^2 - 2*sqrt(b*x^2 
+ a)*sqrt(a) + 2*a)/x^2) - 2*sqrt(-b*c^2 - a*d^2)*arctan(sqrt(-b*c^2 - a*d 
^2)*(b*c*x - a*d)*sqrt(b*x^2 + a)/(a*b*c^2 + a^2*d^2 + (b^2*c^2 + a*b*d^2) 
*x^2)))/(c*d), 1/2*(2*sqrt(-a)*d*arctan(sqrt(b*x^2 + a)*sqrt(-a)/a) + sqrt 
(b)*c*log(-2*b*x^2 - 2*sqrt(b*x^2 + a)*sqrt(b)*x - a) + sqrt(b*c^2 + a*d^2 
)*log((2*a*b*c*d*x - a*b*c^2 - 2*a^2*d^2 - (2*b^2*c^2 + a*b*d^2)*x^2 + 2*s 
qrt(b*c^2 + a*d^2)*(b*c*x - a*d)*sqrt(b*x^2 + a))/(d^2*x^2 + 2*c*d*x + c^2 
)))/(c*d), -1/2*(2*sqrt(-b)*c*arctan(sqrt(-b)*x/sqrt(b*x^2 + a)) - 2*sq...
 

Sympy [F]

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

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

Output:

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

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.89 \[ \int \frac {\sqrt {a+b x^2}}{x (c+d x)} \, dx=\frac {d {\left (\frac {\sqrt {b} c \operatorname {arsinh}\left (\frac {b x}{\sqrt {a b}}\right )}{d^{2}} - \frac {\sqrt {a + \frac {b c^{2}}{d^{2}}} \operatorname {arsinh}\left (\frac {2 \, b c x}{\sqrt {a b} {\left | 2 \, d x + 2 \, c \right |}} - \frac {2 \, a d}{\sqrt {a b} {\left | 2 \, d x + 2 \, c \right |}}\right )}{d} - \frac {\sqrt {a} \operatorname {arsinh}\left (\frac {a}{\sqrt {a b} {\left | x \right |}}\right )}{d}\right )}}{c} \] Input:

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

Output:

d*(sqrt(b)*c*arcsinh(b*x/sqrt(a*b))/d^2 - sqrt(a + b*c^2/d^2)*arcsinh(2*b* 
c*x/(sqrt(a*b)*abs(2*d*x + 2*c)) - 2*a*d/(sqrt(a*b)*abs(2*d*x + 2*c)))/d - 
 sqrt(a)*arcsinh(a/(sqrt(a*b)*abs(x)))/d)/c
 

Giac [F(-2)]

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

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

Output:

Exception raised: TypeError >> an error occurred running a Giac command:IN 
PUT:sage2:=int(sage0,sageVARx):;OUTPUT:index.cc index_m i_lex_is_greater E 
rror: Bad Argument Value
 

Mupad [F(-1)]

Timed out. \[ \int \frac {\sqrt {a+b x^2}}{x (c+d x)} \, dx=\int \frac {\sqrt {b\,x^2+a}}{x\,\left (c+d\,x\right )} \,d x \] Input:

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

Output:

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

Reduce [B] (verification not implemented)

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

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

Output:

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