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

Optimal. Leaf size=136 \[ \frac {\left (-48 b^2-8 b+5\right ) \log \left (2 \sqrt {a x-b}-2 \sqrt {\sqrt {a x-b}+a x}+1\right )}{64 a^2}+\frac {\sqrt {\sqrt {a x-b}+a x} (8 a x-12 b+15)}{96 a^2}+\frac {\sqrt {a x-b} (24 a x+36 b-5) \sqrt {\sqrt {a x-b}+a x}}{48 a^2} \]

________________________________________________________________________________________

Rubi [A]  time = 0.54, antiderivative size = 166, normalized size of antiderivative = 1.22, number of steps used = 6, number of rules used = 5, integrand size = 32, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {1661, 640, 612, 621, 206} \begin {gather*} \frac {\sqrt {a x-b} \left (\sqrt {a x-b}+a x\right )^{3/2}}{2 a^2}-\frac {5 \left (\sqrt {a x-b}+a x\right )^{3/2}}{12 a^2}+\frac {(12 b+5) \left (2 \sqrt {a x-b}+1\right ) \sqrt {\sqrt {a x-b}+a x}}{32 a^2}-\frac {(1-4 b) (12 b+5) \tanh ^{-1}\left (\frac {2 \sqrt {a x-b}+1}{2 \sqrt {\sqrt {a x-b}+a x}}\right )}{64 a^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-5*(a*x + Sqrt[-b + a*x])^(3/2))/(12*a^2) + (Sqrt[-b + a*x]*(a*x + Sqrt[-b + a*x])^(3/2))/(2*a^2) + ((5 + 12*
b)*Sqrt[a*x + Sqrt[-b + a*x]]*(1 + 2*Sqrt[-b + a*x]))/(32*a^2) - ((1 - 4*b)*(5 + 12*b)*ArcTanh[(1 + 2*Sqrt[-b
+ a*x])/(2*Sqrt[a*x + Sqrt[-b + a*x]])])/(64*a^2)

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]

