3.9.66 \(\int \frac {(1+a x)^{3/2}}{x (1-a x)^{3/2}} \, dx\) [866]

Optimal. Leaf size=51 \[ \frac {4 \sqrt {1+a x}}{\sqrt {1-a x}}-\sin ^{-1}(a x)-\tanh ^{-1}\left (\sqrt {1-a x} \sqrt {1+a x}\right ) \]

[Out]

-arcsin(a*x)-arctanh((-a*x+1)^(1/2)*(a*x+1)^(1/2))+4*(a*x+1)^(1/2)/(-a*x+1)^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 51, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 7, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.304, Rules used = {100, 21, 132, 41, 222, 94, 214} \begin {gather*} -\text {ArcSin}(a x)+\frac {4 \sqrt {a x+1}}{\sqrt {1-a x}}-\tanh ^{-1}\left (\sqrt {1-a x} \sqrt {a x+1}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(1 + a*x)^(3/2)/(x*(1 - a*x)^(3/2)),x]

[Out]

(4*Sqrt[1 + a*x])/Sqrt[1 - a*x] - ArcSin[a*x] - ArcTanh[Sqrt[1 - a*x]*Sqrt[1 + a*x]]

Rule 21

Int[(u_.)*((a_) + (b_.)*(v_))^(m_.)*((c_) + (d_.)*(v_))^(n_.), x_Symbol] :> Dist[(b/d)^m, Int[u*(c + d*v)^(m +
 n), x], x] /; FreeQ[{a, b, c, d, n}, x] && EqQ[b*c - a*d, 0] && IntegerQ[m] && ( !IntegerQ[n] || SimplerQ[c +
 d*x, a + b*x])

Rule 41

Int[((a_) + (b_.)*(x_))^(m_.)*((c_) + (d_.)*(x_))^(m_.), x_Symbol] :> Int[(a*c + b*d*x^2)^m, x] /; FreeQ[{a, b
, c, d, m}, x] && EqQ[b*c + a*d, 0] && (IntegerQ[m] || (GtQ[a, 0] && GtQ[c, 0]))

Rule 94

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

Rule 100

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

Rule 132

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_), x_Symbol] :> Dist[b*d^(m
+ n)*f^p, Int[(a + b*x)^(m - 1)/(c + d*x)^m, x], x] + Int[(a + b*x)^(m - 1)*((e + f*x)^p/(c + d*x)^m)*ExpandTo
Sum[(a + b*x)*(c + d*x)^(-p - 1) - (b*d^(-p - 1)*f^p)/(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x
] && EqQ[m + n + p + 1, 0] && ILtQ[p, 0] && (GtQ[m, 0] || SumSimplerQ[m, -1] ||  !(GtQ[n, 0] || SumSimplerQ[n,
 -1]))

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 222

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [C] Result contains complex when optimal does not.
time = 0.16, size = 75, normalized size = 1.47 \begin {gather*} \frac {4 \sqrt {1-a^2 x^2}}{1-a x}-2 \tan ^{-1}\left (\frac {\sqrt {1+a x}}{\sqrt {1-a x}}\right )+2 i \tan ^{-1}\left (a x+i \sqrt {1-a^2 x^2}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(1 + a*x)^(3/2)/(x*(1 - a*x)^(3/2)),x]

[Out]

(4*Sqrt[1 - a^2*x^2])/(1 - a*x) - 2*ArcTan[Sqrt[1 + a*x]/Sqrt[1 - a*x]] + (2*I)*ArcTan[a*x + I*Sqrt[1 - a^2*x^
2]]

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.70, size = 134, normalized size = 2.63

method result size
default \(\frac {\left (-\arctanh \left (\frac {1}{\sqrt {-a^{2} x^{2}+1}}\right ) \mathrm {csgn}\left (a \right ) a x -\arctan \left (\frac {\mathrm {csgn}\left (a \right ) a x}{\sqrt {-\left (a x +1\right ) \left (a x -1\right )}}\right ) a x +\arctanh \left (\frac {1}{\sqrt {-a^{2} x^{2}+1}}\right ) \mathrm {csgn}\left (a \right )-4 \,\mathrm {csgn}\left (a \right ) \sqrt {-a^{2} x^{2}+1}+\arctan \left (\frac {\mathrm {csgn}\left (a \right ) a x}{\sqrt {-\left (a x +1\right ) \left (a x -1\right )}}\right )\right ) \mathrm {csgn}\left (a \right ) \sqrt {-a x +1}\, \sqrt {a x +1}}{\left (a x -1\right ) \sqrt {-a^{2} x^{2}+1}}\) \(134\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(-arctanh(1/(-a^2*x^2+1)^(1/2))*csgn(a)*a*x-arctan(csgn(a)*a*x/(-(a*x+1)*(a*x-1))^(1/2))*a*x+arctanh(1/(-a^2*x
^2+1)^(1/2))*csgn(a)-4*csgn(a)*(-a^2*x^2+1)^(1/2)+arctan(csgn(a)*a*x/(-(a*x+1)*(a*x-1))^(1/2)))*csgn(a)*(-a*x+
1)^(1/2)*(a*x+1)^(1/2)/(a*x-1)/(-a^2*x^2+1)^(1/2)

________________________________________________________________________________________

Maxima [A]
time = 0.48, size = 65, normalized size = 1.27 \begin {gather*} \frac {4 \, a x}{\sqrt {-a^{2} x^{2} + 1}} + \frac {4}{\sqrt {-a^{2} x^{2} + 1}} - \arcsin \left (a x\right ) - \log \left (\frac {2 \, \sqrt {-a^{2} x^{2} + 1}}{{\left | x \right |}} + \frac {2}{{\left | x \right |}}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

4*a*x/sqrt(-a^2*x^2 + 1) + 4/sqrt(-a^2*x^2 + 1) - arcsin(a*x) - log(2*sqrt(-a^2*x^2 + 1)/abs(x) + 2/abs(x))

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 93 vs. \(2 (43) = 86\).
time = 0.37, size = 93, normalized size = 1.82 \begin {gather*} \frac {4 \, a x + 2 \, {\left (a x - 1\right )} \arctan \left (\frac {\sqrt {a x + 1} \sqrt {-a x + 1} - 1}{a x}\right ) + {\left (a x - 1\right )} \log \left (\frac {\sqrt {a x + 1} \sqrt {-a x + 1} - 1}{x}\right ) - 4 \, \sqrt {a x + 1} \sqrt {-a x + 1} - 4}{a x - 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(4*a*x + 2*(a*x - 1)*arctan((sqrt(a*x + 1)*sqrt(-a*x + 1) - 1)/(a*x)) + (a*x - 1)*log((sqrt(a*x + 1)*sqrt(-a*x
 + 1) - 1)/x) - 4*sqrt(a*x + 1)*sqrt(-a*x + 1) - 4)/(a*x - 1)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\left (a x + 1\right )^{\frac {3}{2}}}{x \left (- a x + 1\right )^{\frac {3}{2}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Integral((a*x + 1)**(3/2)/(x*(-a*x + 1)**(3/2)), x)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Warning, choosing root of [1,0,-4,0,%%%{
4,[2,2]%%%}] at parameters values [42,56]Warning, choosing root of [1,0,-4,0,%%%{4,[2,2]%%%}] at parameters va
lues [-9,-13](2*sageV

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {{\left (a\,x+1\right )}^{3/2}}{x\,{\left (1-a\,x\right )}^{3/2}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________