Optimal. Leaf size=39 \[ \frac{3 x}{4}-\frac{e^{-2 x}}{8}+\frac{e^{-x}}{4}+\frac{e^x}{4}-\log \left (e^x+1\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0488001, antiderivative size = 39, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 12, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {2282, 12, 894} \[ \frac{3 x}{4}-\frac{e^{-2 x}}{8}+\frac{e^{-x}}{4}+\frac{e^x}{4}-\log \left (e^x+1\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2282
Rule 12
Rule 894
Rubi steps
\begin{align*} \int \frac{\cosh ^2(x)}{1+e^x} \, dx &=\operatorname{Subst}\left (\int \frac{\left (1+x^2\right )^2}{4 x^3 (1+x)} \, dx,x,e^x\right )\\ &=\frac{1}{4} \operatorname{Subst}\left (\int \frac{\left (1+x^2\right )^2}{x^3 (1+x)} \, dx,x,e^x\right )\\ &=\frac{1}{4} \operatorname{Subst}\left (\int \left (1+\frac{1}{x^3}-\frac{1}{x^2}+\frac{3}{x}-\frac{4}{1+x}\right ) \, dx,x,e^x\right )\\ &=-\frac{1}{8} e^{-2 x}+\frac{e^{-x}}{4}+\frac{e^x}{4}+\frac{3 x}{4}-\log \left (1+e^x\right )\\ \end{align*}
Mathematica [A] time = 0.0322403, size = 33, normalized size = 0.85 \[ \frac{1}{4} \left (3 x-\frac{e^{-2 x}}{2}+e^{-x}+e^x-4 \log \left (e^x+1\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.011, size = 48, normalized size = 1.2 \begin{align*} -{\frac{1}{2} \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-2}}+ \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) ^{-1}+{\frac{3}{4}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) +1 \right ) }-{\frac{1}{2} \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) ^{-1}}+{\frac{1}{4}\ln \left ( \tanh \left ({\frac{x}{2}} \right ) -1 \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.03582, size = 36, normalized size = 0.92 \begin{align*} \frac{1}{8} \,{\left (2 \, e^{x} - 1\right )} e^{\left (-2 \, x\right )} + \frac{3}{4} \, x + \frac{1}{4} \, e^{x} - \log \left (e^{x} + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.09387, size = 346, normalized size = 8.87 \begin{align*} \frac{6 \, x \cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right )^{3} + 6 \,{\left (x + \cosh \left (x\right )\right )} \sinh \left (x\right )^{2} + 2 \, \sinh \left (x\right )^{3} - 8 \,{\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}\right )} \log \left (\cosh \left (x\right ) + \sinh \left (x\right ) + 1\right ) + 2 \,{\left (6 \, x \cosh \left (x\right ) + 3 \, \cosh \left (x\right )^{2} + 1\right )} \sinh \left (x\right ) + 2 \, \cosh \left (x\right ) - 1}{8 \,{\left (\cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) \sinh \left (x\right ) + \sinh \left (x\right )^{2}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\cosh ^{2}{\left (x \right )}}{e^{x} + 1}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.13807, size = 36, normalized size = 0.92 \begin{align*} \frac{1}{8} \,{\left (2 \, e^{x} - 1\right )} e^{\left (-2 \, x\right )} + \frac{3}{4} \, x + \frac{1}{4} \, e^{x} - \log \left (e^{x} + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]