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

Optimal. Leaf size=248 \[ -\frac {3 \sqrt {a x+\sqrt {-b+a x}}}{2 a}+\sqrt {-b+a x} \left (-\frac {2}{a}+\frac {\sqrt {a x+\sqrt {-b+a x}}}{a}\right )-\frac {4 (-3+2 b) \text {ArcTan}\left (\frac {1-2 \sqrt {-b+a x}+2 \sqrt {a x+\sqrt {-b+a x}}}{\sqrt {-5+4 b}}\right )}{a \sqrt {-5+4 b}}+\frac {(-19+4 b) \log \left (1+2 \sqrt {-b+a x}-2 \sqrt {a x+\sqrt {-b+a x}}\right )}{4 a}+\frac {2 \log \left (1-2 a x-\sqrt {a x+\sqrt {-b+a x}}+2 \sqrt {-b+a x} \sqrt {a x+\sqrt {-b+a x}}\right )}{a} \]

[Out]

-3/2*(a*x+(a*x-b)^(1/2))^(1/2)/a+(a*x-b)^(1/2)*(-2/a+(a*x+(a*x-b)^(1/2))^(1/2)/a)-4*(-3+2*b)*arctan((1-2*(a*x-
b)^(1/2)+2*(a*x+(a*x-b)^(1/2))^(1/2))/(-5+4*b)^(1/2))/a/(-5+4*b)^(1/2)+1/4*(-19+4*b)*ln(1+2*(a*x-b)^(1/2)-2*(a
*x+(a*x-b)^(1/2))^(1/2))/a+2*ln(1-2*a*x-(a*x+(a*x-b)^(1/2))^(1/2)+2*(a*x-b)^(1/2)*(a*x+(a*x-b)^(1/2))^(1/2))/a

________________________________________________________________________________________

Rubi [A]
time = 0.48, antiderivative size = 442, normalized size of antiderivative = 1.78, number of steps used = 25, number of rules used = 14, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {6874, 648, 632, 212, 642, 626, 635, 1003, 996, 1033, 1090, 1, 1039, 1038} \begin {gather*} \frac {\sqrt {\sqrt {a x-b}+a x} \left (2 \sqrt {a x-b}+1\right )}{2 a}-\frac {2 \sqrt {a x-b}}{a}-\frac {2 \sqrt {\sqrt {a x-b}+a x}}{a}+\frac {\log \left (-\sqrt {a x-b}-a x+1\right )}{a}+\frac {2 \tanh ^{-1}\left (\sqrt {\sqrt {a x-b}+a x}\right )}{a}+\frac {2 (3-2 b) \tanh ^{-1}\left (\frac {2 \sqrt {a x-b}+1}{\sqrt {5-4 b}}\right )}{a \sqrt {5-4 b}}-\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}+\frac {2 (1-b) \tanh ^{-1}\left (\frac {2 \sqrt {a x-b}+1}{2 \sqrt {\sqrt {a x-b}+a x}}\right )}{a}+\frac {\tanh ^{-1}\left (\frac {2 \sqrt {a x-b}+1}{2 \sqrt {\sqrt {a x-b}+a x}}\right )}{a}-\frac {4 (1-b) \tanh ^{-1}\left (\frac {2 \sqrt {a x-b}+1}{\sqrt {5-4 b} \sqrt {\sqrt {a x-b}+a x}}\right )}{a \sqrt {5-4 b}}-\frac {2 \tanh ^{-1}\left (\frac {2 \sqrt {a x-b}+1}{\sqrt {5-4 b} \sqrt {\sqrt {a x-b}+a x}}\right )}{a \sqrt {5-4 b}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 1

Int[(u_.)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Symbol] :> Int[u*(b*x^n)^p, x] /; FreeQ[{a, b, n, p}, x] && EqQ[a
, 0]

Rule 212

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] && (GtQ[a, 0] || LtQ[b, 0])

Rule 626

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 632

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

