Optimal. Leaf size=59 \[ \frac {e^{-a-b x}}{4 b}+\frac {e^{a+b x}}{b}+\frac {e^{3 a+3 b x}}{12 b}-\frac {2 \tanh ^{-1}\left (e^{a+b x}\right )}{b} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {2320, 12, 472,
213} \begin {gather*} \frac {e^{-a-b x}}{4 b}+\frac {e^{a+b x}}{b}+\frac {e^{3 a+3 b x}}{12 b}-\frac {2 \tanh ^{-1}\left (e^{a+b x}\right )}{b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 213
Rule 472
Rule 2320
Rubi steps
\begin {align*} \int e^{a+b x} \cosh ^2(a+b x) \coth (a+b x) \, dx &=\frac {\text {Subst}\left (\int \frac {\left (1+x^2\right )^3}{4 x^2 \left (-1+x^2\right )} \, dx,x,e^{a+b x}\right )}{b}\\ &=\frac {\text {Subst}\left (\int \frac {\left (1+x^2\right )^3}{x^2 \left (-1+x^2\right )} \, dx,x,e^{a+b x}\right )}{4 b}\\ &=\frac {\text {Subst}\left (\int \left (4-\frac {1}{x^2}+x^2+\frac {8}{-1+x^2}\right ) \, dx,x,e^{a+b x}\right )}{4 b}\\ &=\frac {e^{-a-b x}}{4 b}+\frac {e^{a+b x}}{b}+\frac {e^{3 a+3 b x}}{12 b}+\frac {2 \text {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,e^{a+b x}\right )}{b}\\ &=\frac {e^{-a-b x}}{4 b}+\frac {e^{a+b x}}{b}+\frac {e^{3 a+3 b x}}{12 b}-\frac {2 \tanh ^{-1}\left (e^{a+b x}\right )}{b}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 68, normalized size = 1.15 \begin {gather*} \frac {e^{-a-b x} \left (3+12 e^{2 (a+b x)}+e^{4 (a+b x)}-24 \sqrt {e^{2 (a+b x)}} \tanh ^{-1}\left (\sqrt {e^{2 (a+b x)}}\right )\right )}{12 b} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 2.34, size = 57, normalized size = 0.97
method | result | size |
default | \(\frac {3 \sinh \left (b x +a \right )}{4 b}+\frac {\sinh \left (3 b x +3 a \right )}{12 b}+\frac {\frac {\left (\cosh ^{3}\left (b x +a \right )\right )}{3}+\cosh \left (b x +a \right )-2 \arctanh \left ({\mathrm e}^{b x +a}\right )}{b}\) | \(57\) |
risch | \(\frac {{\mathrm e}^{3 b x +3 a}}{12 b}+\frac {{\mathrm e}^{b x +a}}{b}+\frac {{\mathrm e}^{-b x -a}}{4 b}-\frac {\ln \left ({\mathrm e}^{b x +a}+1\right )}{b}+\frac {\ln \left ({\mathrm e}^{b x +a}-1\right )}{b}\) | \(67\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 65, normalized size = 1.10 \begin {gather*} \frac {e^{\left (3 \, b x + 3 \, a\right )} + 12 \, e^{\left (b x + a\right )}}{12 \, b} + \frac {e^{\left (-b x - a\right )}}{4 \, b} - \frac {\log \left (e^{\left (b x + a\right )} + 1\right )}{b} + \frac {\log \left (e^{\left (b x + a\right )} - 1\right )}{b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 170 vs.
\(2 (51) = 102\).
time = 0.36, size = 170, normalized size = 2.88 \begin {gather*} \frac {\cosh \left (b x + a\right )^{4} + 4 \, \cosh \left (b x + a\right ) \sinh \left (b x + a\right )^{3} + \sinh \left (b x + a\right )^{4} + 6 \, {\left (\cosh \left (b x + a\right )^{2} + 2\right )} \sinh \left (b x + a\right )^{2} + 12 \, \cosh \left (b x + a\right )^{2} - 12 \, {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )} \log \left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right ) + 1\right ) + 12 \, {\left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )} \log \left (\cosh \left (b x + a\right ) + \sinh \left (b x + a\right ) - 1\right ) + 4 \, {\left (\cosh \left (b x + a\right )^{3} + 6 \, \cosh \left (b x + a\right )\right )} \sinh \left (b x + a\right ) + 3}{12 \, {\left (b \cosh \left (b x + a\right ) + b \sinh \left (b x + a\right )\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.42, size = 57, normalized size = 0.97 \begin {gather*} \frac {e^{\left (3 \, b x + 3 \, a\right )} + 12 \, e^{\left (b x + a\right )} + 3 \, e^{\left (-b x - a\right )} - 12 \, \log \left (e^{\left (b x + a\right )} + 1\right ) + 12 \, \log \left ({\left | e^{\left (b x + a\right )} - 1 \right |}\right )}{12 \, b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.11, size = 66, normalized size = 1.12 \begin {gather*} \frac {{\mathrm {e}}^{a+b\,x}}{b}-\frac {2\,\mathrm {atan}\left (\frac {{\mathrm {e}}^{b\,x}\,{\mathrm {e}}^a\,\sqrt {-b^2}}{b}\right )}{\sqrt {-b^2}}+\frac {{\mathrm {e}}^{-a-b\,x}}{4\,b}+\frac {{\mathrm {e}}^{3\,a+3\,b\,x}}{12\,b} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________