3.30.61 \(\int \frac {\sqrt {a x+\sqrt {-b+a x}}}{1+\sqrt {-b+a x}} \, dx\) [2961]

3.30.61.1 Optimal result
3.30.61.2 Mathematica [A] (verified)
3.30.61.3 Rubi [A] (verified)
3.30.61.4 Maple [A] (verified)
3.30.61.5 Fricas [F(-1)]
3.30.61.6 Sympy [F]
3.30.61.7 Maxima [F]
3.30.61.8 Giac [A] (verification not implemented)
3.30.61.9 Mupad [F(-1)]

3.30.61.1 Optimal result

Integrand size = 35, antiderivative size = 363 \[ \int \frac {\sqrt {a x+\sqrt {-b+a x}}}{1+\sqrt {-b+a x}} \, dx=-\frac {\sqrt {-b+a x} \sqrt {\frac {a x+\sqrt {-b+a x}}{\left (1+\sqrt {-b+a x}\right )^2}}}{2 a}+\frac {(-3-2 b+2 a x) \sqrt {\frac {a x+\sqrt {-b+a x}}{\left (1+\sqrt {-b+a x}\right )^2}}}{2 a}+\frac {(-3-4 b) \text {arctanh}\left (\frac {\sqrt {b}-\sqrt {\frac {a x+\sqrt {-b+a x}}{\left (1+\sqrt {-b+a x}\right )^2}}-\sqrt {-b+a x} \sqrt {\frac {a x+\sqrt {-b+a x}}{\left (1+\sqrt {-b+a x}\right )^2}}}{1+\sqrt {-b+a x}}\right )}{2 a}+\frac {2 \sqrt {b} \log \left (1+\sqrt {-b+a x}\right )}{a}-\frac {2 \sqrt {b} \log \left (1-2 b+2 \sqrt {b} \sqrt {\frac {a x+\sqrt {-b+a x}}{\left (1+\sqrt {-b+a x}\right )^2}}+\sqrt {-b+a x} \left (1+2 \sqrt {b} \sqrt {\frac {a x+\sqrt {-b+a x}}{\left (1+\sqrt {-b+a x}\right )^2}}\right )\right )}{a} \]

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

Time = 0.32 (sec) , antiderivative size = 137, normalized size of antiderivative = 0.38 \[ \int \frac {\sqrt {a x+\sqrt {-b+a x}}}{1+\sqrt {-b+a x}} \, dx=-\frac {2 \left (3-2 \sqrt {-b+a x}\right ) \sqrt {a x+\sqrt {-b+a x}}+16 \sqrt {b} \text {arctanh}\left (\frac {1+\sqrt {-b+a x}-\sqrt {a x+\sqrt {-b+a x}}}{\sqrt {b}}\right )+(3+4 b) \log \left (a \left (-1-2 \sqrt {-b+a x}+2 \sqrt {a x+\sqrt {-b+a x}}\right )\right )}{4 a} \]

input
Integrate[Sqrt[a*x + Sqrt[-b + a*x]]/(1 + Sqrt[-b + a*x]),x]
 
output
-1/4*(2*(3 - 2*Sqrt[-b + a*x])*Sqrt[a*x + Sqrt[-b + a*x]] + 16*Sqrt[b]*Arc 
Tanh[(1 + Sqrt[-b + a*x] - Sqrt[a*x + Sqrt[-b + a*x]])/Sqrt[b]] + (3 + 4*b 
)*Log[a*(-1 - 2*Sqrt[-b + a*x] + 2*Sqrt[a*x + Sqrt[-b + a*x]])])/a
 
3.30.61.3 Rubi [A] (verified)

Time = 0.46 (sec) , antiderivative size = 146, normalized size of antiderivative = 0.40, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.229, Rules used = {7267, 1231, 27, 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 \frac {\sqrt {\sqrt {a x-b}+a x}}{\sqrt {a x-b}+1} \, dx\)

\(\Big \downarrow \) 7267

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

\(\Big \downarrow \) 1231

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 1269

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

\(\Big \downarrow \) 1092

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

\(\Big \downarrow \) 219

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

\(\Big \downarrow \) 1154

