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

Optimal. Leaf size=363 \[ \frac {\sqrt {\frac {\sqrt {a x-b}+a x}{\left (\sqrt {a x-b}+1\right )^2}} (2 a x-2 b-3)}{2 a}-\frac {\sqrt {a x-b} \sqrt {\frac {\sqrt {a x-b}+a x}{\left (\sqrt {a x-b}+1\right )^2}}}{2 a}+\frac {2 \sqrt {b} \log \left (\sqrt {a x-b}+1\right )}{a}-\frac {2 \sqrt {b} \log \left (2 \sqrt {b} \sqrt {\frac {\sqrt {a x-b}+a x}{\left (\sqrt {a x-b}+1\right )^2}}+\sqrt {a x-b} \left (2 \sqrt {b} \sqrt {\frac {\sqrt {a x-b}+a x}{\left (\sqrt {a x-b}+1\right )^2}}+1\right )-2 b+1\right )}{a}+\frac {(-4 b-3) \tanh ^{-1}\left (\frac {-\sqrt {a x-b} \sqrt {\frac {\sqrt {a x-b}+a x}{\left (\sqrt {a x-b}+1\right )^2}}-\sqrt {\frac {\sqrt {a x-b}+a x}{\left (\sqrt {a x-b}+1\right )^2}}+\sqrt {b}}{\sqrt {a x-b}+1}\right )}{2 a} \]

________________________________________________________________________________________

Rubi [A]  time = 0.30, antiderivative size = 148, normalized size of antiderivative = 0.41, number of steps used = 7, number of rules used = 5, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {814, 843, 621, 206, 724} \begin {gather*} -\frac {\sqrt {\sqrt {a x-b}+a x} \left (3-2 \sqrt {a x-b}\right )}{2 a}-\frac {2 \sqrt {b} \tanh ^{-1}\left (\frac {\sqrt {a x-b}-2 b+1}{2 \sqrt {b} \sqrt {\sqrt {a x-b}+a x}}\right )}{a}+\frac {(4 b+3) \tanh ^{-1}\left (\frac {2 \sqrt {a x-b}+1}{2 \sqrt {\sqrt {a x-b}+a x}}\right )}{4 a} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Sqrt[a*x + Sqrt[-b + a*x]]/(1 + Sqrt[-b + a*x]),x]

[Out]

-1/2*((3 - 2*Sqrt[-b + a*x])*Sqrt[a*x + Sqrt[-b + a*x]])/a - (2*Sqrt[b]*ArcTanh[(1 - 2*b + Sqrt[-b + a*x])/(2*
Sqrt[b]*Sqrt[a*x + Sqrt[-b + a*x]])])/a + ((3 + 4*b)*ArcTanh[(1 + 2*Sqrt[-b + a*x])/(2*Sqrt[a*x + Sqrt[-b + a*
x]])])/(4*a)

Rule 206

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

Rule 621

