3.12.95 \(\int \frac {\sqrt {c+\sqrt {b+a x}}}{d-\sqrt {b+a x}} \, dx\)

Optimal. Leaf size=87 \[ -\frac {4 \sqrt {\sqrt {a x+b}+c} \left (\sqrt {a x+b}+c+3 d\right )}{3 a}-\frac {4 d \sqrt {-c-d} \tan ^{-1}\left (\frac {\sqrt {-c-d} \sqrt {\sqrt {a x+b}+c}}{c+d}\right )}{a} \]

________________________________________________________________________________________

Rubi [A]  time = 0.06, antiderivative size = 81, normalized size of antiderivative = 0.93, number of steps used = 6, number of rules used = 6, integrand size = 31, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {431, 376, 80, 50, 63, 206} \begin {gather*} -\frac {4 d \sqrt {\sqrt {a x+b}+c}}{a}+\frac {4 d \sqrt {c+d} \tanh ^{-1}\left (\frac {\sqrt {\sqrt {a x+b}+c}}{\sqrt {c+d}}\right )}{a}-\frac {4 \left (\sqrt {a x+b}+c\right )^{3/2}}{3 a} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-4*d*Sqrt[c + Sqrt[b + a*x]])/a - (4*(c + Sqrt[b + a*x])^(3/2))/(3*a) + (4*d*Sqrt[c + d]*ArcTanh[Sqrt[c + Sqr
t[b + a*x]]/Sqrt[c + d]])/a

Rule 50

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^n)/(b*
(m + n + 1)), x] + Dist[(n*(b*c - a*d))/(b*(m + n + 1)), Int[(a + b*x)^m*(c + d*x)^(n - 1), x], x] /; FreeQ[{a
, b, c, d}, x] && NeQ[b*c - a*d, 0] && GtQ[n, 0] && NeQ[m + n + 1, 0] &&  !(IGtQ[m, 0] && ( !IntegerQ[n] || (G
tQ[m, 0] && LtQ[m - n, 0]))) &&  !ILtQ[m + n + 2, 0] && IntLinearQ[a, b, c, d, m, n, x]

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 80

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

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 376

