3.18.58 \(\int \frac {\sqrt {b+a x}}{\sqrt {a b x+\sqrt {b+a x}}} \, dx\) [1758]

3.18.58.1 Optimal result
3.18.58.2 Mathematica [A] (verified)
3.18.58.3 Rubi [A] (verified)
3.18.58.4 Maple [A] (verified)
3.18.58.5 Fricas [F(-1)]
3.18.58.6 Sympy [B] (verification not implemented)
3.18.58.7 Maxima [F]
3.18.58.8 Giac [F(-1)]
3.18.58.9 Mupad [F(-1)]

3.18.58.1 Optimal result

Integrand size = 28, antiderivative size = 118 \[ \int \frac {\sqrt {b+a x}}{\sqrt {a b x+\sqrt {b+a x}}} \, dx=\frac {\left (-3+2 b \sqrt {b+a x}\right ) \sqrt {-b^2+\sqrt {b+a x}+b (b+a x)}}{2 a b^2}+\frac {\left (-3-4 b^3\right ) \log \left (-1-2 b \sqrt {b+a x}+2 \sqrt {b} \sqrt {-b^2+\sqrt {b+a x}+b (b+a x)}\right )}{4 a b^{5/2}} \]

output
1/2*(-3+2*b*(a*x+b)^(1/2))*(-b^2+(a*x+b)^(1/2)+b*(a*x+b))^(1/2)/a/b^2+1/4* 
(-4*b^3-3)*ln(-1-2*b*(a*x+b)^(1/2)+2*b^(1/2)*(-b^2+(a*x+b)^(1/2)+b*(a*x+b) 
)^(1/2))/a/b^(5/2)
 
3.18.58.2 Mathematica [A] (verified)

Time = 0.22 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.90 \[ \int \frac {\sqrt {b+a x}}{\sqrt {a b x+\sqrt {b+a x}}} \, dx=\frac {2 \sqrt {b} \sqrt {a b x+\sqrt {b+a x}} \left (-3+2 b \sqrt {b+a x}\right )-\left (3+4 b^3\right ) \log \left (a b^2 \left (1+2 b \sqrt {b+a x}-2 \sqrt {b} \sqrt {a b x+\sqrt {b+a x}}\right )\right )}{4 a b^{5/2}} \]

input
Integrate[Sqrt[b + a*x]/Sqrt[a*b*x + Sqrt[b + a*x]],x]
 
output
(2*Sqrt[b]*Sqrt[a*b*x + Sqrt[b + a*x]]*(-3 + 2*b*Sqrt[b + a*x]) - (3 + 4*b 
^3)*Log[a*b^2*(1 + 2*b*Sqrt[b + a*x] - 2*Sqrt[b]*Sqrt[a*b*x + Sqrt[b + a*x 
]])])/(4*a*b^(5/2))
 
3.18.58.3 Rubi [A] (verified)

Time = 0.43 (sec) , antiderivative size = 153, normalized size of antiderivative = 1.30, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {7267, 1166, 27, 1160, 1092, 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 x+b}}{\sqrt {a b x+\sqrt {a x+b}}} \, dx\)

\(\Big \downarrow \) 7267

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

\(\Big \downarrow \) 1166

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 1160

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

\(\Big \downarrow \) 1092

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

\(\Big \downarrow \) 219

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

input
Int[Sqrt[b + a*x]/Sqrt[a*b*x + Sqrt[b + a*x]],x]
 
output
(2*((Sqrt[b + a*x]*Sqrt[-b^2 + Sqrt[b + a*x] + b*(b + a*x)])/(2*b) + ((-3* 
Sqrt[-b^2 + Sqrt[b + a*x] + b*(b + a*x)])/b + ((3 + 4*b^3)*ArcTanh[(1 + 2* 
b*Sqrt[b + a*x])/(2*Sqrt[b]*Sqrt[-b^2 + Sqrt[b + a*x] + b*(b + a*x)])])/(2 
*b^(3/2)))/(4*b)))/a
 

