Optimal. Leaf size=18 \[ x-\sqrt {2} \tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {2}}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 18, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {1144, 213}
\begin {gather*} x-\sqrt {2} \tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {2}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 1144
Rubi steps
\begin {align*} \int \frac {1}{\coth ^2(x)+\text {csch}^2(x)} \, dx &=\text {Subst}\left (\int \frac {x^2}{2-3 x^2+x^4} \, dx,x,\tanh (x)\right )\\ &=2 \text {Subst}\left (\int \frac {1}{-2+x^2} \, dx,x,\tanh (x)\right )-\text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\tanh (x)\right )\\ &=x-\sqrt {2} \tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {2}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 18, normalized size = 1.00 \begin {gather*} x-\sqrt {2} \tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {2}}\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(155\) vs.
\(2(15)=30\).
time = 1.16, size = 156, normalized size = 8.67
method | result | size |
risch | \(x +\frac {\sqrt {2}\, \ln \left ({\mathrm e}^{2 x}+3+2 \sqrt {2}\right )}{2}-\frac {\sqrt {2}\, \ln \left ({\mathrm e}^{2 x}+3-2 \sqrt {2}\right )}{2}\) | \(37\) |
default | \(\ln \left (\tanh \left (\frac {x}{2}\right )+1\right )-\frac {\sqrt {2}\, \left (\ln \left (\frac {\tanh ^{2}\left (\frac {x}{2}\right )+\tanh \left (\frac {x}{2}\right ) \sqrt {2}+1}{\tanh ^{2}\left (\frac {x}{2}\right )-\tanh \left (\frac {x}{2}\right ) \sqrt {2}+1}\right )+2 \arctan \left (\tanh \left (\frac {x}{2}\right ) \sqrt {2}+1\right )+2 \arctan \left (\tanh \left (\frac {x}{2}\right ) \sqrt {2}-1\right )\right )}{4}+\frac {\sqrt {2}\, \left (\ln \left (\frac {\tanh ^{2}\left (\frac {x}{2}\right )-\tanh \left (\frac {x}{2}\right ) \sqrt {2}+1}{\tanh ^{2}\left (\frac {x}{2}\right )+\tanh \left (\frac {x}{2}\right ) \sqrt {2}+1}\right )+2 \arctan \left (\tanh \left (\frac {x}{2}\right ) \sqrt {2}+1\right )+2 \arctan \left (\tanh \left (\frac {x}{2}\right ) \sqrt {2}-1\right )\right )}{4}-\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )\) | \(156\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 36 vs.
\(2 (15) = 30\).
time = 0.49, size = 36, normalized size = 2.00 \begin {gather*} \frac {1}{2} \, \sqrt {2} \log \left (-\frac {2 \, \sqrt {2} - e^{\left (-2 \, x\right )} - 3}{2 \, \sqrt {2} + e^{\left (-2 \, x\right )} + 3}\right ) + x \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. 67 vs.
\(2 (15) = 30\).
time = 0.39, size = 67, normalized size = 3.72 \begin {gather*} \frac {1}{2} \, \sqrt {2} \log \left (\frac {3 \, {\left (2 \, \sqrt {2} + 3\right )} \cosh \left (x\right )^{2} - 4 \, {\left (3 \, \sqrt {2} + 4\right )} \cosh \left (x\right ) \sinh \left (x\right ) + 3 \, {\left (2 \, \sqrt {2} + 3\right )} \sinh \left (x\right )^{2} + 2 \, \sqrt {2} + 3}{\cosh \left (x\right )^{2} + \sinh \left (x\right )^{2} + 3}\right ) + x \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*} \int \frac {1}{\coth ^{2}{\left (x \right )} + \operatorname {csch}^{2}{\left (x \right )}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 36 vs.
\(2 (15) = 30\).
time = 0.39, size = 36, normalized size = 2.00 \begin {gather*} -\frac {1}{2} \, \sqrt {2} \log \left (-\frac {2 \, \sqrt {2} - e^{\left (2 \, x\right )} - 3}{2 \, \sqrt {2} + e^{\left (2 \, x\right )} + 3}\right ) + x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.15, size = 54, normalized size = 3.00 \begin {gather*} x+\frac {\sqrt {2}\,\ln \left (8\,{\mathrm {e}}^{2\,x}-\frac {\sqrt {2}\,\left (12\,{\mathrm {e}}^{2\,x}+4\right )}{2}\right )}{2}-\frac {\sqrt {2}\,\ln \left (8\,{\mathrm {e}}^{2\,x}+\frac {\sqrt {2}\,\left (12\,{\mathrm {e}}^{2\,x}+4\right )}{2}\right )}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________