Optimal. Leaf size=108 \[ -\frac {1}{2 c x^2}-\frac {\sqrt {1-c x}}{2 c x^2 \sqrt {\frac {1}{1+c x}}}-\frac {1}{2} c \sqrt {\frac {1}{1+c x}} \sqrt {1+c x} \tanh ^{-1}\left (\sqrt {1-c x} \sqrt {1+c x}\right )+c \log (x)-\frac {1}{2} c \log \left (1-c^2 x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.12, antiderivative size = 108, normalized size of antiderivative = 1.00, number of steps
used = 9, number of rules used = 8, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {6476, 1972,
105, 12, 94, 214, 272, 46} \begin {gather*} -\frac {1}{2} c \log \left (1-c^2 x^2\right )-\frac {\sqrt {1-c x}}{2 c x^2 \sqrt {\frac {1}{c x+1}}}-\frac {1}{2 c x^2}+c \log (x)-\frac {1}{2} c \sqrt {\frac {1}{c x+1}} \sqrt {c x+1} \tanh ^{-1}\left (\sqrt {1-c x} \sqrt {c x+1}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 46
Rule 94
Rule 105
Rule 214
Rule 272
Rule 1972
Rule 6476
Rubi steps
\begin {align*} \int \frac {e^{\text {sech}^{-1}(c x)}}{x^2 \left (1-c^2 x^2\right )} \, dx &=\frac {\int \frac {\sqrt {\frac {1}{1+c x}}}{x^3 \sqrt {1-c x}} \, dx}{c}+\frac {\int \frac {1}{x^3 \left (1-c^2 x^2\right )} \, dx}{c}\\ &=\frac {\text {Subst}\left (\int \frac {1}{x^2 \left (1-c^2 x\right )} \, dx,x,x^2\right )}{2 c}+\frac {\left (\sqrt {\frac {1}{1+c x}} \sqrt {1+c x}\right ) \int \frac {1}{x^3 \sqrt {1-c x} \sqrt {1+c x}} \, dx}{c}\\ &=-\frac {\sqrt {1-c x}}{2 c x^2 \sqrt {\frac {1}{1+c x}}}+\frac {\text {Subst}\left (\int \left (\frac {1}{x^2}+\frac {c^2}{x}-\frac {c^4}{-1+c^2 x}\right ) \, dx,x,x^2\right )}{2 c}+\frac {\left (\sqrt {\frac {1}{1+c x}} \sqrt {1+c x}\right ) \int \frac {c^2}{x \sqrt {1-c x} \sqrt {1+c x}} \, dx}{2 c}\\ &=-\frac {1}{2 c x^2}-\frac {\sqrt {1-c x}}{2 c x^2 \sqrt {\frac {1}{1+c x}}}+c \log (x)-\frac {1}{2} c \log \left (1-c^2 x^2\right )+\frac {1}{2} \left (c \sqrt {\frac {1}{1+c x}} \sqrt {1+c x}\right ) \int \frac {1}{x \sqrt {1-c x} \sqrt {1+c x}} \, dx\\ &=-\frac {1}{2 c x^2}-\frac {\sqrt {1-c x}}{2 c x^2 \sqrt {\frac {1}{1+c x}}}+c \log (x)-\frac {1}{2} c \log \left (1-c^2 x^2\right )-\frac {1}{2} \left (c^2 \sqrt {\frac {1}{1+c x}} \sqrt {1+c x}\right ) \text {Subst}\left (\int \frac {1}{c-c x^2} \, dx,x,\sqrt {1-c x} \sqrt {1+c x}\right )\\ &=-\frac {1}{2 c x^2}-\frac {\sqrt {1-c x}}{2 c x^2 \sqrt {\frac {1}{1+c x}}}-\frac {1}{2} c \sqrt {\frac {1}{1+c x}} \sqrt {1+c x} \tanh ^{-1}\left (\sqrt {1-c x} \sqrt {1+c x}\right )+c \log (x)-\frac {1}{2} c \log \left (1-c^2 x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.11, size = 108, normalized size = 1.00 \begin {gather*} \frac {1}{2} \left (-\frac {1}{c x^2}-\frac {\sqrt {\frac {1-c x}{1+c x}} (1+c x)}{c x^2}+3 c \log (x)-c \log \left (1-c^2 x^2\right )-c \log \left (1+\sqrt {\frac {1-c x}{1+c x}}+c x \sqrt {\frac {1-c x}{1+c x}}\right )\right ) \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.29, size = 119, normalized size = 1.10
method | result | size |
default | \(-\frac {\sqrt {-\frac {c x -1}{c x}}\, \sqrt {\frac {c x +1}{c x}}\, \left (c^{2} x^{2} \arctanh \left (\frac {1}{\sqrt {-c^{2} x^{2}+1}}\right )+\sqrt {-c^{2} x^{2}+1}\right )}{2 x \sqrt {-c^{2} x^{2}+1}}+\frac {-\frac {c^{2} \ln \left (c x +1\right )}{2}-\frac {1}{2 x^{2}}+c^{2} \ln \left (x \right )-\frac {c^{2} \ln \left (c x -1\right )}{2}}{c}\) | \(119\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 156 vs.
\(2 (70) = 140\).
time = 0.57, size = 156, normalized size = 1.44 \begin {gather*} -\frac {2 \, c^{2} x^{2} \log \left (c^{2} x^{2} - 1\right ) + c^{2} x^{2} \log \left (c x \sqrt {\frac {c x + 1}{c x}} \sqrt {-\frac {c x - 1}{c x}} + 1\right ) - c^{2} x^{2} \log \left (c x \sqrt {\frac {c x + 1}{c x}} \sqrt {-\frac {c x - 1}{c x}} - 1\right ) - 4 \, c^{2} x^{2} \log \left (x\right ) + 2 \, c x \sqrt {\frac {c x + 1}{c x}} \sqrt {-\frac {c x - 1}{c x}} + 2}{4 \, c x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {\int \frac {c x \sqrt {-1 + \frac {1}{c x}} \sqrt {1 + \frac {1}{c x}}}{c^{2} x^{5} - x^{3}}\, dx + \int \frac {1}{c^{2} x^{5} - x^{3}}\, dx}{c} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[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]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 14.53, size = 331, normalized size = 3.06 \begin {gather*} c\,\ln \left (x\right )+\frac {\frac {2\,c\,\left (\sqrt {\frac {1}{c\,x}-1}-\mathrm {i}\right )}{\sqrt {\frac {1}{c\,x}+1}-1}+\frac {14\,c\,{\left (\sqrt {\frac {1}{c\,x}-1}-\mathrm {i}\right )}^3}{{\left (\sqrt {\frac {1}{c\,x}+1}-1\right )}^3}+\frac {14\,c\,{\left (\sqrt {\frac {1}{c\,x}-1}-\mathrm {i}\right )}^5}{{\left (\sqrt {\frac {1}{c\,x}+1}-1\right )}^5}+\frac {2\,c\,{\left (\sqrt {\frac {1}{c\,x}-1}-\mathrm {i}\right )}^7}{{\left (\sqrt {\frac {1}{c\,x}+1}-1\right )}^7}}{1+\frac {6\,{\left (\sqrt {\frac {1}{c\,x}-1}-\mathrm {i}\right )}^4}{{\left (\sqrt {\frac {1}{c\,x}+1}-1\right )}^4}-\frac {4\,{\left (\sqrt {\frac {1}{c\,x}-1}-\mathrm {i}\right )}^6}{{\left (\sqrt {\frac {1}{c\,x}+1}-1\right )}^6}+\frac {{\left (\sqrt {\frac {1}{c\,x}-1}-\mathrm {i}\right )}^8}{{\left (\sqrt {\frac {1}{c\,x}+1}-1\right )}^8}-\frac {4\,{\left (\sqrt {\frac {1}{c\,x}-1}-\mathrm {i}\right )}^2}{{\left (\sqrt {\frac {1}{c\,x}+1}-1\right )}^2}}-\frac {c\,\ln \left (c^2\,x^2-1\right )}{2}-2\,c\,\mathrm {atanh}\left (\frac {\sqrt {\frac {1}{c\,x}-1}-\mathrm {i}}{\sqrt {\frac {1}{c\,x}+1}-1}\right )-\frac {1}{2\,c\,x^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________