Optimal. Leaf size=32 \[ -2 e^x+e^{-x} \log \left (e^{2 x}+1\right )+e^x \log \left (e^{2 x}+1\right ) \]
________________________________________________________________________________________
Rubi [A] time = 0.05, antiderivative size = 32, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 6, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {2282, 2476, 2448, 321, 203, 2455} \[ -2 e^x+e^{-x} \log \left (e^{2 x}+1\right )+e^x \log \left (e^{2 x}+1\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 321
Rule 2282
Rule 2448
Rule 2455
Rule 2476
Rubi steps
\begin {align*} \int \left (-e^{-x}+e^x\right ) \log \left (1+e^{2 x}\right ) \, dx &=\operatorname {Subst}\left (\int \frac {\left (-1+x^2\right ) \log \left (1+x^2\right )}{x^2} \, dx,x,e^x\right )\\ &=\operatorname {Subst}\left (\int \left (\log \left (1+x^2\right )-\frac {\log \left (1+x^2\right )}{x^2}\right ) \, dx,x,e^x\right )\\ &=\operatorname {Subst}\left (\int \log \left (1+x^2\right ) \, dx,x,e^x\right )-\operatorname {Subst}\left (\int \frac {\log \left (1+x^2\right )}{x^2} \, dx,x,e^x\right )\\ &=e^{-x} \log \left (1+e^{2 x}\right )+e^x \log \left (1+e^{2 x}\right )-2 \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,e^x\right )-2 \operatorname {Subst}\left (\int \frac {x^2}{1+x^2} \, dx,x,e^x\right )\\ &=-2 e^x-2 \tan ^{-1}\left (e^x\right )+e^{-x} \log \left (1+e^{2 x}\right )+e^x \log \left (1+e^{2 x}\right )+2 \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,e^x\right )\\ &=-2 e^x+e^{-x} \log \left (1+e^{2 x}\right )+e^x \log \left (1+e^{2 x}\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.04, size = 24, normalized size = 0.75 \[ \left (e^{-x}+e^x\right ) \log \left (e^{2 x}+1\right )-2 e^x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \left (-e^{-x}+e^x\right ) \log \left (1+e^{2 x}\right ) \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.21, size = 26, normalized size = 0.81 \[ {\left ({\left (e^{\left (2 \, x\right )} + 1\right )} \log \left (e^{\left (2 \, x\right )} + 1\right ) - 2 \, e^{\left (2 \, x\right )}\right )} e^{\left (-x\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.94, size = 20, normalized size = 0.62 \[ {\left (e^{\left (-x\right )} + e^{x}\right )} \log \left (e^{\left (2 \, x\right )} + 1\right ) - 2 \, e^{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.03, size = 24, normalized size = 0.75
method | result | size |
risch | \(\left (1+{\mathrm e}^{2 x}\right ) {\mathrm e}^{-x} \ln \left (1+{\mathrm e}^{2 x}\right )-2 \,{\mathrm e}^{x}\) | \(24\) |
norman | \(\left ({\mathrm e}^{2 x} \ln \left (1+{\mathrm e}^{2 x}\right )-2 \,{\mathrm e}^{2 x}+\ln \left (1+{\mathrm e}^{2 x}\right )\right ) {\mathrm e}^{-x}\) | \(32\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.44, size = 20, normalized size = 0.62 \[ {\left (e^{\left (-x\right )} + e^{x}\right )} \log \left (e^{\left (2 \, x\right )} + 1\right ) - 2 \, e^{x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.38, size = 24, normalized size = 0.75 \[ 2\,\ln \left ({\mathrm {e}}^{2\,x}+1\right )\,\mathrm {cosh}\relax (x)-\frac {{\mathrm {e}}^{2\,x}+1}{\mathrm {cosh}\relax (x)} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-2)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ShapeError} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________