\(\int \sqrt {\frac {a+b x}{c+d x}} \, dx\) [745]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [B] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 17, antiderivative size = 76 \[ \int \sqrt {\frac {a+b x}{c+d x}} \, dx=\frac {\sqrt {\frac {a+b x}{c+d x}} (c+d x)}{d}-\frac {(b c-a d) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {\frac {a+b x}{c+d x}}}{\sqrt {b}}\right )}{\sqrt {b} d^{3/2}} \]

[Out]

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

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {1979, 294, 214} \[ \int \sqrt {\frac {a+b x}{c+d x}} \, dx=\frac {(c+d x) \sqrt {\frac {a+b x}{c+d x}}}{d}-\frac {(b c-a d) \text {arctanh}\left (\frac {\sqrt {d} \sqrt {\frac {a+b x}{c+d x}}}{\sqrt {b}}\right )}{\sqrt {b} d^{3/2}} \]

[In]

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

[Out]

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

Rule 214

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

Rule 294

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[c^(n - 1)*(c*x)^(m - n + 1)*((a + b*x^
n)^(p + 1)/(b*n*(p + 1))), x] - Dist[c^n*((m - n + 1)/(b*n*(p + 1))), Int[(c*x)^(m - n)*(a + b*x^n)^(p + 1), x
], x] /; FreeQ[{a, b, c}, x] && IGtQ[n, 0] && LtQ[p, -1] && GtQ[m + 1, n] &&  !ILtQ[(m + n*(p + 1) + 1)/n, 0]
&& IntBinomialQ[a, b, c, n, m, p, x]

Rule 1979

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

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

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.28 \[ \int \sqrt {\frac {a+b x}{c+d x}} \, dx=\frac {\sqrt {\frac {a+b x}{c+d x}} \left (\sqrt {d} (c+d x)+\frac {(-b c+a d) \sqrt {c+d x} \text {arctanh}\left (\frac {\sqrt {b} \sqrt {c+d x}}{\sqrt {d} \sqrt {a+b x}}\right )}{\sqrt {b} \sqrt {a+b x}}\right )}{d^{3/2}} \]

[In]

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

[Out]

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

Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(151\) vs. \(2(64)=128\).

Time = 0.09 (sec) , antiderivative size = 152, normalized size of antiderivative = 2.00

