Optimal. Leaf size=283 \[ \frac {i b \text {Li}_2\left (1-\frac {2}{\frac {i \sqrt {1-c x}}{\sqrt {c x+1}}+1}\right ) \left (a+b \tan ^{-1}\left (\frac {\sqrt {1-c x}}{\sqrt {c x+1}}\right )\right )}{c}-\frac {i b \text {Li}_2\left (\frac {2}{\frac {i \sqrt {1-c x}}{\sqrt {c x+1}}+1}-1\right ) \left (a+b \tan ^{-1}\left (\frac {\sqrt {1-c x}}{\sqrt {c x+1}}\right )\right )}{c}-\frac {2 \tanh ^{-1}\left (1-\frac {2}{1+\frac {i \sqrt {1-c x}}{\sqrt {c x+1}}}\right ) \left (a+b \tan ^{-1}\left (\frac {\sqrt {1-c x}}{\sqrt {c x+1}}\right )\right )^2}{c}+\frac {b^2 \text {Li}_3\left (1-\frac {2}{\frac {i \sqrt {1-c x}}{\sqrt {c x+1}}+1}\right )}{2 c}-\frac {b^2 \text {Li}_3\left (\frac {2}{\frac {i \sqrt {1-c x}}{\sqrt {c x+1}}+1}-1\right )}{2 c} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.30, antiderivative size = 283, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {6681, 4850, 4988, 4884, 4994, 6610} \[ \frac {i b \text {PolyLog}\left (2,1-\frac {2}{1+\frac {i \sqrt {1-c x}}{\sqrt {c x+1}}}\right ) \left (a+b \tan ^{-1}\left (\frac {\sqrt {1-c x}}{\sqrt {c x+1}}\right )\right )}{c}-\frac {i b \text {PolyLog}\left (2,-1+\frac {2}{1+\frac {i \sqrt {1-c x}}{\sqrt {c x+1}}}\right ) \left (a+b \tan ^{-1}\left (\frac {\sqrt {1-c x}}{\sqrt {c x+1}}\right )\right )}{c}+\frac {b^2 \text {PolyLog}\left (3,1-\frac {2}{1+\frac {i \sqrt {1-c x}}{\sqrt {c x+1}}}\right )}{2 c}-\frac {b^2 \text {PolyLog}\left (3,-1+\frac {2}{1+\frac {i \sqrt {1-c x}}{\sqrt {c x+1}}}\right )}{2 c}-\frac {2 \tanh ^{-1}\left (1-\frac {2}{1+\frac {i \sqrt {1-c x}}{\sqrt {c x+1}}}\right ) \left (a+b \tan ^{-1}\left (\frac {\sqrt {1-c x}}{\sqrt {c x+1}}\right )\right )^2}{c} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4850
Rule 4884
Rule 4988
Rule 4994
Rule 6610
Rule 6681
Rubi steps
\begin {align*} \int \frac {\left (a+b \tan ^{-1}\left (\frac {\sqrt {1-c x}}{\sqrt {1+c x}}\right )\right )^2}{1-c^2 x^2} \, dx &=-\frac {\operatorname {Subst}\left (\int \frac {\left (a+b \tan ^{-1}(x)\right )^2}{x} \, dx,x,\frac {\sqrt {1-c x}}{\sqrt {1+c x}}\right )}{c}\\ &=-\frac {2 \left (a+b \tan ^{-1}\left (\frac {\sqrt {1-c x}}{\sqrt {1+c x}}\right )\right )^2 \tanh ^{-1}\left (1-\frac {2}{1+\frac {i \sqrt {1-c x}}{\sqrt {1+c x}}}\right )}{c}+\frac {(4 b) \operatorname {Subst}\left (\int \frac {\left (a+b \tan ^{-1}(x)\right ) \tanh ^{-1}\left (1-\frac {2}{1+i x}\right )}{1+x^2} \, dx,x,\frac {\sqrt {1-c x}}{\sqrt {1+c x}}\right )}{c}\\ &=-\frac {2 \left (a+b \tan ^{-1}\left (\frac {\sqrt {1-c x}}{\sqrt {1+c x}}\right )\right )^2 \tanh ^{-1}\left (1-\frac {2}{1+\frac {i \sqrt {1-c x}}{\sqrt {1+c x}}}\right )}{c}+\frac {(2 b) \operatorname {Subst}\left (\int \frac {\left (a+b \tan ^{-1}(x)\right ) \log \left (2-\frac {2}{1+i x}\right )}{1+x^2} \, dx,x,\frac {\sqrt {1-c x}}{\sqrt {1+c x}}\right )}{c}-\frac {(2 b) \operatorname {Subst}\left (\int \frac {\left (a+b \tan ^{-1}(x)\right ) \log \left (\frac {2}{1+i x}\right )}{1+x^2} \, dx,x,\frac {\sqrt {1-c x}}{\sqrt {1+c x}}\right )}{c}\\ &=-\frac {2 \left (a+b \tan ^{-1}\left (\frac {\sqrt {1-c x}}{\sqrt {1+c x}}\right )\right )^2 \tanh ^{-1}\left (1-\frac {2}{1+\frac {i \sqrt {1-c x}}{\sqrt {1+c x}}}\right )}{c}+\frac {i b \left (a+b \tan ^{-1}\left (\frac {\sqrt {1-c x}}{\sqrt {1+c x}}\right )\right ) \text {Li}_2\left (1-\frac {2}{1+\frac {i \sqrt {1-c x}}{\sqrt {1+c x}}}\right )}{c}-\frac {i b \left (a+b \tan ^{-1}\left (\frac {\sqrt {1-c x}}{\sqrt {1+c x}}\right )\right ) \text {Li}_2\left (-1+\frac {2}{1+\frac {i \sqrt {1-c x}}{\sqrt {1+c x}}}\right )}{c}-\frac {\left (i b^2\right ) \operatorname {Subst}\left (\int \frac {\text {Li}_2\left (1-\frac {2}{1+i x}\right )}{1+x^2} \, dx,x,\frac {\sqrt {1-c x}}{\sqrt {1+c x}}\right )}{c}+\frac {\left (i b^2\right ) \operatorname {Subst}\left (\int \frac {\text {Li}_2\left (-1+\frac {2}{1+i x}\right )}{1+x^2} \, dx,x,\frac {\sqrt {1-c x}}{\sqrt {1+c x}}\right )}{c}\\ &=-\frac {2 \left (a+b \tan ^{-1}\left (\frac {\sqrt {1-c x}}{\sqrt {1+c x}}\right )\right )^2 \tanh ^{-1}\left (1-\frac {2}{1+\frac {i \sqrt {1-c x}}{\sqrt {1+c x}}}\right )}{c}+\frac {i b \left (a+b \tan ^{-1}\left (\frac {\sqrt {1-c x}}{\sqrt {1+c x}}\right )\right ) \text {Li}_2\left (1-\frac {2}{1+\frac {i \sqrt {1-c x}}{\sqrt {1+c x}}}\right )}{c}-\frac {i b \left (a+b \tan ^{-1}\left (\frac {\sqrt {1-c x}}{\sqrt {1+c x}}\right )\right ) \text {Li}_2\left (-1+\frac {2}{1+\frac {i \sqrt {1-c x}}{\sqrt {1+c x}}}\right )}{c}+\frac {b^2 \text {Li}_3\left (1-\frac {2}{1+\frac {i \sqrt {1-c x}}{\sqrt {1+c x}}}\right )}{2 c}-\frac {b^2 \text {Li}_3\left (-1+\frac {2}{1+\frac {i \sqrt {1-c x}}{\sqrt {1+c x}}}\right )}{2 c}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.13, size = 354, normalized size = 1.25 \[ -\frac {2 i b \text {Li}_2\left (-\frac {\sqrt {1-c x}+i \sqrt {c x+1}}{\sqrt {1-c x}-i \sqrt {c x+1}}\right ) \left (a+b \tan ^{-1}\left (\frac {\sqrt {1-c x}}{\sqrt {c x+1}}\right )\right )-2 i b \text {Li}_2\left (\frac {\sqrt {1-c x}+i \sqrt {c x+1}}{\sqrt {1-c x}-i \sqrt {c x+1}}\right ) \left (a+b \tan ^{-1}\left (\frac {\sqrt {1-c x}}{\sqrt {c x+1}}\right )\right )+4 \tanh ^{-1}\left (1-\frac {2 i}{-\frac {\sqrt {1-c x}}{\sqrt {c x+1}}+i}\right ) \left (a+b \tan ^{-1}\left (\frac {\sqrt {1-c x}}{\sqrt {c x+1}}\right )\right )^2+b^2 \text {Li}_3\left (-\frac {\sqrt {1-c x}+i \sqrt {c x+1}}{\sqrt {1-c x}-i \sqrt {c x+1}}\right )-b^2 \text {Li}_3\left (\frac {\sqrt {1-c x}+i \sqrt {c x+1}}{\sqrt {1-c x}-i \sqrt {c x+1}}\right )}{2 c} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [F] time = 0.46, size = 0, normalized size = 0.00 \[ {\rm integral}\left (-\frac {b^{2} \arctan \left (\frac {\sqrt {-c x + 1}}{\sqrt {c x + 1}}\right )^{2} + 2 \, a b \arctan \left (\frac {\sqrt {-c x + 1}}{\sqrt {c x + 1}}\right ) + a^{2}}{c^{2} x^{2} - 1}, x\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int -\frac {{\left (b \arctan \left (\frac {\sqrt {-c x + 1}}{\sqrt {c x + 1}}\right ) + a\right )}^{2}}{c^{2} x^{2} - 1}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 1.32, size = 837, normalized size = 2.96 \[ -\frac {a^{2} \ln \left (c x -1\right )}{2 c}+\frac {a^{2} \ln \left (c x +1\right )}{2 c}+\frac {b^{2} \arctan \left (\frac {\sqrt {-c x +1}}{\sqrt {c x +1}}\right )^{2} \ln \left (\frac {\left (1+\frac {i \sqrt {-c x +1}}{\sqrt {c x +1}}\right )^{2}}{\frac {-c x +1}{c x +1}+1}+1\right )}{c}-\frac {i b^{2} \arctan \left (\frac {\sqrt {-c x +1}}{\sqrt {c x +1}}\right ) \polylog \left (2, -\frac {\left (1+\frac {i \sqrt {-c x +1}}{\sqrt {c x +1}}\right )^{2}}{\frac {-c x +1}{c x +1}+1}\right )}{c}+\frac {b^{2} \polylog \left (3, -\frac {\left (1+\frac {i \sqrt {-c x +1}}{\sqrt {c x +1}}\right )^{2}}{\frac {-c x +1}{c x +1}+1}\right )}{2 c}-\frac {b^{2} \arctan \left (\frac {\sqrt {-c x +1}}{\sqrt {c x +1}}\right )^{2} \ln \left (1-\frac {1+\frac {i \sqrt {-c x +1}}{\sqrt {c x +1}}}{\sqrt {\frac {-c x +1}{c x +1}+1}}\right )}{c}+\frac {2 i b^{2} \arctan \left (\frac {\sqrt {-c x +1}}{\sqrt {c x +1}}\right ) \polylog \left (2, \frac {1+\frac {i \sqrt {-c x +1}}{\sqrt {c x +1}}}{\sqrt {\frac {-c x +1}{c x +1}+1}}\right )}{c}-\frac {2 b^{2} \polylog \left (3, \frac {1+\frac {i \sqrt {-c x +1}}{\sqrt {c x +1}}}{\sqrt {\frac {-c x +1}{c x +1}+1}}\right )}{c}-\frac {b^{2} \arctan \left (\frac {\sqrt {-c x +1}}{\sqrt {c x +1}}\right )^{2} \ln \left (1+\frac {1+\frac {i \sqrt {-c x +1}}{\sqrt {c x +1}}}{\sqrt {\frac {-c x +1}{c x +1}+1}}\right )}{c}+\frac {2 i b^{2} \arctan \left (\frac {\sqrt {-c x +1}}{\sqrt {c x +1}}\right ) \polylog \left (2, -\frac {1+\frac {i \sqrt {-c x +1}}{\sqrt {c x +1}}}{\sqrt {\frac {-c x +1}{c x +1}+1}}\right )}{c}-\frac {2 b^{2} \polylog \left (3, -\frac {1+\frac {i \sqrt {-c x +1}}{\sqrt {c x +1}}}{\sqrt {\frac {-c x +1}{c x +1}+1}}\right )}{c}-\frac {2 a b \arctan \left (\frac {\sqrt {-c x +1}}{\sqrt {c x +1}}\right ) \ln \left (1-\frac {\left (1+\frac {i \sqrt {-c x +1}}{\sqrt {c x +1}}\right )^{2}}{\frac {-c x +1}{c x +1}+1}\right )}{c}+\frac {2 a b \arctan \left (\frac {\sqrt {-c x +1}}{\sqrt {c x +1}}\right ) \ln \left (\frac {\left (1+\frac {i \sqrt {-c x +1}}{\sqrt {c x +1}}\right )^{2}}{\frac {-c x +1}{c x +1}+1}+1\right )}{c}-\frac {i a b \dilog \left (\frac {\left (1+\frac {i \sqrt {-c x +1}}{\sqrt {c x +1}}\right )^{2}}{\frac {-c x +1}{c x +1}+1}+1\right )}{c}+\frac {i a b \dilog \left (1-\frac {\left (1+\frac {i \sqrt {-c x +1}}{\sqrt {c x +1}}\right )^{2}}{\frac {-c x +1}{c x +1}+1}\right )}{c} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F] time = 0.00, size = 0, normalized size = 0.00 \[ \frac {1}{2} \, a^{2} {\left (\frac {\log \left (c x + 1\right )}{c} - \frac {\log \left (c x - 1\right )}{c}\right )} - \frac {b^{2} \log \relax (2)^{2} \log \left (c x + 1\right ) - b^{2} \log \relax (2)^{2} \log \left (-c x + 1\right ) - 4 \, {\left (b^{2} \log \left (c x + 1\right ) - b^{2} \log \left (-c x + 1\right )\right )} \arctan \left (\sqrt {-c x + 1}, \sqrt {c x + 1}\right )^{2} - {\left (12 \, b^{2} {\left (\frac {\log \left (c x + 1\right )}{c} - \frac {\log \left (c x - 1\right )}{c}\right )} \arctan \left (\frac {\sqrt {-c x + 1}}{\sqrt {c x + 1}}\right )^{2} + b^{2} {\left (\frac {\log \left (c x + 1\right )}{c} - \frac {\log \left (c x - 1\right )}{c}\right )} \log \relax (2)^{2} - 4 \, b^{2} \int \frac {\sqrt {c x + 1} \sqrt {-c x + 1} \arctan \left (\frac {\sqrt {-c x + 1}}{\sqrt {c x + 1}}\right ) \log \left (c x + 1\right )}{c^{2} x^{2} - 1}\,{d x} + 4 \, b^{2} \int \frac {\sqrt {c x + 1} \sqrt {-c x + 1} \arctan \left (\frac {\sqrt {-c x + 1}}{\sqrt {c x + 1}}\right ) \log \left (-c x + 1\right )}{c^{2} x^{2} - 1}\,{d x} + \frac {32 \, {\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 )} a b}{c}\right )} c}{32 \, c} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.00 \[ \int -\frac {{\left (a+b\,\mathrm {atan}\left (\frac {\sqrt {1-c\,x}}{\sqrt {c\,x+1}}\right )\right )}^2}{c^2\,x^2-1} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________