Optimal. Leaf size=32 \[ x-\frac {\tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {2}}\right )}{\sqrt {2}}-\frac {\tanh (x)}{2-\tanh ^2(x)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 4, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.364, Rules used = {470, 12, 391, 206} \[ x-\frac {\tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {2}}\right )}{\sqrt {2}}-\frac {\tanh (x)}{2-\tanh ^2(x)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 206
Rule 391
Rule 470
Rubi steps
\begin {align*} \int \frac {1}{\left (\coth ^2(x)+\text {csch}^2(x)\right )^2} \, dx &=\operatorname {Subst}\left (\int \frac {x^4}{\left (1-x^2\right ) \left (2-x^2\right )^2} \, dx,x,\tanh (x)\right )\\ &=-\frac {\tanh (x)}{2-\tanh ^2(x)}+\frac {1}{2} \operatorname {Subst}\left (\int \frac {2}{\left (1-x^2\right ) \left (2-x^2\right )} \, dx,x,\tanh (x)\right )\\ &=-\frac {\tanh (x)}{2-\tanh ^2(x)}+\operatorname {Subst}\left (\int \frac {1}{\left (1-x^2\right ) \left (2-x^2\right )} \, dx,x,\tanh (x)\right )\\ &=-\frac {\tanh (x)}{2-\tanh ^2(x)}+\operatorname {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\tanh (x)\right )-\operatorname {Subst}\left (\int \frac {1}{2-x^2} \, dx,x,\tanh (x)\right )\\ &=x-\frac {\tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {2}}\right )}{\sqrt {2}}-\frac {\tanh (x)}{2-\tanh ^2(x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.10, size = 64, normalized size = 2.00 \[ \frac {(\cosh (2 x)+3) \text {csch}^4(x) \left (6 x-2 \sinh (2 x)+2 x \cosh (2 x)-\sqrt {2} (\cosh (2 x)+3) \tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {2}}\right )\right )}{8 \left (\coth ^2(x)+\text {csch}^2(x)\right )^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.43, size = 262, normalized size = 8.19 \[ \frac {4 \, x \cosh \relax (x)^{4} + 16 \, x \cosh \relax (x) \sinh \relax (x)^{3} + 4 \, x \sinh \relax (x)^{4} + 24 \, {\left (x + 1\right )} \cosh \relax (x)^{2} + 24 \, {\left (x \cosh \relax (x)^{2} + x + 1\right )} \sinh \relax (x)^{2} + {\left (\sqrt {2} \cosh \relax (x)^{4} + 4 \, \sqrt {2} \cosh \relax (x) \sinh \relax (x)^{3} + \sqrt {2} \sinh \relax (x)^{4} + 6 \, {\left (\sqrt {2} \cosh \relax (x)^{2} + \sqrt {2}\right )} \sinh \relax (x)^{2} + 6 \, \sqrt {2} \cosh \relax (x)^{2} + 4 \, {\left (\sqrt {2} \cosh \relax (x)^{3} + 3 \, \sqrt {2} \cosh \relax (x)\right )} \sinh \relax (x) + \sqrt {2}\right )} \log \left (\frac {3 \, {\left (2 \, \sqrt {2} + 3\right )} \cosh \relax (x)^{2} - 4 \, {\left (3 \, \sqrt {2} + 4\right )} \cosh \relax (x) \sinh \relax (x) + 3 \, {\left (2 \, \sqrt {2} + 3\right )} \sinh \relax (x)^{2} + 2 \, \sqrt {2} + 3}{\cosh \relax (x)^{2} + \sinh \relax (x)^{2} + 3}\right ) + 16 \, {\left (x \cosh \relax (x)^{3} + 3 \, {\left (x + 1\right )} \cosh \relax (x)\right )} \sinh \relax (x) + 4 \, x + 8}{4 \, {\left (\cosh \relax (x)^{4} + 4 \, \cosh \relax (x) \sinh \relax (x)^{3} + \sinh \relax (x)^{4} + 6 \, {\left (\cosh \relax (x)^{2} + 1\right )} \sinh \relax (x)^{2} + 6 \, \cosh \relax (x)^{2} + 4 \, {\left (\cosh \relax (x)^{3} + 3 \, \cosh \relax (x)\right )} \sinh \relax (x) + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.12, size = 60, normalized size = 1.88 \[ -\frac {1}{4} \, \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 + \frac {2 \, {\left (3 \, e^{\left (2 \, x\right )} + 1\right )}}{e^{\left (4 \, x\right )} + 6 \, e^{\left (2 \, x\right )} + 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.23, size = 129, normalized size = 4.03 \[ -\ln \left (\tanh \left (\frac {x}{2}\right )-1\right )+\frac {-\left (\tanh ^{3}\left (\frac {x}{2}\right )\right )-\tanh \left (\frac {x}{2}\right )}{\tanh ^{4}\left (\frac {x}{2}\right )+1}-\frac {\sqrt {2}\, \ln \left (\frac {\tanh ^{2}\left (\frac {x}{2}\right )+\sqrt {2}\, \tanh \left (\frac {x}{2}\right )+1}{\tanh ^{2}\left (\frac {x}{2}\right )-\sqrt {2}\, \tanh \left (\frac {x}{2}\right )+1}\right )}{8}+\frac {\sqrt {2}\, \ln \left (\frac {\tanh ^{2}\left (\frac {x}{2}\right )-\sqrt {2}\, \tanh \left (\frac {x}{2}\right )+1}{\tanh ^{2}\left (\frac {x}{2}\right )+\sqrt {2}\, \tanh \left (\frac {x}{2}\right )+1}\right )}{8}+\ln \left (\tanh \left (\frac {x}{2}\right )+1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.43, size = 60, normalized size = 1.88 \[ \frac {1}{4} \, \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 - \frac {2 \, {\left (3 \, e^{\left (-2 \, x\right )} + 1\right )}}{6 \, e^{\left (-2 \, x\right )} + e^{\left (-4 \, x\right )} + 1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.06, size = 77, normalized size = 2.41 \[ x+\frac {\sqrt {2}\,\ln \left (4\,{\mathrm {e}}^{2\,x}-\frac {\sqrt {2}\,\left (12\,{\mathrm {e}}^{2\,x}+4\right )}{4}\right )}{4}-\frac {\sqrt {2}\,\ln \left (4\,{\mathrm {e}}^{2\,x}+\frac {\sqrt {2}\,\left (12\,{\mathrm {e}}^{2\,x}+4\right )}{4}\right )}{4}+\frac {6\,{\mathrm {e}}^{2\,x}+2}{6\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\left (\coth ^{2}{\relax (x )} + \operatorname {csch}^{2}{\relax (x )}\right )^{2}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________