Int[((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> With[{g = Denominator[n]}, Dis
t[g, Subst[Int[x^(g - 1)*(a + b*x^(g*n))^p*(c + d*x^(g*n))^q, x], x, x^(1/g)], x]] /; FreeQ[{a, b, c, d, p, q}
, x] && NeQ[b*c - a*d, 0] && FractionQ[n]

Rule 431

Int[((a_.) + (b_.)*(u_)^(n_))^(p_.)*((c_.) + (d_.)*(u_)^(n_))^(q_.), x_Symbol] :> Dist[1/Coefficient[u, x, 1],
 Subst[Int[(a + b*x^n)^p*(c + d*x^n)^q, x], x, u], x] /; FreeQ[{a, b, c, d, n, p, q}, x] && LinearQ[u, x] && N
eQ[u, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 73, normalized size = 0.84 \begin {gather*} \frac {12 d \sqrt {c+d} \tanh ^{-1}\left (\frac {\sqrt {\sqrt {a x+b}+c}}{\sqrt {c+d}}\right )-4 \sqrt {\sqrt {a x+b}+c} \left (\sqrt {a x+b}+c+3 d\right )}{3 a} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-4*Sqrt[c + Sqrt[b + a*x]]*(c + 3*d + Sqrt[b + a*x]) + 12*d*Sqrt[c + d]*ArcTanh[Sqrt[c + Sqrt[b + a*x]]/Sqrt[
c + d]])/(3*a)

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.15, size = 87, normalized size = 1.00 \begin {gather*} -\frac {4 \sqrt {c+\sqrt {b+a x}} \left (c+3 d+\sqrt {b+a x}\right )}{3 a}-\frac {4 \sqrt {-c-d} d \tan ^{-1}\left (\frac {\sqrt {-c-d} \sqrt {c+\sqrt {b+a x}}}{c+d}\right )}{a} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-4*Sqrt[c + Sqrt[b + a*x]]*(c + 3*d + Sqrt[b + a*x]))/(3*a) - (4*Sqrt[-c - d]*d*ArcTan[(Sqrt[-c - d]*Sqrt[c +
 Sqrt[b + a*x]])/(c + d)])/a

________________________________________________________________________________________

fricas [A]  time = 0.50, size = 183, normalized size = 2.10 \begin {gather*} \left [\frac {2 \, {\left (3 \, \sqrt {c + d} d \log \left (-\frac {2 \, c d + d^{2} + a x + 2 \, \sqrt {a x + b} {\left (c + d\right )} + 2 \, {\left (\sqrt {c + d} d + \sqrt {a x + b} \sqrt {c + d}\right )} \sqrt {c + \sqrt {a x + b}} + b}{d^{2} - a x - b}\right ) - 2 \, {\left (c + 3 \, d + \sqrt {a x + b}\right )} \sqrt {c + \sqrt {a x + b}}\right )}}{3 \, a}, -\frac {4 \, {\left (3 \, \sqrt {-c - d} d \arctan \left (\frac {\sqrt {c + \sqrt {a x + b}} \sqrt {-c - d}}{c + d}\right ) + {\left (c + 3 \, d + \sqrt {a x + b}\right )} \sqrt {c + \sqrt {a x + b}}\right )}}{3 \, a}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

[2/3*(3*sqrt(c + d)*d*log(-(2*c*d + d^2 + a*x + 2*sqrt(a*x + b)*(c + d) + 2*(sqrt(c + d)*d + sqrt(a*x + b)*sqr
t(c + d))*sqrt(c + sqrt(a*x + b)) + b)/(d^2 - a*x - b)) - 2*(c + 3*d + sqrt(a*x + b))*sqrt(c + sqrt(a*x + b)))
/a, -4/3*(3*sqrt(-c - d)*d*arctan(sqrt(c + sqrt(a*x + b))*sqrt(-c - d)/(c + d)) + (c + 3*d + sqrt(a*x + b))*sq
rt(c + sqrt(a*x + b)))/a]

________________________________________________________________________________________

giac [A]  time = 0.16, size = 82, normalized size = 0.94 \begin {gather*} -\frac {4 \, {\left (c d + d^{2}\right )} \arctan \left (\frac {\sqrt {c + \sqrt {a x + b}}}{\sqrt {-c - d}}\right )}{a \sqrt {-c - d}} - \frac {4 \, {\left (a^{2} {\left (c + \sqrt {a x + b}\right )}^{\frac {3}{2}} + 3 \, a^{2} \sqrt {c + \sqrt {a x + b}} d\right )}}{3 \, a^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-4*(c*d + d^2)*arctan(sqrt(c + sqrt(a*x + b))/sqrt(-c - d))/(a*sqrt(-c - d)) - 4/3*(a^2*(c + sqrt(a*x + b))^(3
/2) + 3*a^2*sqrt(c + sqrt(a*x + b))*d)/a^3

________________________________________________________________________________________

maple [A]  time = 0.06, size = 60, normalized size = 0.69

method result size
derivativedivides \(\frac {-\frac {4 \left (c +\sqrt {a x +b}\right )^{\frac {3}{2}}}{3}-4 d \sqrt {c +\sqrt {a x +b}}+4 d \sqrt {c +d}\, \arctanh \left (\frac {\sqrt {c +\sqrt {a x +b}}}{\sqrt {c +d}}\right )}{a}\) \(60\)
default \(-\frac {2 \left (\frac {2 \left (c +\sqrt {a x +b}\right )^{\frac {3}{2}}}{3}+2 d \sqrt {c +\sqrt {a x +b}}-2 d \sqrt {c +d}\, \arctanh \left (\frac {\sqrt {c +\sqrt {a x +b}}}{\sqrt {c +d}}\right )\right )}{a}\) \(60\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2/a*(-2/3*(c+(a*x+b)^(1/2))^(3/2)-2*d*(c+(a*x+b)^(1/2))^(1/2)+2*d*(c+d)^(1/2)*arctanh((c+(a*x+b)^(1/2))^(1/2)/
(c+d)^(1/2)))

________________________________________________________________________________________

maxima [A]  time = 0.41, size = 88, normalized size = 1.01 \begin {gather*} -\frac {2 \, {\left (2 \, {\left (c + \sqrt {a x + b}\right )}^{\frac {3}{2}} + 6 \, \sqrt {c + \sqrt {a x + b}} d + \frac {3 \, {\left (c d + d^{2}\right )} \log \left (-\frac {\sqrt {c + d} - \sqrt {c + \sqrt {a x + b}}}{\sqrt {c + d} + \sqrt {c + \sqrt {a x + b}}}\right )}{\sqrt {c + d}}\right )}}{3 \, a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-2/3*(2*(c + sqrt(a*x + b))^(3/2) + 6*sqrt(c + sqrt(a*x + b))*d + 3*(c*d + d^2)*log(-(sqrt(c + d) - sqrt(c + s
qrt(a*x + b)))/(sqrt(c + d) + sqrt(c + sqrt(a*x + b))))/sqrt(c + d))/a

________________________________________________________________________________________

mupad [B]  time = 0.96, size = 63, normalized size = 0.72 \begin {gather*} \frac {4\,d\,\mathrm {atanh}\left (\frac {\sqrt {c+\sqrt {b+a\,x}}}{\sqrt {c+d}}\right )\,\sqrt {c+d}}{a}-\frac {4\,d\,\sqrt {c+\sqrt {b+a\,x}}}{a}-\frac {4\,{\left (c+\sqrt {b+a\,x}\right )}^{3/2}}{3\,a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(4*d*atanh((c + (b + a*x)^(1/2))^(1/2)/(c + d)^(1/2))*(c + d)^(1/2))/a - (4*d*(c + (b + a*x)^(1/2))^(1/2))/a -
 (4*(c + (b + a*x)^(1/2))^(3/2))/(3*a)

________________________________________________________________________________________

sympy [A]  time = 3.54, size = 78, normalized size = 0.90 \begin {gather*} - \frac {4 d \sqrt {c + \sqrt {a x + b}}}{a} - \frac {4 d \left (c + d\right ) \operatorname {atan}{\left (\frac {\sqrt {c + \sqrt {a x + b}}}{\sqrt {- c - d}} \right )}}{a \sqrt {- c - d}} - \frac {4 \left (c + \sqrt {a x + b}\right )^{\frac {3}{2}}}{3 a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-4*d*sqrt(c + sqrt(a*x + b))/a - 4*d*(c + d)*atan(sqrt(c + sqrt(a*x + b))/sqrt(-c - d))/(a*sqrt(-c - d)) - 4*(
c + sqrt(a*x + b))**(3/2)/(3*a)

________________________________________________________________________________________