Optimal. Leaf size=75 \[ \frac {(A-B) \sinh (x)}{7 (1+\cosh (x))^4}+\frac {(3 A+4 B) \sinh (x)}{35 (1+\cosh (x))^3}+\frac {2 (3 A+4 B) \sinh (x)}{105 (1+\cosh (x))^2}+\frac {2 (3 A+4 B) \sinh (x)}{105 (1+\cosh (x))} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.04, antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.231, Rules used = {2829, 2729,
2727} \begin {gather*} \frac {2 (3 A+4 B) \sinh (x)}{105 (\cosh (x)+1)}+\frac {2 (3 A+4 B) \sinh (x)}{105 (\cosh (x)+1)^2}+\frac {(3 A+4 B) \sinh (x)}{35 (\cosh (x)+1)^3}+\frac {(A-B) \sinh (x)}{7 (\cosh (x)+1)^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2727
Rule 2729
Rule 2829
Rubi steps
\begin {align*} \int \frac {A+B \cosh (x)}{(1+\cosh (x))^4} \, dx &=\frac {(A-B) \sinh (x)}{7 (1+\cosh (x))^4}+\frac {1}{7} (3 A+4 B) \int \frac {1}{(1+\cosh (x))^3} \, dx\\ &=\frac {(A-B) \sinh (x)}{7 (1+\cosh (x))^4}+\frac {(3 A+4 B) \sinh (x)}{35 (1+\cosh (x))^3}+\frac {1}{35} (2 (3 A+4 B)) \int \frac {1}{(1+\cosh (x))^2} \, dx\\ &=\frac {(A-B) \sinh (x)}{7 (1+\cosh (x))^4}+\frac {(3 A+4 B) \sinh (x)}{35 (1+\cosh (x))^3}+\frac {2 (3 A+4 B) \sinh (x)}{105 (1+\cosh (x))^2}+\frac {1}{105} (2 (3 A+4 B)) \int \frac {1}{1+\cosh (x)} \, dx\\ &=\frac {(A-B) \sinh (x)}{7 (1+\cosh (x))^4}+\frac {(3 A+4 B) \sinh (x)}{35 (1+\cosh (x))^3}+\frac {2 (3 A+4 B) \sinh (x)}{105 (1+\cosh (x))^2}+\frac {2 (3 A+4 B) \sinh (x)}{105 (1+\cosh (x))}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 57, normalized size = 0.76 \begin {gather*} \frac {(96 A+58 B+29 (3 A+4 B) \cosh (x)+8 (3 A+4 B) \cosh (2 x)+3 A \cosh (3 x)+4 B \cosh (3 x)) \sinh (x)}{210 (1+\cosh (x))^4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.46, size = 55, normalized size = 0.73
method | result | size |
default | \(-\frac {\left (A -B \right ) \left (\tanh ^{7}\left (\frac {x}{2}\right )\right )}{56}-\frac {\left (-3 A +B \right ) \left (\tanh ^{5}\left (\frac {x}{2}\right )\right )}{40}-\frac {\left (3 A +B \right ) \left (\tanh ^{3}\left (\frac {x}{2}\right )\right )}{24}+\frac {A \tanh \left (\frac {x}{2}\right )}{8}+\frac {B \tanh \left (\frac {x}{2}\right )}{8}\) | \(55\) |
risch | \(-\frac {4 \left (70 B \,{\mathrm e}^{4 x}+105 A \,{\mathrm e}^{3 x}+70 B \,{\mathrm e}^{3 x}+63 A \,{\mathrm e}^{2 x}+84 B \,{\mathrm e}^{2 x}+21 A \,{\mathrm e}^{x}+28 B \,{\mathrm e}^{x}+3 A +4 B \right )}{105 \left ({\mathrm e}^{x}+1\right )^{7}}\) | \(61\) |
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. 449 vs.
\(2 (67) = 134\).
time = 0.29, size = 449, normalized size = 5.99 \begin {gather*} \frac {8}{105} \, B {\left (\frac {14 \, e^{\left (-x\right )}}{7 \, e^{\left (-x\right )} + 21 \, e^{\left (-2 \, x\right )} + 35 \, e^{\left (-3 \, x\right )} + 35 \, e^{\left (-4 \, x\right )} + 21 \, e^{\left (-5 \, x\right )} + 7 \, e^{\left (-6 \, x\right )} + e^{\left (-7 \, x\right )} + 1} + \frac {42 \, e^{\left (-2 \, x\right )}}{7 \, e^{\left (-x\right )} + 21 \, e^{\left (-2 \, x\right )} + 35 \, e^{\left (-3 \, x\right )} + 35 \, e^{\left (-4 \, x\right )} + 21 \, e^{\left (-5 \, x\right )} + 7 \, e^{\left (-6 \, x\right )} + e^{\left (-7 \, x\right )} + 1} + \frac {35 \, e^{\left (-3 \, x\right )}}{7 \, e^{\left (-x\right )} + 21 \, e^{\left (-2 \, x\right )} + 35 \, e^{\left (-3 \, x\right )} + 35 \, e^{\left (-4 \, x\right )} + 21 \, e^{\left (-5 \, x\right )} + 7 \, e^{\left (-6 \, x\right )} + e^{\left (-7 \, x\right )} + 1} + \frac {35 \, e^{\left (-4 \, x\right )}}{7 \, e^{\left (-x\right )} + 21 \, e^{\left (-2 \, x\right )} + 35 \, e^{\left (-3 \, x\right )} + 35 \, e^{\left (-4 \, x\right )} + 21 \, e^{\left (-5 \, x\right )} + 7 \, e^{\left (-6 \, x\right )} + e^{\left (-7 \, x\right )} + 1} + \frac {2}{7 \, e^{\left (-x\right )} + 21 \, e^{\left (-2 \, x\right )} + 35 \, e^{\left (-3 \, x\right )} + 35 \, e^{\left (-4 \, x\right )} + 21 \, e^{\left (-5 \, x\right )} + 7 \, e^{\left (-6 \, x\right )} + e^{\left (-7 \, x\right )} + 1}\right )} + \frac {4}{35} \, A {\left (\frac {7 \, e^{\left (-x\right )}}{7 \, e^{\left (-x\right )} + 21 \, e^{\left (-2 \, x\right )} + 35 \, e^{\left (-3 \, x\right )} + 35 \, e^{\left (-4 \, x\right )} + 21 \, e^{\left (-5 \, x\right )} + 7 \, e^{\left (-6 \, x\right )} + e^{\left (-7 \, x\right )} + 1} + \frac {21 \, e^{\left (-2 \, x\right )}}{7 \, e^{\left (-x\right )} + 21 \, e^{\left (-2 \, x\right )} + 35 \, e^{\left (-3 \, x\right )} + 35 \, e^{\left (-4 \, x\right )} + 21 \, e^{\left (-5 \, x\right )} + 7 \, e^{\left (-6 \, x\right )} + e^{\left (-7 \, x\right )} + 1} + \frac {35 \, e^{\left (-3 \, x\right )}}{7 \, e^{\left (-x\right )} + 21 \, e^{\left (-2 \, x\right )} + 35 \, e^{\left (-3 \, x\right )} + 35 \, e^{\left (-4 \, x\right )} + 21 \, e^{\left (-5 \, x\right )} + 7 \, e^{\left (-6 \, x\right )} + e^{\left (-7 \, x\right )} + 1} + \frac {1}{7 \, e^{\left (-x\right )} + 21 \, e^{\left (-2 \, x\right )} + 35 \, e^{\left (-3 \, x\right )} + 35 \, e^{\left (-4 \, x\right )} + 21 \, e^{\left (-5 \, x\right )} + 7 \, e^{\left (-6 \, x\right )} + e^{\left (-7 \, x\right )} + 1}\right )} \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. 175 vs.
\(2 (67) = 134\).
time = 0.37, size = 175, normalized size = 2.33 \begin {gather*} -\frac {4 \, {\left ({\left (3 \, A + 74 \, B\right )} \cosh \left (x\right )^{2} + {\left (3 \, A + 74 \, B\right )} \sinh \left (x\right )^{2} + 14 \, {\left (9 \, A + 7 \, B\right )} \cosh \left (x\right ) - 6 \, {\left ({\left (A - 22 \, B\right )} \cosh \left (x\right ) - 14 \, A - 7 \, B\right )} \sinh \left (x\right ) + 63 \, A + 84 \, B\right )}}{105 \, {\left (\cosh \left (x\right )^{5} + {\left (5 \, \cosh \left (x\right ) + 7\right )} \sinh \left (x\right )^{4} + \sinh \left (x\right )^{5} + 7 \, \cosh \left (x\right )^{4} + {\left (10 \, \cosh \left (x\right )^{2} + 28 \, \cosh \left (x\right ) + 21\right )} \sinh \left (x\right )^{3} + 21 \, \cosh \left (x\right )^{3} + {\left (10 \, \cosh \left (x\right )^{3} + 42 \, \cosh \left (x\right )^{2} + 63 \, \cosh \left (x\right ) + 36\right )} \sinh \left (x\right )^{2} + 36 \, \cosh \left (x\right )^{2} + {\left (5 \, \cosh \left (x\right )^{4} + 28 \, \cosh \left (x\right )^{3} + 63 \, \cosh \left (x\right )^{2} + 68 \, \cosh \left (x\right ) + 28\right )} \sinh \left (x\right ) + 42 \, \cosh \left (x\right ) + 21\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.95, size = 78, normalized size = 1.04 \begin {gather*} - \frac {A \tanh ^{7}{\left (\frac {x}{2} \right )}}{56} + \frac {3 A \tanh ^{5}{\left (\frac {x}{2} \right )}}{40} - \frac {A \tanh ^{3}{\left (\frac {x}{2} \right )}}{8} + \frac {A \tanh {\left (\frac {x}{2} \right )}}{8} + \frac {B \tanh ^{7}{\left (\frac {x}{2} \right )}}{56} - \frac {B \tanh ^{5}{\left (\frac {x}{2} \right )}}{40} - \frac {B \tanh ^{3}{\left (\frac {x}{2} \right )}}{24} + \frac {B \tanh {\left (\frac {x}{2} \right )}}{8} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.41, size = 60, normalized size = 0.80 \begin {gather*} -\frac {4 \, {\left (70 \, B e^{\left (4 \, x\right )} + 105 \, A e^{\left (3 \, x\right )} + 70 \, B e^{\left (3 \, x\right )} + 63 \, A e^{\left (2 \, x\right )} + 84 \, B e^{\left (2 \, x\right )} + 21 \, A e^{x} + 28 \, B e^{x} + 3 \, A + 4 \, B\right )}}{105 \, {\left (e^{x} + 1\right )}^{7}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.92, size = 231, normalized size = 3.08 \begin {gather*} -\frac {\frac {4\,A}{35}+\frac {8\,B\,{\mathrm {e}}^x}{35}}{6\,{\mathrm {e}}^{2\,x}+4\,{\mathrm {e}}^{3\,x}+{\mathrm {e}}^{4\,x}+4\,{\mathrm {e}}^x+1}-\frac {8\,B}{105\,\left (3\,{\mathrm {e}}^{2\,x}+{\mathrm {e}}^{3\,x}+3\,{\mathrm {e}}^x+1\right )}-\frac {\frac {16\,A\,{\mathrm {e}}^{3\,x}}{7}+\frac {8\,B\,{\mathrm {e}}^{2\,x}}{7}+\frac {8\,B\,{\mathrm {e}}^{4\,x}}{7}}{21\,{\mathrm {e}}^{2\,x}+35\,{\mathrm {e}}^{3\,x}+35\,{\mathrm {e}}^{4\,x}+21\,{\mathrm {e}}^{5\,x}+7\,{\mathrm {e}}^{6\,x}+{\mathrm {e}}^{7\,x}+7\,{\mathrm {e}}^x+1}-\frac {\frac {8\,B\,{\mathrm {e}}^x}{21}+\frac {8\,A\,{\mathrm {e}}^{2\,x}}{7}+\frac {16\,B\,{\mathrm {e}}^{3\,x}}{21}}{15\,{\mathrm {e}}^{2\,x}+20\,{\mathrm {e}}^{3\,x}+15\,{\mathrm {e}}^{4\,x}+6\,{\mathrm {e}}^{5\,x}+{\mathrm {e}}^{6\,x}+6\,{\mathrm {e}}^x+1}-\frac {\frac {8\,B}{105}+\frac {16\,A\,{\mathrm {e}}^x}{35}+\frac {16\,B\,{\mathrm {e}}^{2\,x}}{35}}{10\,{\mathrm {e}}^{2\,x}+10\,{\mathrm {e}}^{3\,x}+5\,{\mathrm {e}}^{4\,x}+{\mathrm {e}}^{5\,x}+5\,{\mathrm {e}}^x+1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________