Optimal. Leaf size=43 \[ i \text{PolyLog}\left (2,-i e^x\right )-i \text{PolyLog}\left (2,i e^x\right )-2 x \tan ^{-1}\left (e^x\right )+2 x \sinh (x)-2 \cosh (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0725748, antiderivative size = 43, normalized size of antiderivative = 1., number of steps used = 12, number of rules used = 7, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.875, Rules used = {5473, 3296, 2638, 5449, 4180, 2279, 2391} \[ i \text{PolyLog}\left (2,-i e^x\right )-i \text{PolyLog}\left (2,i e^x\right )-2 x \tan ^{-1}\left (e^x\right )+2 x \sinh (x)-2 \cosh (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 5473
Rule 3296
Rule 2638
Rule 5449
Rule 4180
Rule 2279
Rule 2391
Rubi steps
\begin{align*} \int x \cosh (2 x) \text{sech}(x) \, dx &=\int (x \cosh (x)+x \sinh (x) \tanh (x)) \, dx\\ &=\int x \cosh (x) \, dx+\int x \sinh (x) \tanh (x) \, dx\\ &=x \sinh (x)+\int x \cosh (x) \, dx-\int x \text{sech}(x) \, dx-\int \sinh (x) \, dx\\ &=-2 x \tan ^{-1}\left (e^x\right )-\cosh (x)+2 x \sinh (x)+i \int \log \left (1-i e^x\right ) \, dx-i \int \log \left (1+i e^x\right ) \, dx-\int \sinh (x) \, dx\\ &=-2 x \tan ^{-1}\left (e^x\right )-2 \cosh (x)+2 x \sinh (x)+i \operatorname{Subst}\left (\int \frac{\log (1-i x)}{x} \, dx,x,e^x\right )-i \operatorname{Subst}\left (\int \frac{\log (1+i x)}{x} \, dx,x,e^x\right )\\ &=-2 x \tan ^{-1}\left (e^x\right )-2 \cosh (x)+i \text{Li}_2\left (-i e^x\right )-i \text{Li}_2\left (i e^x\right )+2 x \sinh (x)\\ \end{align*}
Mathematica [A] time = 0.0318339, size = 71, normalized size = 1.65 \[ i \left (\text{PolyLog}\left (2,-i e^{-x}\right )-\text{PolyLog}\left (2,i e^{-x}\right )\right )+i x \left (\log \left (1-i e^{-x}\right )-\log \left (1+i e^{-x}\right )\right )+2 x \sinh (x)-2 \cosh (x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.038, size = 68, normalized size = 1.6 \begin{align*} 2\, \left ( -1/2+x/2 \right ){{\rm e}^{x}}+2\, \left ( -1/2-x/2 \right ){{\rm e}^{-x}}+ix\ln \left ( 1+i{{\rm e}^{x}} \right ) -ix\ln \left ( 1-i{{\rm e}^{x}} \right ) +i{\it dilog} \left ( 1+i{{\rm e}^{x}} \right ) -i{\it dilog} \left ( 1-i{{\rm e}^{x}} \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} -{\left (x + 1\right )} e^{\left (-x\right )} +{\left (x - 1\right )} e^{x} - 2 \, \int \frac{x e^{x}}{e^{\left (2 \, x\right )} + 1}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 1.835, size = 450, normalized size = 10.47 \begin{align*} \frac{{\left (x - 1\right )} \cosh \left (x\right )^{2} + 2 \,{\left (x - 1\right )} \cosh \left (x\right ) \sinh \left (x\right ) +{\left (x - 1\right )} \sinh \left (x\right )^{2} +{\left (-i \, \cosh \left (x\right ) - i \, \sinh \left (x\right )\right )}{\rm Li}_2\left (i \, \cosh \left (x\right ) + i \, \sinh \left (x\right )\right ) +{\left (i \, \cosh \left (x\right ) + i \, \sinh \left (x\right )\right )}{\rm Li}_2\left (-i \, \cosh \left (x\right ) - i \, \sinh \left (x\right )\right ) +{\left (i \, x \cosh \left (x\right ) + i \, x \sinh \left (x\right )\right )} \log \left (i \, \cosh \left (x\right ) + i \, \sinh \left (x\right ) + 1\right ) +{\left (-i \, x \cosh \left (x\right ) - i \, x \sinh \left (x\right )\right )} \log \left (-i \, \cosh \left (x\right ) - i \, \sinh \left (x\right ) + 1\right ) - x - 1}{\cosh \left (x\right ) + \sinh \left (x\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 x \cosh{\left (2 x \right )} \operatorname{sech}{\left (x \right )}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int x \cosh \left (2 \, x\right ) \operatorname{sech}\left (x\right )\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]