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

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

________________________________________________________________________________________

Rubi [A]  time = 0.19, antiderivative size = 93, normalized size of antiderivative = 0.85, number of steps used = 4, number of rules used = 3, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {612, 621, 206} \begin {gather*} \frac {\sqrt {\sqrt {a x-b}+a x} \left (2 \sqrt {a x-b}+1\right )}{2 a}-\frac {(1-4 b) \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]]/Sqrt[-b + a*x],x]

[Out]

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

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

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]

Rubi steps

\begin {align*} \int \frac {\sqrt {a x+\sqrt {-b+a x}}}{\sqrt {-b+a x}} \, dx &=\frac {2 \operatorname {Subst}\left (\int \sqrt {b+x+x^2} \, dx,x,\sqrt {-b+a x}\right )}{a}\\ &=\frac {\sqrt {a x+\sqrt {-b+a x}} \left (1+2 \sqrt {-b+a x}\right )}{2 a}-\frac {(1-4 b) \operatorname {Subst}\left (\int \frac {1}{\sqrt {b+x+x^2}} \, dx,x,\sqrt {-b+a x}\right )}{4 a}\\ &=\frac {\sqrt {a x+\sqrt {-b+a x}} \left (1+2 \sqrt {-b+a x}\right )}{2 a}-\frac {(1-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 {\sqrt {a x+\sqrt {-b+a x}} \left (1+2 \sqrt {-b+a x}\right )}{2 a}-\frac {(1-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.09, size = 89, normalized size = 0.81 \begin {gather*} \frac {2 \sqrt {\sqrt {a x-b}+a x} \left (2 \sqrt {a x-b}+1\right )+(4 b-1) \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]]/Sqrt[-b + a*x],x]

[Out]

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

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.20, size = 95, normalized size = 0.86 \begin {gather*} \frac {\sqrt {a x+\sqrt {-b+a x}} \left (1+2 \sqrt {-b+a x}\right )}{2 a}+\frac {(1-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]]/Sqrt[-b + a*x],x]

[Out]

(Sqrt[a*x + Sqrt[-b + a*x]]*(1 + 2*Sqrt[-b + a*x]))/(2*a) + ((1 - 4*b)*Log[a*(-1 - 2*Sqrt[-b + a*x]) + 2*a*Sqr
t[a*x + Sqrt[-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)/(a*x-b)^(1/2),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

giac [A]  time = 0.76, size = 74, normalized size = 0.67 \begin {gather*} -\frac {{\left (4 \, b - 1\right )} \log \left ({\left | -2 \, \sqrt {a x - b} + 2 \, \sqrt {a x + \sqrt {a x - b}} - 1 \right |}\right ) - 2 \, \sqrt {a x + \sqrt {a x - b}} {\left (2 \, \sqrt {a x - b} + 1\right )}}{4 \, a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/4*((4*b - 1)*log(abs(-2*sqrt(a*x - b) + 2*sqrt(a*x + sqrt(a*x - b)) - 1)) - 2*sqrt(a*x + sqrt(a*x - b))*(2*
sqrt(a*x - b) + 1))/a

________________________________________________________________________________________

maple [A]  time = 0.08, size = 71, normalized size = 0.65

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}}{a}\) \(71\)
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}}{a}\) \(71\)

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

________________________________________________________________________________________

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}}\,{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)/(a*x-b)^(1/2),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\sqrt {a\,x+\sqrt {a\,x-b}}}{\sqrt {a\,x-b}} \,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),x)

[Out]

int((a*x + (a*x - b)^(1/2))^(1/2)/(a*x - b)^(1/2), 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}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________