Optimal. Leaf size=19 \[ \sqrt {2} \tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {2}}\right )-x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 19, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {3171, 3181, 206} \[ \sqrt {2} \tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {2}}\right )-x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 3171
Rule 3181
Rubi steps
\begin {align*} \int \frac {1-\cosh ^2(x)}{1+\cosh ^2(x)} \, dx &=-x+2 \int \frac {1}{1+\cosh ^2(x)} \, dx\\ &=-x+2 \operatorname {Subst}\left (\int \frac {1}{1-2 x^2} \, dx,x,\coth (x)\right )\\ &=-x+\sqrt {2} \tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {2}}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.03, size = 24, normalized size = 1.26 \[ -2 \left (\frac {x}{2}-\frac {\tanh ^{-1}\left (\frac {\tanh (x)}{\sqrt {2}}\right )}{\sqrt {2}}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.44, size = 70, normalized size = 3.68 \[ \frac {1}{2} \, \sqrt {2} \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 ) - x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 0.14, size = 38, normalized size = 2.00 \[ \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 \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.12, size = 102, normalized size = 5.37 \[ \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )+\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 )}{4}-\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 )}{4}-\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.57, size = 102, normalized size = 5.37 \[ \frac {3}{16} \, \sqrt {2} \log \left (-\frac {2 \, \sqrt {2} - e^{\left (2 \, x\right )} - 3}{2 \, \sqrt {2} + e^{\left (2 \, x\right )} + 3}\right ) - \frac {5}{16} \, \sqrt {2} \log \left (-\frac {2 \, \sqrt {2} - e^{\left (-2 \, x\right )} - 3}{2 \, \sqrt {2} + e^{\left (-2 \, x\right )} + 3}\right ) - 2 \, x + \frac {1}{4} \, \log \left (e^{\left (4 \, x\right )} + 6 \, e^{\left (2 \, x\right )} + 1\right ) - \frac {1}{4} \, \log \left (6 \, e^{\left (-2 \, x\right )} + e^{\left (-4 \, x\right )} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.11, size = 56, normalized size = 2.95 \[ \frac {\sqrt {2}\,\ln \left (-8\,{\mathrm {e}}^{2\,x}-\frac {\sqrt {2}\,\left (12\,{\mathrm {e}}^{2\,x}+4\right )}{2}\right )}{2}-x-\frac {\sqrt {2}\,\ln \left (\frac {\sqrt {2}\,\left (12\,{\mathrm {e}}^{2\,x}+4\right )}{2}-8\,{\mathrm {e}}^{2\,x}\right )}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [B] time = 3.02, size = 61, normalized size = 3.21 \[ - x - \frac {\sqrt {2} \log {\left (4 \tanh ^{2}{\left (\frac {x}{2} \right )} - 4 \sqrt {2} \tanh {\left (\frac {x}{2} \right )} + 4 \right )}}{2} + \frac {\sqrt {2} \log {\left (4 \tanh ^{2}{\left (\frac {x}{2} \right )} + 4 \sqrt {2} \tanh {\left (\frac {x}{2} \right )} + 4 \right )}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________