Integrand size = 10, antiderivative size = 31 \[ \int x \tanh ^2(a+b x) \, dx=\frac {x^2}{2}+\frac {\log (\cosh (a+b x))}{b^2}-\frac {x \tanh (a+b x)}{b} \]
[Out]
Time = 0.02 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.300, Rules used = {3801, 3556, 30} \[ \int x \tanh ^2(a+b x) \, dx=\frac {\log (\cosh (a+b x))}{b^2}-\frac {x \tanh (a+b x)}{b}+\frac {x^2}{2} \]
[In]
[Out]
Rule 30
Rule 3556
Rule 3801
Rubi steps \begin{align*} \text {integral}& = -\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*}
Time = 0.11 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.48 \[ \int x \tanh ^2(a+b x) \, dx=\frac {b^2 x^2+2 \log (\cosh (a+b x))-2 b x \text {sech}(a) \text {sech}(a+b x) \sinh (b x)-2 b x \tanh (a)}{2 b^2} \]
[In]
[Out]
Time = 0.95 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.32
method | result | size |
parallelrisch | \(\frac {x^{2} b^{2}-2 \tanh \left (b x +a \right ) x b -2 b x -2 \ln \left (1-\tanh \left (b x +a \right )\right )}{2 b^{2}}\) | \(41\) |
risch | \(\frac {x^{2}}{2}-\frac {2 x}{b}-\frac {2 a}{b^{2}}+\frac {2 x}{b \left (1+{\mathrm e}^{2 b x +2 a}\right )}+\frac {\ln \left (1+{\mathrm e}^{2 b x +2 a}\right )}{b^{2}}\) | \(54\) |
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 185 vs. \(2 (29) = 58\).
Time = 0.26 (sec) , antiderivative size = 185, normalized size of antiderivative = 5.97 \[ \int x \tanh ^2(a+b x) \, dx=\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 )}} \]
[In]
[Out]
\[ \int x \tanh ^2(a+b x) \, dx=\int x \sinh ^{2}{\left (a + b x \right )} \operatorname {sech}^{2}{\left (a + b x \right )}\, dx \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 95 vs. \(2 (29) = 58\).
Time = 0.24 (sec) , antiderivative size = 95, normalized size of antiderivative = 3.06 \[ \int x \tanh ^2(a+b x) \, dx=-\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}} \]
[In]
[Out]
Leaf count of result is larger than twice the leaf count of optimal. 95 vs. \(2 (29) = 58\).
Time = 0.29 (sec) , antiderivative size = 95, normalized size of antiderivative = 3.06 \[ \int x \tanh ^2(a+b x) \, dx=\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 )}} \]
[In]
[Out]
Time = 0.11 (sec) , antiderivative size = 45, normalized size of antiderivative = 1.45 \[ \int x \tanh ^2(a+b x) \, dx=\frac {\frac {x^2\,\mathrm {cosh}\left (a+b\,x\right )}{2}-\frac {x\,\mathrm {sinh}\left (a+b\,x\right )}{b}}{\mathrm {cosh}\left (a+b\,x\right )}+\frac {\ln \left (\mathrm {cosh}\left (a+b\,x\right )\right )}{b^2} \]
[In]
[Out]