3.18.58.3.1 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 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 1160
Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol 
] :> Simp[e*((a + b*x + c*x^2)^(p + 1)/(2*c*(p + 1))), x] + Simp[(2*c*d - b 
*e)/(2*c)   Int[(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, p}, x] 
 && NeQ[p, -1]
 

rule 1166
Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_S 
ymbol] :> Simp[e*(d + e*x)^(m - 1)*((a + b*x + c*x^2)^(p + 1)/(c*(m + 2*p + 
 1))), x] + Simp[1/(c*(m + 2*p + 1))   Int[(d + e*x)^(m - 2)*Simp[c*d^2*(m 
+ 2*p + 1) - e*(a*e*(m - 1) + b*d*(p + 1)) + e*(2*c*d - b*e)*(m + p)*x, x]* 
(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m, p}, x] && If[Ration 
alQ[m], GtQ[m, 1], SumSimplerQ[m, -2]] && NeQ[m + 2*p + 1, 0] && IntQuadrat 
icQ[a, b, c, d, e, m, p, x]
 

rule 7267
Int[u_, x_Symbol] :> With[{lst = SubstForFractionalPowerOfLinear[u, x]}, Si 
mp[lst[[2]]*lst[[4]]   Subst[Int[lst[[1]], x], x, lst[[3]]^(1/lst[[2]])], x 
] /;  !FalseQ[lst] && SubstForFractionalPowerQ[u, lst[[3]], x]]
 
3.18.58.4 Maple [A] (verified)

Time = 0.16 (sec) , antiderivative size = 161, normalized size of antiderivative = 1.36

method result size
derivativedivides \(\frac {\frac {\sqrt {a x +b}\, \sqrt {-b^{2}+\sqrt {a x +b}+b \left (a x +b \right )}}{b}-\frac {3 \left (\frac {\sqrt {-b^{2}+\sqrt {a x +b}+b \left (a x +b \right )}}{b}-\frac {\ln \left (\frac {\frac {1}{2}+b \sqrt {a x +b}}{\sqrt {b}}+\sqrt {-b^{2}+\sqrt {a x +b}+b \left (a x +b \right )}\right )}{2 b^{\frac {3}{2}}}\right )}{2 b}+\sqrt {b}\, \ln \left (\frac {\frac {1}{2}+b \sqrt {a x +b}}{\sqrt {b}}+\sqrt {-b^{2}+\sqrt {a x +b}+b \left (a x +b \right )}\right )}{a}\) \(161\)
default \(\frac {\frac {\sqrt {a x +b}\, \sqrt {-b^{2}+\sqrt {a x +b}+b \left (a x +b \right )}}{b}-\frac {3 \left (\frac {\sqrt {-b^{2}+\sqrt {a x +b}+b \left (a x +b \right )}}{b}-\frac {\ln \left (\frac {\frac {1}{2}+b \sqrt {a x +b}}{\sqrt {b}}+\sqrt {-b^{2}+\sqrt {a x +b}+b \left (a x +b \right )}\right )}{2 b^{\frac {3}{2}}}\right )}{2 b}+\sqrt {b}\, \ln \left (\frac {\frac {1}{2}+b \sqrt {a x +b}}{\sqrt {b}}+\sqrt {-b^{2}+\sqrt {a x +b}+b \left (a x +b \right )}\right )}{a}\) \(161\)

input
int((a*x+b)^(1/2)/(a*b*x+(a*x+b)^(1/2))^(1/2),x,method=_RETURNVERBOSE)
 
output
2/a*(1/2*(a*x+b)^(1/2)/b*(-b^2+(a*x+b)^(1/2)+b*(a*x+b))^(1/2)-3/4/b*(1/b*( 
-b^2+(a*x+b)^(1/2)+b*(a*x+b))^(1/2)-1/2/b^(3/2)*ln((1/2+b*(a*x+b)^(1/2))/b 
^(1/2)+(-b^2+(a*x+b)^(1/2)+b*(a*x+b))^(1/2)))+1/2*b^(1/2)*ln((1/2+b*(a*x+b 
)^(1/2))/b^(1/2)+(-b^2+(a*x+b)^(1/2)+b*(a*x+b))^(1/2)))
 
3.18.58.5 Fricas [F(-1)]

Timed out. \[ \int \frac {\sqrt {b+a x}}{\sqrt {a b x+\sqrt {b+a x}}} \, dx=\text {Timed out} \]

input
integrate((a*x+b)^(1/2)/(a*b*x+(a*x+b)^(1/2))^(1/2),x, algorithm="fricas")
 
output
Timed out
 
3.18.58.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 226 vs. \(2 (99) = 198\).

Time = 0.64 (sec) , antiderivative size = 226, normalized size of antiderivative = 1.92 \[ \int \frac {\sqrt {b+a x}}{\sqrt {a b x+\sqrt {b+a x}}} \, dx=\begin {cases} \frac {2 \left (\begin {cases} \left (\frac {b}{2} + \frac {3}{8 b^{2}}\right ) \left (\begin {cases} \frac {\log {\left (2 \sqrt {b} \sqrt {- b^{2} + b \left (a x + b\right ) + \sqrt {a x + b}} + 2 b \sqrt {a x + b} + 1 \right )}}{\sqrt {b}} & \text {for}\: b^{2} + \frac {1}{4 b} \neq 0 \\\frac {\left (\sqrt {a x + b} + \frac {1}{2 b}\right ) \log {\left (\sqrt {a x + b} + \frac {1}{2 b} \right )}}{\sqrt {b \left (\sqrt {a x + b} + \frac {1}{2 b}\right )^{2}}} & \text {otherwise} \end {cases}\right ) + \left (\frac {\sqrt {a x + b}}{2 b} - \frac {3}{4 b^{2}}\right ) \sqrt {- b^{2} + b \left (a x + b\right ) + \sqrt {a x + b}} & \text {for}\: b \neq 0 \\2 b^{4} \sqrt {- b^{2} + \sqrt {a x + b}} + \frac {4 b^{2} \left (- b^{2} + \sqrt {a x + b}\right )^{\frac {3}{2}}}{3} + \frac {2 \left (- b^{2} + \sqrt {a x + b}\right )^{\frac {5}{2}}}{5} & \text {otherwise} \end {cases}\right )}{a} & \text {for}\: a \neq 0 \\\sqrt [4]{b} x & \text {otherwise} \end {cases} \]

input
integrate((a*x+b)**(1/2)/(a*b*x+(a*x+b)**(1/2))**(1/2),x)
 
output
Piecewise((2*Piecewise(((b/2 + 3/(8*b**2))*Piecewise((log(2*sqrt(b)*sqrt(- 
b**2 + b*(a*x + b) + sqrt(a*x + b)) + 2*b*sqrt(a*x + b) + 1)/sqrt(b), Ne(b 
**2 + 1/(4*b), 0)), ((sqrt(a*x + b) + 1/(2*b))*log(sqrt(a*x + b) + 1/(2*b) 
)/sqrt(b*(sqrt(a*x + b) + 1/(2*b))**2), True)) + (sqrt(a*x + b)/(2*b) - 3/ 
(4*b**2))*sqrt(-b**2 + b*(a*x + b) + sqrt(a*x + b)), Ne(b, 0)), (2*b**4*sq 
rt(-b**2 + sqrt(a*x + b)) + 4*b**2*(-b**2 + sqrt(a*x + b))**(3/2)/3 + 2*(- 
b**2 + sqrt(a*x + b))**(5/2)/5, True))/a, Ne(a, 0)), (b**(1/4)*x, True))
 
3.18.58.7 Maxima [F]

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

input
integrate((a*x+b)^(1/2)/(a*b*x+(a*x+b)^(1/2))^(1/2),x, algorithm="maxima")
 
output
integrate(sqrt(a*x + b)/sqrt(a*b*x + sqrt(a*x + b)), x)
 
3.18.58.8 Giac [F(-1)]

Timed out. \[ \int \frac {\sqrt {b+a x}}{\sqrt {a b x+\sqrt {b+a x}}} \, dx=\text {Timed out} \]

input
integrate((a*x+b)^(1/2)/(a*b*x+(a*x+b)^(1/2))^(1/2),x, algorithm="giac")
 
output
Timed out
 
3.18.58.9 Mupad [F(-1)]

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

input
int((b + a*x)^(1/2)/((b + a*x)^(1/2) + a*b*x)^(1/2),x)
 
output
int((b + a*x)^(1/2)/((b + a*x)^(1/2) + a*b*x)^(1/2), x)