Rule 640

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] + Dist[(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[2*c*d - b*e, 0] && NeQ[p, -1]

Rule 1661

Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Expon[Pq, x], e = Coeff[Pq, x, Expo
n[Pq, x]]}, Simp[(e*x^(q - 1)*(a + b*x + c*x^2)^(p + 1))/(c*(q + 2*p + 1)), x] + Dist[1/(c*(q + 2*p + 1)), Int
[(a + b*x + c*x^2)^p*ExpandToSum[c*(q + 2*p + 1)*Pq - a*e*(q - 1)*x^(q - 2) - b*e*(q + p)*x^(q - 1) - c*e*(q +
 2*p + 1)*x^q, x], x], x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] &&  !LeQ[p, -1]

Rubi steps

\begin {align*} \int \frac {x \sqrt {a x+\sqrt {-b+a x}}}{\sqrt {-b+a x}} \, dx &=\frac {2 \operatorname {Subst}\left (\int \left (b+x^2\right ) \sqrt {b+x+x^2} \, dx,x,\sqrt {-b+a x}\right )}{a^2}\\ &=\frac {\sqrt {-b+a x} \left (a x+\sqrt {-b+a x}\right )^{3/2}}{2 a^2}+\frac {\operatorname {Subst}\left (\int \left (3 b-\frac {5 x}{2}\right ) \sqrt {b+x+x^2} \, dx,x,\sqrt {-b+a x}\right )}{2 a^2}\\ &=-\frac {5 \left (a x+\sqrt {-b+a x}\right )^{3/2}}{12 a^2}+\frac {\sqrt {-b+a x} \left (a x+\sqrt {-b+a x}\right )^{3/2}}{2 a^2}+\frac {(5+12 b) \operatorname {Subst}\left (\int \sqrt {b+x+x^2} \, dx,x,\sqrt {-b+a x}\right )}{8 a^2}\\ &=-\frac {5 \left (a x+\sqrt {-b+a x}\right )^{3/2}}{12 a^2}+\frac {\sqrt {-b+a x} \left (a x+\sqrt {-b+a x}\right )^{3/2}}{2 a^2}+\frac {(5+12 b) \sqrt {a x+\sqrt {-b+a x}} \left (1+2 \sqrt {-b+a x}\right )}{32 a^2}-\frac {((1-4 b) (5+12 b)) \operatorname {Subst}\left (\int \frac {1}{\sqrt {b+x+x^2}} \, dx,x,\sqrt {-b+a x}\right )}{64 a^2}\\ &=-\frac {5 \left (a x+\sqrt {-b+a x}\right )^{3/2}}{12 a^2}+\frac {\sqrt {-b+a x} \left (a x+\sqrt {-b+a x}\right )^{3/2}}{2 a^2}+\frac {(5+12 b) \sqrt {a x+\sqrt {-b+a x}} \left (1+2 \sqrt {-b+a x}\right )}{32 a^2}-\frac {((1-4 b) (5+12 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 )}{32 a^2}\\ &=-\frac {5 \left (a x+\sqrt {-b+a x}\right )^{3/2}}{12 a^2}+\frac {\sqrt {-b+a x} \left (a x+\sqrt {-b+a x}\right )^{3/2}}{2 a^2}+\frac {(5+12 b) \sqrt {a x+\sqrt {-b+a x}} \left (1+2 \sqrt {-b+a x}\right )}{32 a^2}-\frac {(1-4 b) (5+12 b) \tanh ^{-1}\left (\frac {1+2 \sqrt {-b+a x}}{2 \sqrt {a x+\sqrt {-b+a x}}}\right )}{64 a^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.21, size = 132, normalized size = 0.97 \begin {gather*} \frac {3 \left (48 b^2+8 b-5\right ) \tanh ^{-1}\left (\frac {2 \sqrt {a x-b}+1}{2 \sqrt {\sqrt {a x-b}+a x}}\right )+2 \sqrt {\sqrt {a x-b}+a x} \left (12 b \left (6 \sqrt {a x-b}-1\right )+8 a \left (6 x \sqrt {a x-b}+x\right )-10 \sqrt {a x-b}+15\right )}{192 a^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(2*Sqrt[a*x + Sqrt[-b + a*x]]*(15 - 10*Sqrt[-b + a*x] + 12*b*(-1 + 6*Sqrt[-b + a*x]) + 8*a*(x + 6*x*Sqrt[-b +
a*x])) + 3*(-5 + 8*b + 48*b^2)*ArcTanh[(1 + 2*Sqrt[-b + a*x])/(2*Sqrt[a*x + Sqrt[-b + a*x]])])/(192*a^2)

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.30, size = 135, normalized size = 0.99 \begin {gather*} \frac {\sqrt {a x+\sqrt {-b+a x}} \left (15-4 b-10 \sqrt {-b+a x}+120 b \sqrt {-b+a x}+8 (-b+a x)+48 (-b+a x)^{3/2}\right )}{96 a^2}+\frac {\left (5-8 b-48 b^2\right ) \log \left (-1-2 \sqrt {-b+a x}+2 \sqrt {a x+\sqrt {-b+a x}}\right )}{64 a^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(Sqrt[a*x + Sqrt[-b + a*x]]*(15 - 4*b - 10*Sqrt[-b + a*x] + 120*b*Sqrt[-b + a*x] + 8*(-b + a*x) + 48*(-b + a*x
)^(3/2)))/(96*a^2) + ((5 - 8*b - 48*b^2)*Log[-1 - 2*Sqrt[-b + a*x] + 2*Sqrt[a*x + Sqrt[-b + a*x]]])/(64*a^2)

________________________________________________________________________________________

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(x*(a*x+(a*x-b)^(1/2))^(1/2)/(a*x-b)^(1/2),x, algorithm="fricas")

[Out]

Timed out

________________________________________________________________________________________

giac [A]  time = 0.75, size = 112, normalized size = 0.82 \begin {gather*} -\frac {3 \, {\left (48 \, b^{2} + 8 \, b - 5\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} {\left (4 \, \sqrt {a x - b} {\left (6 \, \sqrt {a x - b} + 1\right )} + 60 \, b - 5\right )} - 4 \, b + 15\right )}}{192 \, a^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/192*(3*(48*b^2 + 8*b - 5)*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)*(4*sqrt(a*x - b)*(6*sqrt(a*x - b) + 1) + 60*b - 5) - 4*b + 15))/a^2

________________________________________________________________________________________

maple [A]  time = 0.08, size = 182, normalized size = 1.34

method result size
derivativedivides \(\frac {\frac {\sqrt {a x -b}\, \left (a x +\sqrt {a x -b}\right )^{\frac {3}{2}}}{2}-\frac {5 \left (a x +\sqrt {a x -b}\right )^{\frac {3}{2}}}{12}+\frac {5 \left (2 \sqrt {a x -b}+1\right ) \sqrt {a x +\sqrt {a x -b}}}{32}+\frac {5 \left (4 b -1\right ) \ln \left (\frac {1}{2}+\sqrt {a x -b}+\sqrt {a x +\sqrt {a x -b}}\right )}{64}+\frac {3 b \left (\frac {\left (2 \sqrt {a x -b}+1\right ) \sqrt {a x +\sqrt {a x -b}}}{4}+\frac {\left (4 b -1\right ) \ln \left (\frac {1}{2}+\sqrt {a x -b}+\sqrt {a x +\sqrt {a x -b}}\right )}{8}\right )}{2}}{a^{2}}\) \(182\)
default \(\frac {\frac {\sqrt {a x -b}\, \left (a x +\sqrt {a x -b}\right )^{\frac {3}{2}}}{2}-\frac {5 \left (a x +\sqrt {a x -b}\right )^{\frac {3}{2}}}{12}+\frac {5 \left (2 \sqrt {a x -b}+1\right ) \sqrt {a x +\sqrt {a x -b}}}{32}+\frac {5 \left (4 b -1\right ) \ln \left (\frac {1}{2}+\sqrt {a x -b}+\sqrt {a x +\sqrt {a x -b}}\right )}{64}+\frac {3 b \left (\frac {\left (2 \sqrt {a x -b}+1\right ) \sqrt {a x +\sqrt {a x -b}}}{4}+\frac {\left (4 b -1\right ) \ln \left (\frac {1}{2}+\sqrt {a x -b}+\sqrt {a x +\sqrt {a x -b}}\right )}{8}\right )}{2}}{a^{2}}\) \(182\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2/a^2*(1/4*(a*x-b)^(1/2)*(a*x+(a*x-b)^(1/2))^(3/2)-5/24*(a*x+(a*x-b)^(1/2))^(3/2)+5/64*(2*(a*x-b)^(1/2)+1)*(a*
x+(a*x-b)^(1/2))^(1/2)+5/128*(4*b-1)*ln(1/2+(a*x-b)^(1/2)+(a*x+(a*x-b)^(1/2))^(1/2))+3/4*b*(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}} x}{\sqrt {a x - b}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(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))*x/sqrt(a*x - b), x)

________________________________________________________________________________________

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

[Out]

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

[Out]

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

________________________________________________________________________________________