method result size
default \(\frac {\sqrt {\frac {b x +a}{d x +c}}\, \left (d x +c \right ) \left (\ln \left (\frac {2 b d x +2 \sqrt {\left (b x +a \right ) \left (d x +c \right )}\, \sqrt {b d}+a d +b c}{2 \sqrt {b d}}\right ) a d -\ln \left (\frac {2 b d x +2 \sqrt {\left (b x +a \right ) \left (d x +c \right )}\, \sqrt {b d}+a d +b c}{2 \sqrt {b d}}\right ) b c +2 \sqrt {\left (b x +a \right ) \left (d x +c \right )}\, \sqrt {b d}\right )}{2 \sqrt {\left (b x +a \right ) \left (d x +c \right )}\, d \sqrt {b d}}\) \(152\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 180, normalized size of antiderivative = 2.37 \[ \int \sqrt {\frac {a+b x}{c+d x}} \, dx=\left [-\frac {{\left (b c - a d\right )} \sqrt {b d} \log \left (2 \, b d x + b c + a d + 2 \, \sqrt {b d} {\left (d x + c\right )} \sqrt {\frac {b x + a}{d x + c}}\right ) - 2 \, {\left (b d^{2} x + b c d\right )} \sqrt {\frac {b x + a}{d x + c}}}{2 \, b d^{2}}, \frac {{\left (b c - a d\right )} \sqrt {-b d} \arctan \left (\frac {\sqrt {-b d} {\left (d x + c\right )} \sqrt {\frac {b x + a}{d x + c}}}{b d x + a d}\right ) + {\left (b d^{2} x + b c d\right )} \sqrt {\frac {b x + a}{d x + c}}}{b d^{2}}\right ] \]

[In]

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

[Out]

[-1/2*((b*c - a*d)*sqrt(b*d)*log(2*b*d*x + b*c + a*d + 2*sqrt(b*d)*(d*x + c)*sqrt((b*x + a)/(d*x + c))) - 2*(b
*d^2*x + b*c*d)*sqrt((b*x + a)/(d*x + c)))/(b*d^2), ((b*c - a*d)*sqrt(-b*d)*arctan(sqrt(-b*d)*(d*x + c)*sqrt((
b*x + a)/(d*x + c))/(b*d*x + a*d)) + (b*d^2*x + b*c*d)*sqrt((b*x + a)/(d*x + c)))/(b*d^2)]

Sympy [F]

\[ \int \sqrt {\frac {a+b x}{c+d x}} \, dx=\int \sqrt {\frac {a + b x}{c + d x}}\, dx \]

[In]

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

[Out]

Integral(sqrt((a + b*x)/(c + d*x)), x)

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.55 \[ \int \sqrt {\frac {a+b x}{c+d x}} \, dx=\frac {{\left (b c - a d\right )} \sqrt {\frac {b x + a}{d x + c}}}{b d - \frac {{\left (b x + a\right )} d^{2}}{d x + c}} + \frac {{\left (b c - a d\right )} \log \left (\frac {d \sqrt {\frac {b x + a}{d x + c}} - \sqrt {b d}}{d \sqrt {\frac {b x + a}{d x + c}} + \sqrt {b d}}\right )}{2 \, \sqrt {b d} d} \]

[In]

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

[Out]

(b*c - a*d)*sqrt((b*x + a)/(d*x + c))/(b*d - (b*x + a)*d^2/(d*x + c)) + 1/2*(b*c - a*d)*log((d*sqrt((b*x + a)/
(d*x + c)) - sqrt(b*d))/(d*sqrt((b*x + a)/(d*x + c)) + sqrt(b*d)))/(sqrt(b*d)*d)

Giac [A] (verification not implemented)

none

Time = 0.38 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.43 \[ \int \sqrt {\frac {a+b x}{c+d x}} \, dx=\frac {{\left (b c \mathrm {sgn}\left (d x + c\right ) - a d \mathrm {sgn}\left (d x + c\right )\right )} \log \left ({\left | -b c - a d - 2 \, \sqrt {b d} {\left (\sqrt {b d} x - \sqrt {b d x^{2} + b c x + a d x + a c}\right )} \right |}\right )}{2 \, \sqrt {b d} d} + \frac {\sqrt {b d x^{2} + b c x + a d x + a c} \mathrm {sgn}\left (d x + c\right )}{d} \]

[In]

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

[Out]

1/2*(b*c*sgn(d*x + c) - a*d*sgn(d*x + c))*log(abs(-b*c - a*d - 2*sqrt(b*d)*(sqrt(b*d)*x - sqrt(b*d*x^2 + b*c*x
 + a*d*x + a*c))))/(sqrt(b*d)*d) + sqrt(b*d*x^2 + b*c*x + a*d*x + a*c)*sgn(d*x + c)/d

Mupad [B] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 90, normalized size of antiderivative = 1.18 \[ \int \sqrt {\frac {a+b x}{c+d x}} \, dx=\frac {\mathrm {atanh}\left (\frac {\sqrt {d}\,\sqrt {\frac {a+b\,x}{c+d\,x}}}{\sqrt {b}}\right )\,\left (a\,d-b\,c\right )}{\sqrt {b}\,d^{3/2}}+\frac {\left (a\,d-b\,c\right )\,\sqrt {\frac {a+b\,x}{c+d\,x}}}{b\,d\,\left (\frac {d\,\left (a+b\,x\right )}{b\,\left (c+d\,x\right )}-1\right )} \]

[In]

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

[Out]

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