3.8.39 \(\int \frac {\sqrt {\frac {a+b x}{c-b x}}}{a+b x} \, dx\) [739]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {1983, 12, 209} \begin {gather*} \frac {2 \text {ArcTan}\left (\sqrt {\frac {a+b x}{c-b x}}\right )}{b} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(2*ArcTan[Sqrt[(a + b*x)/(c - b*x)]])/b

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 209

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

Rule 1983

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

Rubi steps

\begin {align*} \int \frac {\sqrt {\frac {a+b x}{c-b x}}}{a+b x} \, dx &=(2 b (a+c)) \text {Subst}\left (\int \frac {1}{b^2 (a+c) \left (1+x^2\right )} \, dx,x,\sqrt {\frac {a+b x}{c-b x}}\right )\\ &=\frac {2 \text {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\sqrt {\frac {a+b x}{c-b x}}\right )}{b}\\ &=\frac {2 \tan ^{-1}\left (\sqrt {\frac {a+b x}{c-b x}}\right )}{b}\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(63\) vs. \(2(24)=48\).
time = 0.07, size = 63, normalized size = 2.62 \begin {gather*} -\frac {2 \sqrt {c-b x} \sqrt {\frac {a+b x}{c-b x}} \tan ^{-1}\left (\frac {\sqrt {c-b x}}{\sqrt {a+b x}}\right )}{b \sqrt {a+b x}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-2*Sqrt[c - b*x]*Sqrt[(a + b*x)/(c - b*x)]*ArcTan[Sqrt[c - b*x]/Sqrt[a + b*x]])/(b*Sqrt[a + b*x])

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(84\) vs. \(2(22)=44\).
time = 0.36, size = 85, normalized size = 3.54

method result size
default \(-\frac {\arctan \left (\frac {\sqrt {b^{2}}\, \left (2 b x +a -c \right )}{2 b \sqrt {-\left (b x +a \right ) \left (b x -c \right )}}\right ) \left (b x -c \right ) \sqrt {-\frac {b x +a}{b x -c}}}{\sqrt {b^{2}}\, \sqrt {-\left (b x +a \right ) \left (b x -c \right )}}\) \(85\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.50, size = 24, normalized size = 1.00 \begin {gather*} \frac {2 \, \arctan \left (\sqrt {-\frac {b x + a}{b x - c}}\right )}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*arctan(sqrt(-(b*x + a)/(b*x - c)))/b

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 24, normalized size = 1.00 \begin {gather*} \frac {2 \, \arctan \left (\sqrt {-\frac {b x + a}{b x - c}}\right )}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*arctan(sqrt(-(b*x + a)/(b*x - c)))/b

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 5.86, size = 41, normalized size = 1.71 \begin {gather*} -\frac {\arcsin \left (-\frac {2 \, b x + a - c}{a + c}\right ) \mathrm {sgn}\left (-a b - b c\right ) \mathrm {sgn}\left (b x - c\right )}{{\left | b \right |}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-arcsin(-(2*b*x + a - c)/(a + c))*sgn(-a*b - b*c)*sgn(b*x - c)/abs(b)

________________________________________________________________________________________

Mupad [B]
time = 0.18, size = 36, normalized size = 1.50 \begin {gather*} -\frac {2\,\sqrt {-b}\,\mathrm {atanh}\left (\frac {\sqrt {-b}\,\sqrt {\frac {a+b\,x}{c-b\,x}}}{\sqrt {b}}\right )}{b^{3/2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________