Rule 635

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 642

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[d*(Log[RemoveContent[a + b*x +
c*x^2, x]]/b), x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 648

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

Rule 996

Int[1/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbol] :> Dist[-2*e, Su
bst[Int[1/(e*(b*e - 4*a*f) - (b*d - a*e)*x^2), x], x, (e + 2*f*x)/Sqrt[d + e*x + f*x^2]], x] /; FreeQ[{a, b, c
, d, e, f}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[e^2 - 4*d*f, 0] && EqQ[c*e - b*f, 0]

Rule 1003

Int[Sqrt[(a_) + (b_.)*(x_) + (c_.)*(x_)^2]/((d_) + (e_.)*(x_) + (f_.)*(x_)^2), x_Symbol] :> Dist[c/f, Int[1/Sq
rt[a + b*x + c*x^2], x], x] - Dist[1/f, Int[(c*d - a*f + (c*e - b*f)*x)/(Sqrt[a + b*x + c*x^2]*(d + e*x + f*x^
2)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[e^2 - 4*d*f, 0]

Rule 1033

Int[((g_.) + (h_.)*(x_))*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_)*((d_) + (e_.)*(x_) + (f_.)*(x_)^2)^(q_), x_Sy
mbol] :> Simp[h*(a + b*x + c*x^2)^p*((d + e*x + f*x^2)^(q + 1)/(2*f*(p + q + 1))), x] - Dist[1/(2*f*(p + q + 1
)), Int[(a + b*x + c*x^2)^(p - 1)*(d + e*x + f*x^2)^q*Simp[h*p*(b*d - a*e) + a*(h*e - 2*g*f)*(p + q + 1) + (2*
h*p*(c*d - a*f) + b*(h*e - 2*g*f)*(p + q + 1))*x + (h*p*(c*e - b*f) + c*(h*e - 2*g*f)*(p + q + 1))*x^2, x], x]
, x] /; FreeQ[{a, b, c, d, e, f, g, h, q}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[e^2 - 4*d*f, 0] && GtQ[p, 0] && Ne
Q[p + q + 1, 0]

Rule 1038

Int[((g_) + (h_.)*(x_))/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbol
] :> Dist[-2*g, Subst[Int[1/(b*d - a*e - b*x^2), x], x, Sqrt[d + e*x + f*x^2]], x] /; FreeQ[{a, b, c, d, e, f,
 g, h}, x] && NeQ[b^2 - 4*a*c, 0] && NeQ[e^2 - 4*d*f, 0] && EqQ[c*e - b*f, 0] && EqQ[h*e - 2*g*f, 0]

Rule 1039

Int[((g_.) + (h_.)*(x_))/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbo
l] :> Dist[-(h*e - 2*g*f)/(2*f), Int[1/((a + b*x + c*x^2)*Sqrt[d + e*x + f*x^2]), x], x] + Dist[h/(2*f), Int[(
e + 2*f*x)/((a + b*x + c*x^2)*Sqrt[d + e*x + f*x^2]), x], x] /; FreeQ[{a, b, c, d, e, f, g, h}, x] && NeQ[b^2
- 4*a*c, 0] && NeQ[e^2 - 4*d*f, 0] && EqQ[c*e - b*f, 0] && NeQ[h*e - 2*g*f, 0]

Rule 1090

Int[((A_.) + (B_.)*(x_) + (C_.)*(x_)^2)/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x
_)^2]), x_Symbol] :> Dist[C/c, Int[1/Sqrt[d + e*x + f*x^2], x], x] + Dist[1/c, Int[(A*c - a*C + (B*c - b*C)*x)
/((a + b*x + c*x^2)*Sqrt[d + e*x + f*x^2]), x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C}, x] && NeQ[b^2 - 4*a*c
, 0] && NeQ[e^2 - 4*d*f, 0]

Rule 6874

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.60, size = 216, normalized size = 0.87 \begin {gather*} \frac {-8 \sqrt {-b+a x}+2 \sqrt {a x+\sqrt {-b+a x}} \left (-3+2 \sqrt {-b+a x}\right )-\frac {16 (-3+2 b) \text {ArcTan}\left (\frac {1-2 \sqrt {-b+a x}+2 \sqrt {a x+\sqrt {-b+a x}}}{\sqrt {-5+4 b}}\right )}{\sqrt {-5+4 b}}+(-19+4 b) \log \left (a \left (-1-2 \sqrt {-b+a x}+2 \sqrt {a x+\sqrt {-b+a x}}\right )\right )+8 \log \left (1-2 b+2 (b-a x)+\sqrt {a x+\sqrt {-b+a x}} \left (-1+2 \sqrt {-b+a x}\right )\right )}{4 a} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-8*Sqrt[-b + a*x] + 2*Sqrt[a*x + Sqrt[-b + a*x]]*(-3 + 2*Sqrt[-b + a*x]) - (16*(-3 + 2*b)*ArcTan[(1 - 2*Sqrt[
-b + a*x] + 2*Sqrt[a*x + Sqrt[-b + a*x]])/Sqrt[-5 + 4*b]])/Sqrt[-5 + 4*b] + (-19 + 4*b)*Log[a*(-1 - 2*Sqrt[-b
+ a*x] + 2*Sqrt[a*x + Sqrt[-b + a*x]])] + 8*Log[1 - 2*b + 2*(b - a*x) + Sqrt[a*x + Sqrt[-b + a*x]]*(-1 + 2*Sqr
t[-b + a*x])])/(4*a)

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(1550\) vs. \(2(208)=416\).
time = 0.24, size = 1551, normalized size = 6.25

method result size
derivativedivides \(\text {Expression too large to display}\) \(1551\)
default \(\text {Expression too large to display}\) \(1551\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[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1/2*(5-4*b)^(1/2)))/(((a*x-b)^(1/2)+1/2+1/2*(5-4*b)^(1/2))^2-(5-4*b)^(1/2)*((a*
x-b)^(1/2)+1/2+1/2*(5-4*b)^(1/2))+1)^(1/2))+1/(5-4*b)^(1/2)*b*(((a*x-b)^(1/2)+1/2+1/2*(5-4*b)^(1/2))^2-(5-4*b)
^(1/2)*((a*x-b)^(1/2)+1/2+1/2*(5-4*b)^(1/2))+1)^(1/2)-1/(5-4*b)^(1/2)*b*arctanh(1/2*(2-(5-4*b)^(1/2)*((a*x-b)^
(1/2)+1/2+1/2*(5-4*b)^(1/2)))/(((a*x-b)^(1/2)+1/2+1/2*(5-4*b)^(1/2))^2-(5-4*b)^(1/2)*((a*x-b)^(1/2)+1/2+1/2*(5
-4*b)^(1/2))+1)^(1/2))+2/(-5+4*b)^(1/2)*arctan((2*(a*x-b)^(1/2)+1)/(-5+4*b)^(1/2))*b-1/(5-4*b)^(1/2)*b*(((a*x-
b)^(1/2)+1/2-1/2*(5-4*b)^(1/2))^2+(5-4*b)^(1/2)*((a*x-b)^(1/2)+1/2-1/2*(5-4*b)^(1/2))+1)^(1/2)+1/(5-4*b)^(1/2)
*b*arctanh(1/2*(2+(5-4*b)^(1/2)*((a*x-b)^(1/2)+1/2-1/2*(5-4*b)^(1/2)))/(((a*x-b)^(1/2)+1/2-1/2*(5-4*b)^(1/2))^
2+(5-4*b)^(1/2)*((a*x-b)^(1/2)+1/2-1/2*(5-4*b)^(1/2))+1)^(1/2)))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: TypeError >>  Error detected within library code:   integrate: implementation incomplete (ir
rational residues)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.76, size = 395, normalized size = 1.59 \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 - 11\right )} \log \left ({\left | -2 \, \sqrt {a x - b} + 2 \, \sqrt {a x + \sqrt {a x - b}} - 1 \right |}\right )}{4 \, a} + \frac {2 \, {\left (2 \, b - 3\right )} \arctan \left (-\frac {2 \, \sqrt {a x - b} - 2 \, \sqrt {a x + \sqrt {a x - b}} + 3}{\sqrt {4 \, b - 5}}\right )}{a \sqrt {4 \, b - 5}} - \frac {2 \, {\left (2 \, b - 3\right )} \arctan \left (-\frac {2 \, \sqrt {a x - b} - 2 \, \sqrt {a x + \sqrt {a x - b}} - 1}{\sqrt {4 \, b - 5}}\right )}{a \sqrt {4 \, b - 5}} + \frac {2 \, {\left (2 \, b - 3\right )} \arctan \left (\frac {2 \, \sqrt {a x - b} + 1}{\sqrt {4 \, b - 5}}\right )}{a \sqrt {4 \, b - 5}} + \frac {\log \left (a x + \sqrt {a x - b} - 1\right )}{a} - \frac {\log \left ({\left (\sqrt {a x - b} - \sqrt {a x + \sqrt {a x - b}}\right )}^{2} + b + 3 \, \sqrt {a x - b} - 3 \, \sqrt {a x + \sqrt {a x - b}} + 1\right )}{a} + \frac {\log \left ({\left (\sqrt {a x - b} - \sqrt {a x + \sqrt {a x - b}}\right )}^{2} + b - \sqrt {a x - b} + \sqrt {a x + \sqrt {a x - b}} - 1\right )}{a} - \frac {2 \, \sqrt {a x - b}}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*x-b)^(1/2)/(1+(a*x+(a*x-b)^(1/2))^(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 - 11)*log(abs(-2*sqrt(a*x - b) + 2*sqrt(a*x
 + sqrt(a*x - b)) - 1))/a + 2*(2*b - 3)*arctan(-(2*sqrt(a*x - b) - 2*sqrt(a*x + sqrt(a*x - b)) + 3)/sqrt(4*b -
 5))/(a*sqrt(4*b - 5)) - 2*(2*b - 3)*arctan(-(2*sqrt(a*x - b) - 2*sqrt(a*x + sqrt(a*x - b)) - 1)/sqrt(4*b - 5)
)/(a*sqrt(4*b - 5)) + 2*(2*b - 3)*arctan((2*sqrt(a*x - b) + 1)/sqrt(4*b - 5))/(a*sqrt(4*b - 5)) + log(a*x + sq
rt(a*x - b) - 1)/a - log((sqrt(a*x - b) - sqrt(a*x + sqrt(a*x - b)))^2 + b + 3*sqrt(a*x - b) - 3*sqrt(a*x + sq
rt(a*x - b)) + 1)/a + log((sqrt(a*x - b) - sqrt(a*x + sqrt(a*x - b)))^2 + b - sqrt(a*x - b) + sqrt(a*x + sqrt(
a*x - b)) - 1)/a - 2*sqrt(a*x - b)/a

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________