Optimal. Leaf size=56 \[ -\frac {3 \text {ArcTan}(\sinh (x))}{2 a}+\frac {4 \tanh (x)}{a}-\frac {3 \text {sech}(x) \tanh (x)}{2 a}-\frac {\text {sech}^2(x) \tanh (x)}{a+a \cosh (x)}-\frac {4 \tanh ^3(x)}{3 a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 56, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 5, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {2847, 2827,
3852, 3853, 3855} \begin {gather*} -\frac {3 \text {ArcTan}(\sinh (x))}{2 a}-\frac {4 \tanh ^3(x)}{3 a}+\frac {4 \tanh (x)}{a}-\frac {3 \tanh (x) \text {sech}(x)}{2 a}-\frac {\tanh (x) \text {sech}^2(x)}{a \cosh (x)+a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2827
Rule 2847
Rule 3852
Rule 3853
Rule 3855
Rubi steps
\begin {align*} \int \frac {\text {sech}^4(x)}{a+a \cosh (x)} \, dx &=-\frac {\text {sech}^2(x) \tanh (x)}{a+a \cosh (x)}-\frac {\int (-4 a+3 a \cosh (x)) \text {sech}^4(x) \, dx}{a^2}\\ &=-\frac {\text {sech}^2(x) \tanh (x)}{a+a \cosh (x)}-\frac {3 \int \text {sech}^3(x) \, dx}{a}+\frac {4 \int \text {sech}^4(x) \, dx}{a}\\ &=-\frac {3 \text {sech}(x) \tanh (x)}{2 a}-\frac {\text {sech}^2(x) \tanh (x)}{a+a \cosh (x)}+\frac {(4 i) \text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,-i \tanh (x)\right )}{a}-\frac {3 \int \text {sech}(x) \, dx}{2 a}\\ &=-\frac {3 \tan ^{-1}(\sinh (x))}{2 a}+\frac {4 \tanh (x)}{a}-\frac {3 \text {sech}(x) \tanh (x)}{2 a}-\frac {\text {sech}^2(x) \tanh (x)}{a+a \cosh (x)}-\frac {4 \tanh ^3(x)}{3 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.13, size = 60, normalized size = 1.07 \begin {gather*} \frac {\cosh \left (\frac {x}{2}\right ) \left (6 \sinh \left (\frac {x}{2}\right )+\cosh \left (\frac {x}{2}\right ) \left (-18 \text {ArcTan}\left (\tanh \left (\frac {x}{2}\right )\right )+\left (10-3 \text {sech}(x)+2 \text {sech}^2(x)\right ) \tanh (x)\right )\right )}{3 a (1+\cosh (x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.56, size = 52, normalized size = 0.93
method | result | size |
default | \(\frac {\tanh \left (\frac {x}{2}\right )-\frac {8 \left (-\frac {5 \left (\tanh ^{5}\left (\frac {x}{2}\right )\right )}{8}-\frac {2 \left (\tanh ^{3}\left (\frac {x}{2}\right )\right )}{3}-\frac {3 \tanh \left (\frac {x}{2}\right )}{8}\right )}{\left (\tanh ^{2}\left (\frac {x}{2}\right )+1\right )^{3}}-3 \arctan \left (\tanh \left (\frac {x}{2}\right )\right )}{a}\) | \(52\) |
risch | \(-\frac {9 \,{\mathrm e}^{6 x}+9 \,{\mathrm e}^{5 x}+24 \,{\mathrm e}^{4 x}+24 \,{\mathrm e}^{3 x}+39 \,{\mathrm e}^{2 x}+7 \,{\mathrm e}^{x}+16}{3 \left (1+{\mathrm e}^{2 x}\right )^{3} a \left ({\mathrm e}^{x}+1\right )}+\frac {3 i \ln \left ({\mathrm e}^{x}-i\right )}{2 a}-\frac {3 i \ln \left ({\mathrm e}^{x}+i\right )}{2 a}\) | \(81\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 101 vs.
\(2 (50) = 100\).
time = 0.51, size = 101, normalized size = 1.80 \begin {gather*} \frac {7 \, e^{\left (-x\right )} + 39 \, e^{\left (-2 \, x\right )} + 24 \, e^{\left (-3 \, x\right )} + 24 \, e^{\left (-4 \, x\right )} + 9 \, e^{\left (-5 \, x\right )} + 9 \, e^{\left (-6 \, x\right )} + 16}{3 \, {\left (a e^{\left (-x\right )} + 3 \, a e^{\left (-2 \, x\right )} + 3 \, a e^{\left (-3 \, x\right )} + 3 \, a e^{\left (-4 \, x\right )} + 3 \, a e^{\left (-5 \, x\right )} + a e^{\left (-6 \, x\right )} + a e^{\left (-7 \, x\right )} + a\right )}} + \frac {3 \, \arctan \left (e^{\left (-x\right )}\right )}{a} \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. 600 vs.
\(2 (50) = 100\).
time = 0.39, size = 600, normalized size = 10.71 \begin {gather*} -\frac {9 \, \cosh \left (x\right )^{6} + 9 \, {\left (6 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right )^{5} + 9 \, \sinh \left (x\right )^{6} + 9 \, \cosh \left (x\right )^{5} + 3 \, {\left (45 \, \cosh \left (x\right )^{2} + 15 \, \cosh \left (x\right ) + 8\right )} \sinh \left (x\right )^{4} + 24 \, \cosh \left (x\right )^{4} + 6 \, {\left (30 \, \cosh \left (x\right )^{3} + 15 \, \cosh \left (x\right )^{2} + 16 \, \cosh \left (x\right ) + 4\right )} \sinh \left (x\right )^{3} + 24 \, \cosh \left (x\right )^{3} + 3 \, {\left (45 \, \cosh \left (x\right )^{4} + 30 \, \cosh \left (x\right )^{3} + 48 \, \cosh \left (x\right )^{2} + 24 \, \cosh \left (x\right ) + 13\right )} \sinh \left (x\right )^{2} + 9 \, {\left (\cosh \left (x\right )^{7} + {\left (7 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right )^{6} + \sinh \left (x\right )^{7} + \cosh \left (x\right )^{6} + 3 \, {\left (7 \, \cosh \left (x\right )^{2} + 2 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right )^{5} + 3 \, \cosh \left (x\right )^{5} + {\left (35 \, \cosh \left (x\right )^{3} + 15 \, \cosh \left (x\right )^{2} + 15 \, \cosh \left (x\right ) + 3\right )} \sinh \left (x\right )^{4} + 3 \, \cosh \left (x\right )^{4} + {\left (35 \, \cosh \left (x\right )^{4} + 20 \, \cosh \left (x\right )^{3} + 30 \, \cosh \left (x\right )^{2} + 12 \, \cosh \left (x\right ) + 3\right )} \sinh \left (x\right )^{3} + 3 \, \cosh \left (x\right )^{3} + 3 \, {\left (7 \, \cosh \left (x\right )^{5} + 5 \, \cosh \left (x\right )^{4} + 10 \, \cosh \left (x\right )^{3} + 6 \, \cosh \left (x\right )^{2} + 3 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right )^{2} + 3 \, \cosh \left (x\right )^{2} + {\left (7 \, \cosh \left (x\right )^{6} + 6 \, \cosh \left (x\right )^{5} + 15 \, \cosh \left (x\right )^{4} + 12 \, \cosh \left (x\right )^{3} + 9 \, \cosh \left (x\right )^{2} + 6 \, \cosh \left (x\right ) + 1\right )} \sinh \left (x\right ) + \cosh \left (x\right ) + 1\right )} \arctan \left (\cosh \left (x\right ) + \sinh \left (x\right )\right ) + 39 \, \cosh \left (x\right )^{2} + {\left (54 \, \cosh \left (x\right )^{5} + 45 \, \cosh \left (x\right )^{4} + 96 \, \cosh \left (x\right )^{3} + 72 \, \cosh \left (x\right )^{2} + 78 \, \cosh \left (x\right ) + 7\right )} \sinh \left (x\right ) + 7 \, \cosh \left (x\right ) + 16}{3 \, {\left (a \cosh \left (x\right )^{7} + a \sinh \left (x\right )^{7} + a \cosh \left (x\right )^{6} + {\left (7 \, a \cosh \left (x\right ) + a\right )} \sinh \left (x\right )^{6} + 3 \, a \cosh \left (x\right )^{5} + 3 \, {\left (7 \, a \cosh \left (x\right )^{2} + 2 \, a \cosh \left (x\right ) + a\right )} \sinh \left (x\right )^{5} + 3 \, a \cosh \left (x\right )^{4} + {\left (35 \, a \cosh \left (x\right )^{3} + 15 \, a \cosh \left (x\right )^{2} + 15 \, a \cosh \left (x\right ) + 3 \, a\right )} \sinh \left (x\right )^{4} + 3 \, a \cosh \left (x\right )^{3} + {\left (35 \, a \cosh \left (x\right )^{4} + 20 \, a \cosh \left (x\right )^{3} + 30 \, a \cosh \left (x\right )^{2} + 12 \, a \cosh \left (x\right ) + 3 \, a\right )} \sinh \left (x\right )^{3} + 3 \, a \cosh \left (x\right )^{2} + 3 \, {\left (7 \, a \cosh \left (x\right )^{5} + 5 \, a \cosh \left (x\right )^{4} + 10 \, a \cosh \left (x\right )^{3} + 6 \, a \cosh \left (x\right )^{2} + 3 \, a \cosh \left (x\right ) + a\right )} \sinh \left (x\right )^{2} + a \cosh \left (x\right ) + {\left (7 \, a \cosh \left (x\right )^{6} + 6 \, a \cosh \left (x\right )^{5} + 15 \, a \cosh \left (x\right )^{4} + 12 \, a \cosh \left (x\right )^{3} + 9 \, a \cosh \left (x\right )^{2} + 6 \, a \cosh \left (x\right ) + a\right )} \sinh \left (x\right ) + a\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\operatorname {sech}^{4}{\left (x \right )}}{\cosh {\left (x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.39, size = 57, normalized size = 1.02 \begin {gather*} -\frac {3 \, \arctan \left (e^{x}\right )}{a} - \frac {2}{a {\left (e^{x} + 1\right )}} - \frac {3 \, e^{\left (5 \, x\right )} + 6 \, e^{\left (4 \, x\right )} + 24 \, e^{\left (2 \, x\right )} - 3 \, e^{x} + 10}{3 \, a {\left (e^{\left (2 \, x\right )} + 1\right )}^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.90, size = 107, normalized size = 1.91 \begin {gather*} \frac {8}{3\,a\,\left (3\,{\mathrm {e}}^{2\,x}+3\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{6\,x}+1\right )}-\frac {\frac {4}{a}-\frac {2\,{\mathrm {e}}^x}{a}}{2\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{4\,x}+1}-\frac {2}{a\,\left ({\mathrm {e}}^x+1\right )}-\frac {\frac {2}{a}+\frac {{\mathrm {e}}^x}{a}}{{\mathrm {e}}^{2\,x}+1}-\frac {3\,\mathrm {atan}\left (\frac {{\mathrm {e}}^x\,\sqrt {a^2}}{a}\right )}{\sqrt {a^2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________