Int[1/Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Dist[2, Subst[Int[1/(4*c - x^2), x], x, (b + 2*c*x)
/Sqrt[a + b*x + c*x^2]], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 724

Int[1/(((d_.) + (e_.)*(x_))*Sqrt[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2]), x_Symbol] :> Dist[-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] && NeQ[b^2 - 4*a*c, 0] && NeQ[2*c*d - b*e, 0]

Rule 814

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Sim
p[((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] - Dist[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] && NeQ[b^2 - 4*a*c, 0
] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && GtQ[p, 0] && (IntegerQ[p] ||  !RationalQ[m] || (GeQ[m, -1] && LtQ[m, 0])
) &&  !ILtQ[m + 2*p, 0] && (IntegerQ[m] || IntegerQ[p] || IntegersQ[2*m, 2*p])

Rule 843

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Dis
t[g/e, Int[(d + e*x)^(m + 1)*(a + b*x + c*x^2)^p, x], x] + Dist[(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] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0]
&&  !IGtQ[m, 0]

Rubi steps

\begin {align*} \int \frac {\sqrt {a x+\sqrt {-b+a x}}}{1+\sqrt {-b+a x}} \, dx &=\frac {2 \operatorname {Subst}\left (\int \frac {x \sqrt {b+x+x^2}}{1+x} \, dx,x,\sqrt {-b+a x}\right )}{a}\\ &=-\frac {\left (3-2 \sqrt {-b+a x}\right ) \sqrt {a x+\sqrt {-b+a x}}}{2 a}-\frac {\operatorname {Subst}\left (\int \frac {\frac {1}{2} (-3+4 b)-\frac {1}{2} (3+4 b) x}{(1+x) \sqrt {b+x+x^2}} \, dx,x,\sqrt {-b+a x}\right )}{2 a}\\ &=-\frac {\left (3-2 \sqrt {-b+a x}\right ) \sqrt {a x+\sqrt {-b+a x}}}{2 a}-\frac {(2 b) \operatorname {Subst}\left (\int \frac {1}{(1+x) \sqrt {b+x+x^2}} \, dx,x,\sqrt {-b+a x}\right )}{a}+\frac {(3+4 b) \operatorname {Subst}\left (\int \frac {1}{\sqrt {b+x+x^2}} \, dx,x,\sqrt {-b+a x}\right )}{4 a}\\ &=-\frac {\left (3-2 \sqrt {-b+a x}\right ) \sqrt {a x+\sqrt {-b+a x}}}{2 a}+\frac {(4 b) \operatorname {Subst}\left (\int \frac {1}{4 b-x^2} \, dx,x,\frac {-1+2 b-\sqrt {-b+a x}}{\sqrt {a x+\sqrt {-b+a x}}}\right )}{a}+\frac {(3+4 b) \operatorname {Subst}\left (\int \frac {1}{4-x^2} \, dx,x,\frac {1+2 \sqrt {-b+a x}}{\sqrt {a x+\sqrt {-b+a x}}}\right )}{2 a}\\ &=-\frac {\left (3-2 \sqrt {-b+a x}\right ) \sqrt {a x+\sqrt {-b+a x}}}{2 a}-\frac {2 \sqrt {b} \tanh ^{-1}\left (\frac {1-2 b+\sqrt {-b+a x}}{2 \sqrt {b} \sqrt {a x+\sqrt {-b+a x}}}\right )}{a}+\frac {(3+4 b) \tanh ^{-1}\left (\frac {1+2 \sqrt {-b+a x}}{2 \sqrt {a x+\sqrt {-b+a x}}}\right )}{4 a}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.19, size = 143, normalized size = 0.39 \begin {gather*} \frac {2 \sqrt {\sqrt {a x-b}+a x} \left (2 \sqrt {a x-b}-3\right )+8 \sqrt {b} \tanh ^{-1}\left (\frac {-\sqrt {a x-b}+2 b-1}{2 \sqrt {b} \sqrt {\sqrt {a x-b}+a x}}\right )+(4 b+3) \tanh ^{-1}\left (\frac {2 \sqrt {a x-b}+1}{2 \sqrt {\sqrt {a x-b}+a x}}\right )}{4 a} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Sqrt[a*x + Sqrt[-b + a*x]]/(1 + Sqrt[-b + a*x]),x]

[Out]

(2*Sqrt[a*x + Sqrt[-b + a*x]]*(-3 + 2*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]])])/(4
*a)

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.39, size = 155, normalized size = 0.43 \begin {gather*} \frac {\sqrt {a x+\sqrt {-b+a x}} \left (-3+2 \sqrt {-b+a x}\right )}{2 a}-\frac {4 \sqrt {b} \tanh ^{-1}\left (\frac {1}{\sqrt {b}}+\frac {\sqrt {-b+a x}}{\sqrt {b}}-\frac {\sqrt {a x+\sqrt {-b+a x}}}{\sqrt {b}}\right )}{a}+\frac {(-3-4 b) \log \left (a \left (-1-2 \sqrt {-b+a x}\right )+2 a \sqrt {a x+\sqrt {-b+a x}}\right )}{4 a} \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[Sqrt[a*x + Sqrt[-b + a*x]]/(1 + Sqrt[-b + a*x]),x]

[Out]

(Sqrt[a*x + Sqrt[-b + a*x]]*(-3 + 2*Sqrt[-b + a*x]))/(2*a) - (4*Sqrt[b]*ArcTanh[1/Sqrt[b] + Sqrt[-b + a*x]/Sqr
t[b] - Sqrt[a*x + Sqrt[-b + a*x]]/Sqrt[b]])/a + ((-3 - 4*b)*Log[a*(-1 - 2*Sqrt[-b + a*x]) + 2*a*Sqrt[a*x + Sqr
t[-b + a*x]]])/(4*a)

________________________________________________________________________________________

fricas [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

giac [A]  time = 6.04, size = 127, normalized size = 0.35 \begin {gather*} \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}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*sqrt(a*x + sqrt(a*x - b))*(2*sqrt(a*x - b)/a - 3/a) - 1/4*(4*b + 3)*log(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))

________________________________________________________________________________________

maple [A]  time = 0.13, size = 214, normalized size = 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\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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))))

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {a x + \sqrt {a x - b}}}{\sqrt {a x - b} + 1}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integrate(sqrt(a*x + sqrt(a*x - b))/(sqrt(a*x - b) + 1), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\sqrt {a\,x+\sqrt {a\,x-b}}}{\sqrt {a\,x-b}+1} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {a x + \sqrt {a x - b}}}{\sqrt {a x - b} + 1}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral(sqrt(a*x + sqrt(a*x - b))/(sqrt(a*x - b) + 1), x)

________________________________________________________________________________________