\(\displaystyle \frac {2 \left (\frac {1}{8} \left (16 b \int \frac {1}{5 b-a x}d\left (-\frac {-2 b+\sqrt {a x-b}+1}{\sqrt {a x+\sqrt {a x-b}}}\right )+(4 b+3) \text {arctanh}\left (\frac {2 \sqrt {a x-b}+1}{2 \sqrt {\sqrt {a x-b}+a x}}\right )\right )-\frac {1}{4} \left (3-2 \sqrt {a x-b}\right ) \sqrt {\sqrt {a x-b}+a x}\right )}{a}\)

\(\Big \downarrow \) 219

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

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

3.30.61.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 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 1231
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c 
_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(d + e*x)^(m + 1)*(c*e*f*(m + 2*p + 2) 
 - g*(c*d + 2*c*d*p - b*e*p) + g*c*e*(m + 2*p + 1)*x)*((a + b*x + c*x^2)^p/ 
(c*e^2*(m + 2*p + 1)*(m + 2*p + 2))), x] - Simp[p/(c*e^2*(m + 2*p + 1)*(m + 
 2*p + 2))   Int[(d + e*x)^m*(a + b*x + c*x^2)^(p - 1)*Simp[c*e*f*(b*d - 2* 
a*e)*(m + 2*p + 2) + g*(a*e*(b*e - 2*c*d*m + b*e*m) + b*d*(b*e*p - c*d - 2* 
c*d*p)) + (c*e*f*(2*c*d - b*e)*(m + 2*p + 2) + g*(b^2*e^2*(p + m + 1) - 2*c 
^2*d^2*(1 + 2*p) - c*e*(b*d*(m - 2*p) + 2*a*e*(m + 2*p + 1))))*x, x], x], x 
] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && GtQ[p, 0] && (IntegerQ[p] ||  !R 
ationalQ[m] || (GeQ[m, -1] && LtQ[m, 0])) &&  !ILtQ[m + 2*p, 0] && (Integer 
Q[m] || IntegerQ[p] || IntegersQ[2*m, 2*p])
 

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 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.30.61.4 Maple [A] (verified)

Time = 0.05 (sec) , antiderivative size = 214, normalized size of antiderivative = 0.59

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

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

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

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

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

input
integrate((a*x+(a*x-b)**(1/2))**(1/2)/(1+(a*x-b)**(1/2)),x)
 
output
Integral(sqrt(a*x + sqrt(a*x - b))/(sqrt(a*x - b) + 1), x)
 
3.30.61.7 Maxima [F]

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

input
integrate((a*x+(a*x-b)^(1/2))^(1/2)/(1+(a*x-b)^(1/2)),x, algorithm="maxima 
")
 
output
integrate(sqrt(a*x + sqrt(a*x - b))/(sqrt(a*x - b) + 1), x)
 
3.30.61.8 Giac [A] (verification not implemented)

Time = 0.64 (sec) , antiderivative size = 127, normalized size of antiderivative = 0.35 \[ \int \frac {\sqrt {a x+\sqrt {-b+a x}}}{1+\sqrt {-b+a x}} \, dx=\frac {1}{2} \, \sqrt {a x + \sqrt {a x - b}} {\left (\frac {2 \, \sqrt {a x - b}}{a} - \frac {3}{a}\right )} - \frac {{\left (4 \, b + 3\right )} \log \left ({\left | -2 \, \sqrt {a x - b} + 2 \, \sqrt {a x + \sqrt {a x - b}} - 1 \right |}\right )}{4 \, a} - \frac {4 \, b \arctan \left (-\frac {\sqrt {a x - b} - \sqrt {a x + \sqrt {a x - b}} + 1}{\sqrt {-b}}\right )}{a \sqrt {-b}} \]

input
integrate((a*x+(a*x-b)^(1/2))^(1/2)/(1+(a*x-b)^(1/2)),x, algorithm="giac")
 
output
1/2*sqrt(a*x + sqrt(a*x - b))*(2*sqrt(a*x - b)/a - 3/a) - 1/4*(4*b + 3)*lo 
g(abs(-2*sqrt(a*x - b) + 2*sqrt(a*x + sqrt(a*x - b)) - 1))/a - 4*b*arctan( 
-(sqrt(a*x - b) - sqrt(a*x + sqrt(a*x - b)) + 1)/sqrt(-b))/(a*sqrt(-b))
 
3.30.61.9 Mupad [F(-1)]

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

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