Optimal. Leaf size=31 \[ \frac{\log (\cosh (a+b x))}{b^2}-\frac{x \tanh (a+b x)}{b}+\frac{x^2}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.026975, antiderivative size = 31, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 10, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3, Rules used = {3720, 3475, 30} \[ \frac{\log (\cosh (a+b x))}{b^2}-\frac{x \tanh (a+b x)}{b}+\frac{x^2}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3720
Rule 3475
Rule 30
Rubi steps
\begin{align*} \int x \tanh ^2(a+b x) \, dx &=-\frac{x \tanh (a+b x)}{b}+\frac{\int \tanh (a+b x) \, dx}{b}+\int x \, dx\\ &=\frac{x^2}{2}+\frac{\log (\cosh (a+b x))}{b^2}-\frac{x \tanh (a+b x)}{b}\\ \end{align*}
Mathematica [A] time = 0.140666, size = 46, normalized size = 1.48 \[ \frac{-2 b x \tanh (a)+2 \log (\cosh (a+b x))-2 b x \text{sech}(a) \sinh (b x) \text{sech}(a+b x)+b^2 x^2}{2 b^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.055, size = 54, normalized size = 1.7 \begin{align*}{\frac{{x}^{2}}{2}}-2\,{\frac{x}{b}}-2\,{\frac{a}{{b}^{2}}}+2\,{\frac{x}{b \left ( 1+{{\rm e}^{2\,bx+2\,a}} \right ) }}+{\frac{\ln \left ( 1+{{\rm e}^{2\,bx+2\,a}} \right ) }{{b}^{2}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.18184, size = 128, normalized size = 4.13 \begin{align*} -\frac{x e^{\left (2 \, b x + 2 \, a\right )}}{b e^{\left (2 \, b x + 2 \, a\right )} + b} + \frac{b x^{2} +{\left (b x^{2} e^{\left (2 \, a\right )} - 2 \, x e^{\left (2 \, a\right )}\right )} e^{\left (2 \, b x\right )}}{2 \,{\left (b e^{\left (2 \, b x + 2 \, a\right )} + b\right )}} + \frac{\log \left ({\left (e^{\left (2 \, b x + 2 \, a\right )} + 1\right )} e^{\left (-2 \, a\right )}\right )}{b^{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.04819, size = 475, normalized size = 15.32 \begin{align*} \frac{b^{2} x^{2} +{\left (b^{2} x^{2} - 4 \, b x\right )} \cosh \left (b x + a\right )^{2} + 2 \,{\left (b^{2} x^{2} - 4 \, b x\right )} \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) +{\left (b^{2} x^{2} - 4 \, b x\right )} \sinh \left (b x + a\right )^{2} + 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 )} \log \left (\frac{2 \, \cosh \left (b x + a\right )}{\cosh \left (b x + a\right ) - \sinh \left (b x + a\right )}\right )}{2 \,{\left (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}\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 \sinh ^{2}{\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 [B] time = 1.19563, size = 128, normalized size = 4.13 \begin{align*} \frac{b^{2} x^{2} e^{\left (2 \, b x + 2 \, a\right )} + b^{2} x^{2} - 4 \, b x e^{\left (2 \, b x + 2 \, a\right )} + 2 \, e^{\left (2 \, b x + 2 \, a\right )} \log \left (e^{\left (2 \, b x + 2 \, a\right )} + 1\right ) + 2 \, \log \left (e^{\left (2 \, b x + 2 \, a\right )} + 1\right )}{2 \,{\left (b^{2} e^{\left (2 \, b x + 2 \, a\right )} + b^{2}\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]