Optimal. Leaf size=26 \[ \log (\tanh (x)+1)-\frac {2 \tan ^{-1}\left (\frac {1-2 \tanh (x)}{\sqrt {3}}\right )}{\sqrt {3}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.09, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.263, Rules used = {4342, 1863, 31, 618, 204} \[ \log (\tanh (x)+1)-\frac {2 \tan ^{-1}\left (\frac {1-2 \tanh (x)}{\sqrt {3}}\right )}{\sqrt {3}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 204
Rule 618
Rule 1863
Rule 4342
Rubi steps
\begin {align*} \int \frac {\text {sech}^2(x) \left (2+\tanh ^2(x)\right )}{1+\tanh ^3(x)} \, dx &=\operatorname {Subst}\left (\int \frac {2+x^2}{1+x^3} \, dx,x,\tanh (x)\right )\\ &=\operatorname {Subst}\left (\int \frac {1}{1+x} \, dx,x,\tanh (x)\right )+\operatorname {Subst}\left (\int \frac {1}{1-x+x^2} \, dx,x,\tanh (x)\right )\\ &=\log (1+\tanh (x))-2 \operatorname {Subst}\left (\int \frac {1}{-3-x^2} \, dx,x,-1+2 \tanh (x)\right )\\ &=-\frac {2 \tan ^{-1}\left (\frac {1-2 \tanh (x)}{\sqrt {3}}\right )}{\sqrt {3}}+\log (1+\tanh (x))\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.22, size = 27, normalized size = 1.04 \[ x+\frac {2 \tan ^{-1}\left (\frac {2 \tanh (x)-1}{\sqrt {3}}\right )}{\sqrt {3}}-\log (\cosh (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.44, size = 50, normalized size = 1.92 \[ -\frac {2}{3} \, \sqrt {3} \arctan \left (-\frac {\sqrt {3} \cosh \relax (x) + \sqrt {3} \sinh \relax (x)}{3 \, {\left (\cosh \relax (x) - \sinh \relax (x)\right )}}\right ) + 2 \, x - \log \left (\frac {2 \, \cosh \relax (x)}{\cosh \relax (x) - \sinh \relax (x)}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 28, normalized size = 1.08 \[ \frac {2}{3} \, \sqrt {3} \arctan \left (\frac {1}{3} \, \sqrt {3} e^{\left (2 \, x\right )}\right ) + 2 \, x - \log \left (e^{\left (2 \, x\right )} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [C] time = 0.26, size = 78, normalized size = 3.00 \[ \frac {i \sqrt {3}\, \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+\left (-i \sqrt {3}-1\right ) \tanh \left (\frac {x}{2}\right )+1\right )}{3}-\frac {i \sqrt {3}\, \ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+\left (i \sqrt {3}-1\right ) \tanh \left (\frac {x}{2}\right )+1\right )}{3}+2 \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )-\ln \left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.41, size = 122, normalized size = 4.69 \[ \frac {2}{3} \, \sqrt {3} \arctan \left (\frac {1}{6} \cdot 3^{\frac {3}{4}} \sqrt {2} {\left (2 \, \sqrt {3} e^{\left (-x\right )} + 3^{\frac {1}{4}} \sqrt {2}\right )}\right ) - \frac {2}{3} \, \sqrt {3} \arctan \left (\frac {1}{6} \cdot 3^{\frac {3}{4}} \sqrt {2} {\left (2 \, \sqrt {3} e^{\left (-x\right )} - 3^{\frac {1}{4}} \sqrt {2}\right )}\right ) + \frac {1}{3} \, \log \left (\tanh \relax (x)^{3} + 1\right ) - \frac {1}{3} \, \log \left (3^{\frac {1}{4}} \sqrt {2} e^{\left (-x\right )} + \sqrt {3} e^{\left (-2 \, x\right )} + 1\right ) - \frac {1}{3} \, \log \left (-3^{\frac {1}{4}} \sqrt {2} e^{\left (-x\right )} + \sqrt {3} e^{\left (-2 \, x\right )} + 1\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.50, size = 47, normalized size = 1.81 \[ 2\,x-\ln \left (768\,{\mathrm {e}}^{2\,x}+768\right )-\frac {2\,\sqrt {3}\,\mathrm {atan}\left (\frac {\frac {640\,\sqrt {3}}{3}-\frac {128\,\sqrt {3}\,{\mathrm {e}}^{2\,x}}{3}}{\frac {640\,{\mathrm {e}}^{2\,x}}{3}+128}\right )}{3} \]
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 {\left (\tanh ^{2}{\relax (x )} + 2\right ) \operatorname {sech}^{2}{\relax (x )}}{\left (\tanh {\relax (x )} + 1\right ) \left (\tanh ^{2}{\relax (x )} - \tanh {\relax (x )} + 1\right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________