Optimal. Leaf size=54 \[ -\frac {3 x}{2 a}+\frac {4 \sinh (x)}{a}-\frac {3 \cosh (x) \sinh (x)}{2 a}-\frac {\cosh ^3(x) \sinh (x)}{a+a \cosh (x)}+\frac {4 \sinh ^3(x)}{3 a} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 54, 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 = {2846, 2827,
2715, 8, 2713} \begin {gather*} -\frac {3 x}{2 a}+\frac {4 \sinh ^3(x)}{3 a}+\frac {4 \sinh (x)}{a}-\frac {\sinh (x) \cosh ^3(x)}{a \cosh (x)+a}-\frac {3 \sinh (x) \cosh (x)}{2 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2713
Rule 2715
Rule 2827
Rule 2846
Rubi steps
\begin {align*} \int \frac {\cosh ^4(x)}{a+a \cosh (x)} \, dx &=-\frac {\cosh ^3(x) \sinh (x)}{a+a \cosh (x)}-\frac {\int \cosh ^2(x) (3 a-4 a \cosh (x)) \, dx}{a^2}\\ &=-\frac {\cosh ^3(x) \sinh (x)}{a+a \cosh (x)}-\frac {3 \int \cosh ^2(x) \, dx}{a}+\frac {4 \int \cosh ^3(x) \, dx}{a}\\ &=-\frac {3 \cosh (x) \sinh (x)}{2 a}-\frac {\cosh ^3(x) \sinh (x)}{a+a \cosh (x)}+\frac {(4 i) \text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-i \sinh (x)\right )}{a}-\frac {3 \int 1 \, dx}{2 a}\\ &=-\frac {3 x}{2 a}+\frac {4 \sinh (x)}{a}-\frac {3 \cosh (x) \sinh (x)}{2 a}-\frac {\cosh ^3(x) \sinh (x)}{a+a \cosh (x)}+\frac {4 \sinh ^3(x)}{3 a}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.06, size = 53, normalized size = 0.98 \begin {gather*} \frac {\text {sech}\left (\frac {x}{2}\right ) \left (-36 x \cosh \left (\frac {x}{2}\right )+45 \sinh \left (\frac {x}{2}\right )+18 \sinh \left (\frac {3 x}{2}\right )-2 \sinh \left (\frac {5 x}{2}\right )+\sinh \left (\frac {7 x}{2}\right )\right )}{24 a} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.44, size = 86, normalized size = 1.59
method | result | size |
risch | \(-\frac {3 x}{2 a}+\frac {{\mathrm e}^{3 x}}{24 a}-\frac {{\mathrm e}^{2 x}}{8 a}+\frac {7 \,{\mathrm e}^{x}}{8 a}-\frac {7 \,{\mathrm e}^{-x}}{8 a}+\frac {{\mathrm e}^{-2 x}}{8 a}-\frac {{\mathrm e}^{-3 x}}{24 a}-\frac {2}{\left ({\mathrm e}^{x}+1\right ) a}\) | \(71\) |
default | \(\frac {\tanh \left (\frac {x}{2}\right )-\frac {1}{3 \left (\tanh \left (\frac {x}{2}\right )-1\right )^{3}}-\frac {1}{\left (\tanh \left (\frac {x}{2}\right )-1\right )^{2}}-\frac {5}{2 \left (\tanh \left (\frac {x}{2}\right )-1\right )}+\frac {3 \ln \left (\tanh \left (\frac {x}{2}\right )-1\right )}{2}-\frac {1}{3 \left (\tanh \left (\frac {x}{2}\right )+1\right )^{3}}+\frac {1}{\left (\tanh \left (\frac {x}{2}\right )+1\right )^{2}}-\frac {5}{2 \left (\tanh \left (\frac {x}{2}\right )+1\right )}-\frac {3 \ln \left (\tanh \left (\frac {x}{2}\right )+1\right )}{2}}{a}\) | \(86\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 66, normalized size = 1.22 \begin {gather*} -\frac {3 \, x}{2 \, a} - \frac {21 \, e^{\left (-x\right )} - 3 \, e^{\left (-2 \, x\right )} + e^{\left (-3 \, x\right )}}{24 \, a} - \frac {2 \, e^{\left (-x\right )} - 18 \, e^{\left (-2 \, x\right )} - 69 \, e^{\left (-3 \, x\right )} - 1}{24 \, {\left (a e^{\left (-3 \, x\right )} + a e^{\left (-4 \, x\right )}\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. 100 vs.
\(2 (48) = 96\).
time = 0.37, size = 100, normalized size = 1.85 \begin {gather*} \frac {\cosh \left (x\right )^{4} + {\left (4 \, \cosh \left (x\right ) - 1\right )} \sinh \left (x\right )^{3} + \sinh \left (x\right )^{4} - 3 \, \cosh \left (x\right )^{3} + {\left (6 \, \cosh \left (x\right )^{2} - 9 \, \cosh \left (x\right ) + 20\right )} \sinh \left (x\right )^{2} - 3 \, {\left (12 \, x - 1\right )} \cosh \left (x\right ) + 20 \, \cosh \left (x\right )^{2} + {\left (4 \, \cosh \left (x\right )^{3} - 3 \, \cosh \left (x\right )^{2} - 36 \, x + 32 \, \cosh \left (x\right ) + 39\right )} \sinh \left (x\right ) - 36 \, x - 69}{24 \, {\left (a \cosh \left (x\right ) + a \sinh \left (x\right ) + a\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 337 vs.
\(2 (49) = 98\).
time = 0.72, size = 337, normalized size = 6.24 \begin {gather*} - \frac {9 x \tanh ^{6}{\left (\frac {x}{2} \right )}}{6 a \tanh ^{6}{\left (\frac {x}{2} \right )} - 18 a \tanh ^{4}{\left (\frac {x}{2} \right )} + 18 a \tanh ^{2}{\left (\frac {x}{2} \right )} - 6 a} + \frac {27 x \tanh ^{4}{\left (\frac {x}{2} \right )}}{6 a \tanh ^{6}{\left (\frac {x}{2} \right )} - 18 a \tanh ^{4}{\left (\frac {x}{2} \right )} + 18 a \tanh ^{2}{\left (\frac {x}{2} \right )} - 6 a} - \frac {27 x \tanh ^{2}{\left (\frac {x}{2} \right )}}{6 a \tanh ^{6}{\left (\frac {x}{2} \right )} - 18 a \tanh ^{4}{\left (\frac {x}{2} \right )} + 18 a \tanh ^{2}{\left (\frac {x}{2} \right )} - 6 a} + \frac {9 x}{6 a \tanh ^{6}{\left (\frac {x}{2} \right )} - 18 a \tanh ^{4}{\left (\frac {x}{2} \right )} + 18 a \tanh ^{2}{\left (\frac {x}{2} \right )} - 6 a} + \frac {6 \tanh ^{7}{\left (\frac {x}{2} \right )}}{6 a \tanh ^{6}{\left (\frac {x}{2} \right )} - 18 a \tanh ^{4}{\left (\frac {x}{2} \right )} + 18 a \tanh ^{2}{\left (\frac {x}{2} \right )} - 6 a} - \frac {48 \tanh ^{5}{\left (\frac {x}{2} \right )}}{6 a \tanh ^{6}{\left (\frac {x}{2} \right )} - 18 a \tanh ^{4}{\left (\frac {x}{2} \right )} + 18 a \tanh ^{2}{\left (\frac {x}{2} \right )} - 6 a} + \frac {50 \tanh ^{3}{\left (\frac {x}{2} \right )}}{6 a \tanh ^{6}{\left (\frac {x}{2} \right )} - 18 a \tanh ^{4}{\left (\frac {x}{2} \right )} + 18 a \tanh ^{2}{\left (\frac {x}{2} \right )} - 6 a} - \frac {24 \tanh {\left (\frac {x}{2} \right )}}{6 a \tanh ^{6}{\left (\frac {x}{2} \right )} - 18 a \tanh ^{4}{\left (\frac {x}{2} \right )} + 18 a \tanh ^{2}{\left (\frac {x}{2} \right )} - 6 a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.40, size = 70, normalized size = 1.30 \begin {gather*} -\frac {3 \, x}{2 \, a} - \frac {{\left (69 \, e^{\left (3 \, x\right )} + 18 \, e^{\left (2 \, x\right )} - 2 \, e^{x} + 1\right )} e^{\left (-3 \, x\right )}}{24 \, a {\left (e^{x} + 1\right )}} + \frac {a^{2} e^{\left (3 \, x\right )} - 3 \, a^{2} e^{\left (2 \, x\right )} + 21 \, a^{2} e^{x}}{24 \, a^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.96, size = 70, normalized size = 1.30 \begin {gather*} \frac {{\mathrm {e}}^{-2\,x}}{8\,a}-\frac {7\,{\mathrm {e}}^{-x}}{8\,a}-\frac {{\mathrm {e}}^{2\,x}}{8\,a}-\frac {{\mathrm {e}}^{-3\,x}}{24\,a}+\frac {{\mathrm {e}}^{3\,x}}{24\,a}-\frac {3\,x}{2\,a}-\frac {2}{a\,\left ({\mathrm {e}}^x+1\right )}+\frac {7\,{\mathrm {e}}^x}{8\,a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________