Optimal. Leaf size=67 \[ -\frac{\text{PolyLog}\left (2,-e^{a+b x}\right )}{b^2}+\frac{\text{PolyLog}\left (2,e^{a+b x}\right )}{b^2}-\frac{\tan ^{-1}(\sinh (a+b x))}{b^2}-\frac{2 x \tanh ^{-1}\left (e^{a+b x}\right )}{b}+\frac{x \text{sech}(a+b x)}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.114413, antiderivative size = 67, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 10, integrand size = 16, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.625, Rules used = {2622, 321, 207, 5462, 6271, 12, 4182, 2279, 2391, 3770} \[ -\frac{\text{PolyLog}\left (2,-e^{a+b x}\right )}{b^2}+\frac{\text{PolyLog}\left (2,e^{a+b x}\right )}{b^2}-\frac{\tan ^{-1}(\sinh (a+b x))}{b^2}-\frac{2 x \tanh ^{-1}\left (e^{a+b x}\right )}{b}+\frac{x \text{sech}(a+b x)}{b} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2622
Rule 321
Rule 207
Rule 5462
Rule 6271
Rule 12
Rule 4182
Rule 2279
Rule 2391
Rule 3770
Rubi steps
\begin{align*} \int x \text{csch}(a+b x) \text{sech}^2(a+b x) \, dx &=-\frac{x \tanh ^{-1}(\cosh (a+b x))}{b}+\frac{x \text{sech}(a+b x)}{b}-\int \left (-\frac{\tanh ^{-1}(\cosh (a+b x))}{b}+\frac{\text{sech}(a+b x)}{b}\right ) \, dx\\ &=-\frac{x \tanh ^{-1}(\cosh (a+b x))}{b}+\frac{x \text{sech}(a+b x)}{b}+\frac{\int \tanh ^{-1}(\cosh (a+b x)) \, dx}{b}-\frac{\int \text{sech}(a+b x) \, dx}{b}\\ &=-\frac{\tan ^{-1}(\sinh (a+b x))}{b^2}+\frac{x \text{sech}(a+b x)}{b}+\frac{\int b x \text{csch}(a+b x) \, dx}{b}\\ &=-\frac{\tan ^{-1}(\sinh (a+b x))}{b^2}+\frac{x \text{sech}(a+b x)}{b}+\int x \text{csch}(a+b x) \, dx\\ &=-\frac{\tan ^{-1}(\sinh (a+b x))}{b^2}-\frac{2 x \tanh ^{-1}\left (e^{a+b x}\right )}{b}+\frac{x \text{sech}(a+b x)}{b}-\frac{\int \log \left (1-e^{a+b x}\right ) \, dx}{b}+\frac{\int \log \left (1+e^{a+b x}\right ) \, dx}{b}\\ &=-\frac{\tan ^{-1}(\sinh (a+b x))}{b^2}-\frac{2 x \tanh ^{-1}\left (e^{a+b x}\right )}{b}+\frac{x \text{sech}(a+b x)}{b}-\frac{\operatorname{Subst}\left (\int \frac{\log (1-x)}{x} \, dx,x,e^{a+b x}\right )}{b^2}+\frac{\operatorname{Subst}\left (\int \frac{\log (1+x)}{x} \, dx,x,e^{a+b x}\right )}{b^2}\\ &=-\frac{\tan ^{-1}(\sinh (a+b x))}{b^2}-\frac{2 x \tanh ^{-1}\left (e^{a+b x}\right )}{b}-\frac{\text{Li}_2\left (-e^{a+b x}\right )}{b^2}+\frac{\text{Li}_2\left (e^{a+b x}\right )}{b^2}+\frac{x \text{sech}(a+b x)}{b}\\ \end{align*}
Mathematica [A] time = 0.282995, size = 106, normalized size = 1.58 \[ \frac{\text{PolyLog}\left (2,-e^{-a-b x}\right )-\text{PolyLog}\left (2,e^{-a-b x}\right )+(a+b x) \left (\log \left (1-e^{-a-b x}\right )-\log \left (e^{-a-b x}+1\right )\right )+b x \text{sech}(a+b x)-a \log \left (\tanh \left (\frac{1}{2} (a+b x)\right )\right )-2 \tan ^{-1}\left (\tanh \left (\frac{1}{2} (a+b x)\right )\right )}{b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.085, size = 95, normalized size = 1.4 \begin{align*} 2\,{\frac{x{{\rm e}^{bx+a}}}{b \left ( 1+{{\rm e}^{2\,bx+2\,a}} \right ) }}-2\,{\frac{\arctan \left ({{\rm e}^{bx+a}} \right ) }{{b}^{2}}}-{\frac{{\it dilog} \left ({{\rm e}^{bx+a}} \right ) }{{b}^{2}}}-{\frac{{\it dilog} \left ( 1+{{\rm e}^{bx+a}} \right ) }{{b}^{2}}}-{\frac{\ln \left ( 1+{{\rm e}^{bx+a}} \right ) x}{b}}-{\frac{a\ln \left ({{\rm e}^{bx+a}}-1 \right ) }{{b}^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.72526, size = 122, normalized size = 1.82 \begin{align*} \frac{2 \, x e^{\left (b x + a\right )}}{b e^{\left (2 \, b x + 2 \, a\right )} + b} - \frac{b x \log \left (e^{\left (b x + a\right )} + 1\right ) +{\rm Li}_2\left (-e^{\left (b x + a\right )}\right )}{b^{2}} + \frac{b x \log \left (-e^{\left (b x + a\right )} + 1\right ) +{\rm Li}_2\left (e^{\left (b x + a\right )}\right )}{b^{2}} - \frac{2 \, \arctan \left (e^{\left (b x + a\right )}\right )}{b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.50582, size = 1166, normalized size = 17.4 \begin{align*} \frac{2 \, b x \cosh \left (b x + a\right ) + 2 \, b x \sinh \left (b x + a\right ) - 2 \,{\left (\cosh \left (b x + a\right )^{2} + 2 \, \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + \sinh \left (b x + a\right )^{2} + 1\right )} \arctan \left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right ) +{\left (\cosh \left (b x + a\right )^{2} + 2 \, \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + \sinh \left (b x + a\right )^{2} + 1\right )}{\rm Li}_2\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right ) -{\left (\cosh \left (b x + a\right )^{2} + 2 \, \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + \sinh \left (b x + a\right )^{2} + 1\right )}{\rm Li}_2\left (-\cosh \left (b x + a\right ) - \sinh \left (b x + a\right )\right ) -{\left (b x \cosh \left (b x + a\right )^{2} + 2 \, b x \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + b x \sinh \left (b x + a\right )^{2} + b x\right )} \log \left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right ) + 1\right ) -{\left (a \cosh \left (b x + a\right )^{2} + 2 \, a \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + a \sinh \left (b x + a\right )^{2} + a\right )} \log \left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right ) - 1\right ) +{\left ({\left (b x + a\right )} \cosh \left (b x + a\right )^{2} + 2 \,{\left (b x + a\right )} \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) +{\left (b x + a\right )} \sinh \left (b x + a\right )^{2} + b x + a\right )} \log \left (-\cosh \left (b x + a\right ) - \sinh \left (b x + a\right ) + 1\right )}{b^{2} \cosh \left (b x + a\right )^{2} + 2 \, b^{2} \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + b^{2} \sinh \left (b x + a\right )^{2} + b^{2}} \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 \operatorname{csch}{\left (a + b x \right )} \operatorname{sech}^{2}{\left (a + b 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 \operatorname{csch}\left (b x + a\right ) \operatorname{sech}\left (b x + a\right )^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]