3.34 \(\int \frac{a+b \tan ^{-1}(\frac{\sqrt{1-c x}}{\sqrt{1+c x}})}{1-c^2 x^2} \, dx\)

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

[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

________________________________________________________________________________________

Rubi [A]  time = 0.0666915, antiderivative size = 98, normalized size of antiderivative = 1., 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 = {206, 6681, 4848, 2391} \[ -\frac{i b \text{PolyLog}\left (2,-\frac{i \sqrt{1-c x}}{\sqrt{c x+1}}\right )}{2 c}+\frac{i b \text{PolyLog}\left (2,\frac{i \sqrt{1-c x}}{\sqrt{c x+1}}\right )}{2 c}-\frac{a \log \left (\frac{\sqrt{1-c x}}{\sqrt{c x+1}}\right )}{c} \]

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTan[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 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 6681

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]

Rule 4848

Int[((a_.) + ArcTan[(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 2391

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]

Rubi steps

\begin{align*} \int \frac{a+b \tan ^{-1}\left (\frac{\sqrt{1-c x}}{\sqrt{1+c x}}\right )}{1-c^2 x^2} \, dx &=-\frac{\operatorname{Subst}\left (\int \frac{a+b \tan ^{-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) \operatorname{Subst}\left (\int \frac{\log (1-i x)}{x} \, dx,x,\frac{\sqrt{1-c x}}{\sqrt{1+c x}}\right )}{2 c}+\frac{(i b) \operatorname{Subst}\left (\int \frac{\log (1+i x)}{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.0277243, size = 93, normalized size = 0.95 \[ -\frac{\frac{1}{2} i b \text{PolyLog}\left (2,-\frac{i \sqrt{1-c x}}{\sqrt{c x+1}}\right )-\frac{1}{2} i b \text{PolyLog}\left (2,\frac{i \sqrt{1-c x}}{\sqrt{c x+1}}\right )+a \log \left (\frac{\sqrt{1-c x}}{\sqrt{c x+1}}\right )}{c} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*ArcTan[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]] + (I/2)*b*PolyLog[2, ((-I)*Sqrt[1 - c*x])/Sqrt[1 + c*x]] - (I/2)*b*PolyL
og[2, (I*Sqrt[1 - c*x])/Sqrt[1 + c*x]])/c)

________________________________________________________________________________________

Maple [B]  time = 0.717, size = 371, normalized size = 3.8 \begin{align*}{\frac{a\ln \left ( cx+1 \right ) }{2\,c}}-{\frac{a\ln \left ( cx-1 \right ) }{2\,c}}-{\frac{b}{c}\arctan \left ({\sqrt{-cx+1}{\frac{1}{\sqrt{cx+1}}}} \right ) \ln \left ( 1+{ \left ( 1+{i\sqrt{-cx+1}{\frac{1}{\sqrt{cx+1}}}} \right ){\frac{1}{\sqrt{{\frac{-cx+1}{cx+1}}+1}}}} \right ) }+{\frac{ib}{c}{\it polylog} \left ( 2,-{ \left ( 1+{i\sqrt{-cx+1}{\frac{1}{\sqrt{cx+1}}}} \right ){\frac{1}{\sqrt{{\frac{-cx+1}{cx+1}}+1}}}} \right ) }-{\frac{b}{c}\arctan \left ({\sqrt{-cx+1}{\frac{1}{\sqrt{cx+1}}}} \right ) \ln \left ( 1-{ \left ( 1+{i\sqrt{-cx+1}{\frac{1}{\sqrt{cx+1}}}} \right ){\frac{1}{\sqrt{{\frac{-cx+1}{cx+1}}+1}}}} \right ) }+{\frac{ib}{c}{\it polylog} \left ( 2,{ \left ( 1+{i\sqrt{-cx+1}{\frac{1}{\sqrt{cx+1}}}} \right ){\frac{1}{\sqrt{{\frac{-cx+1}{cx+1}}+1}}}} \right ) }+{\frac{b}{c}\arctan \left ({\sqrt{-cx+1}{\frac{1}{\sqrt{cx+1}}}} \right ) \ln \left ({ \left ( 1+{i\sqrt{-cx+1}{\frac{1}{\sqrt{cx+1}}}} \right ) ^{2} \left ({\frac{-cx+1}{cx+1}}+1 \right ) ^{-1}}+1 \right ) }-{\frac{{\frac{i}{2}}b}{c}{\it polylog} \left ( 2,-{ \left ( 1+{i\sqrt{-cx+1}{\frac{1}{\sqrt{cx+1}}}} \right ) ^{2} \left ({\frac{-cx+1}{cx+1}}+1 \right ) ^{-1}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*a/c*ln(c*x+1)-1/2*a/c*ln(c*x-1)-b/c*arctan((-c*x+1)^(1/2)/(c*x+1)^(1/2))*ln(1+(1+I*(-c*x+1)^(1/2)/(c*x+1)^
(1/2))/((-c*x+1)/(c*x+1)+1)^(1/2))+I*b/c*polylog(2,-(1+I*(-c*x+1)^(1/2)/(c*x+1)^(1/2))/((-c*x+1)/(c*x+1)+1)^(1
/2))-b/c*arctan((-c*x+1)^(1/2)/(c*x+1)^(1/2))*ln(1-(1+I*(-c*x+1)^(1/2)/(c*x+1)^(1/2))/((-c*x+1)/(c*x+1)+1)^(1/
2))+I*b/c*polylog(2,(1+I*(-c*x+1)^(1/2)/(c*x+1)^(1/2))/((-c*x+1)/(c*x+1)+1)^(1/2))+b/c*arctan((-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)+1)-1/2*I*b/c*polylog(2,-(1+I*(-c*x+
1)^(1/2)/(c*x+1)^(1/2))^2/((-c*x+1)/(c*x+1)+1))

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{1}{2} \, a{\left (\frac{\log \left (c x + 1\right )}{c} - \frac{\log \left (c x - 1\right )}{c}\right )} + \frac{{\left ({\left (\log \left (c x + 1\right ) - \log \left (-c x + 1\right )\right )} \arctan \left (\sqrt{-c x + 1}, \sqrt{c x + 1}\right ) - c \int \frac{e^{\left (\frac{1}{2} \, \log \left (c x + 1\right ) + \frac{1}{2} \, \log \left (-c x + 1\right )\right )} \log \left (c x + 1\right ) - e^{\left (\frac{1}{2} \, \log \left (c x + 1\right ) + \frac{1}{2} \, \log \left (-c x + 1\right )\right )} \log \left (-c x + 1\right )}{{\left (c^{2} x^{2} - 1\right )}{\left (c x + 1\right )} -{\left (c^{2} x^{2} - 1\right )}{\left (c x - 1\right )}}\,{d x}\right )} b}{2 \, c} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan((-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., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (-\frac{b \arctan \left (\frac{\sqrt{-c x + 1}}{\sqrt{c x + 1}}\right ) + a}{c^{2} x^{2} - 1}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int -\frac{b \arctan \left (\frac{\sqrt{-c x + 1}}{\sqrt{c x + 1}}\right ) + a}{c^{2} x^{2} - 1}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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