3.2.54 \(\int \frac {a+b \cot ^{-1}(\frac {\sqrt {1-c x}}{\sqrt {1+c x}})}{1-c^2 x^2} \, dx\) [154]

Optimal. Leaf size=98 \[ -\frac {a \log \left (\frac {\sqrt {1-c x}}{\sqrt {1+c x}}\right )}{c}+\frac {i b \text {PolyLog}\left (2,-\frac {i \sqrt {1+c x}}{\sqrt {1-c x}}\right )}{2 c}-\frac {i b \text {PolyLog}\left (2,\frac {i \sqrt {1+c x}}{\sqrt {1-c x}}\right )}{2 c} \]

[Out]

-a*ln((-c*x+1)^(1/2)/(c*x+1)^(1/2))/c+1/2*I*b*polylog(2,-I*(c*x+1)^(1/2)/(-c*x+1)^(1/2))/c-1/2*I*b*polylog(2,I
*(c*x+1)^(1/2)/(-c*x+1)^(1/2))/c

________________________________________________________________________________________

Rubi [A]
time = 0.05, antiderivative size = 98, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {212, 6813, 4941, 2438} \begin {gather*} -\frac {a \log \left (\frac {\sqrt {1-c x}}{\sqrt {c x+1}}\right )}{c}+\frac {i b \text {Li}_2\left (-\frac {i \sqrt {c x+1}}{\sqrt {1-c x}}\right )}{2 c}-\frac {i b \text {Li}_2\left (\frac {i \sqrt {c x+1}}{\sqrt {1-c x}}\right )}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcCot[Sqrt[1 - c*x]/Sqrt[1 + c*x]])/(1 - c^2*x^2),x]

[Out]

-((a*Log[Sqrt[1 - c*x]/Sqrt[1 + c*x]])/c) + ((I/2)*b*PolyLog[2, ((-I)*Sqrt[1 + c*x])/Sqrt[1 - c*x]])/c - ((I/2
)*b*PolyLog[2, (I*Sqrt[1 + c*x])/Sqrt[1 - c*x]])/c

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 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4941

Int[((a_.) + ArcCot[(c_.)*(x_)]*(b_.))/(x_), x_Symbol] :> Simp[a*Log[x], x] + (-Dist[I*(b/2), Int[Log[1 + I/(c
*x)]/x, x], x] + Dist[I*(b/2), Int[Log[1 - I/(c*x)]/x, x], x]) /; FreeQ[{a, b, c}, x]

Rule 6813

Int[((a_.) + (b_.)*(F_)[((c_.)*Sqrt[(d_.) + (e_.)*(x_)])/Sqrt[(f_.) + (g_.)*(x_)]])^(n_.)/((A_.) + (C_.)*(x_)^
2), x_Symbol] :> Dist[2*e*(g/(C*(e*f - d*g))), Subst[Int[(a + b*F[c*x])^n/x, x], x, Sqrt[d + e*x]/Sqrt[f + g*x
]], x] /; FreeQ[{a, b, c, d, e, f, g, A, C, F}, x] && EqQ[C*d*f - A*e*g, 0] && EqQ[e*f + d*g, 0] && IGtQ[n, 0]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 73, normalized size = 0.74 \begin {gather*} \frac {a \tanh ^{-1}(c x)}{c}+\frac {i b \left (\text {PolyLog}\left (2,-\frac {i \sqrt {1+c x}}{\sqrt {1-c x}}\right )-\text {PolyLog}\left (2,\frac {i \sqrt {1+c x}}{\sqrt {1-c x}}\right )\right )}{2 c} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a + b*ArcCot[Sqrt[1 - c*x]/Sqrt[1 + c*x]])/(1 - c^2*x^2),x]

[Out]

(a*ArcTanh[c*x])/c + ((I/2)*b*(PolyLog[2, ((-I)*Sqrt[1 + c*x])/Sqrt[1 - c*x]] - PolyLog[2, (I*Sqrt[1 + c*x])/S
qrt[1 - c*x]]))/c

________________________________________________________________________________________

Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 258 vs. \(2 (78 ) = 156\).
time = 0.26, size = 259, normalized size = 2.64

method result size
default \(-\frac {a \ln \left (c x -1\right )}{2 c}+\frac {a \ln \left (c x +1\right )}{2 c}+\frac {b \,\mathrm {arccot}\left (\frac {\sqrt {-c x +1}}{\sqrt {c x +1}}\right ) \ln \left (1-\frac {\left (i+\frac {\sqrt {-c x +1}}{\sqrt {c x +1}}\right )^{2}}{\frac {-c x +1}{c x +1}+1}\right )}{c}-\frac {b \,\mathrm {arccot}\left (\frac {\sqrt {-c x +1}}{\sqrt {c x +1}}\right ) \ln \left (\frac {\left (i+\frac {\sqrt {-c x +1}}{\sqrt {c x +1}}\right )^{2}}{\frac {-c x +1}{c x +1}+1}+1\right )}{c}+\frac {i b \dilog \left (\frac {\left (i+\frac {\sqrt {-c x +1}}{\sqrt {c x +1}}\right )^{2}}{\frac {-c x +1}{c x +1}+1}+1\right )}{2 c}-\frac {i b \dilog \left (1-\frac {\left (i+\frac {\sqrt {-c x +1}}{\sqrt {c x +1}}\right )^{2}}{\frac {-c x +1}{c x +1}+1}\right )}{2 c}\) \(259\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*a/c*ln(c*x-1)+1/2*a/c*ln(c*x+1)+b/c*arccot((-c*x+1)^(1/2)/(c*x+1)^(1/2))*ln(1-(I+(-c*x+1)^(1/2)/(c*x+1)^(
1/2))^2/((-c*x+1)/(c*x+1)+1))-b/c*arccot((-c*x+1)^(1/2)/(c*x+1)^(1/2))*ln((I+(-c*x+1)^(1/2)/(c*x+1)^(1/2))^2/(
(-c*x+1)/(c*x+1)+1)+1)+1/2*I*b/c*dilog((I+(-c*x+1)^(1/2)/(c*x+1)^(1/2))^2/((-c*x+1)/(c*x+1)+1)+1)-1/2*I*b/c*di
log(1-(I+(-c*x+1)^(1/2)/(c*x+1)^(1/2))^2/((-c*x+1)/(c*x+1)+1))

________________________________________________________________________________________

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+b*arccot((-c*x+1)^(1/2)/(c*x+1)^(1/2)))/(-c^2*x^2+1),x, algorithm="maxima")

[Out]

1/2*a*(log(c*x + 1)/c - log(c*x - 1)/c) + 1/2*((log(c*x + 1) - log(-c*x + 1))*arctan2(sqrt(c*x + 1), sqrt(-c*x
 + 1)) + 2*c*integrate(1/2*(e^(1/2*log(c*x + 1) + 1/2*log(-c*x + 1))*log(c*x + 1) - e^(1/2*log(c*x + 1) + 1/2*
log(-c*x + 1))*log(-c*x + 1))/((c^2*x^2 - 1)*(c*x + 1) - (c^2*x^2 - 1)*(c*x - 1)), x))*b/c

________________________________________________________________________________________

Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

integral(-(b*arccot(sqrt(-c*x + 1)/sqrt(c*x + 1)) + a)/(c^2*x^2 - 1), x)

________________________________________________________________________________________

Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int -\frac {a+b\,\mathrm {acot}\left (\frac {\sqrt {1-c\,x}}{\sqrt {c\,x+1}}\right )}{c^2\,x^2-1} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________