Optimal. Leaf size=72 \[ \frac {3}{8} \left (a^2-b^2\right )^2 x+\frac {3}{8} \left (a^2-b^2\right ) (b \cosh (x)+a \sinh (x)) (a \cosh (x)+b \sinh (x))+\frac {1}{4} (b \cosh (x)+a \sinh (x)) (a \cosh (x)+b \sinh (x))^3 \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {3152, 8}
\begin {gather*} \frac {3}{8} x \left (a^2-b^2\right )^2+\frac {3}{8} \left (a^2-b^2\right ) (a \sinh (x)+b \cosh (x)) (a \cosh (x)+b \sinh (x))+\frac {1}{4} (a \sinh (x)+b \cosh (x)) (a \cosh (x)+b \sinh (x))^3 \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 3152
Rubi steps
\begin {align*} \int (a \cosh (x)+b \sinh (x))^4 \, dx &=\frac {1}{4} (b \cosh (x)+a \sinh (x)) (a \cosh (x)+b \sinh (x))^3+\frac {1}{4} \left (3 \left (a^2-b^2\right )\right ) \int (a \cosh (x)+b \sinh (x))^2 \, dx\\ &=\frac {3}{8} \left (a^2-b^2\right ) (b \cosh (x)+a \sinh (x)) (a \cosh (x)+b \sinh (x))+\frac {1}{4} (b \cosh (x)+a \sinh (x)) (a \cosh (x)+b \sinh (x))^3+\frac {1}{8} \left (3 \left (a^2-b^2\right )^2\right ) \int 1 \, dx\\ &=\frac {3}{8} \left (a^2-b^2\right )^2 x+\frac {3}{8} \left (a^2-b^2\right ) (b \cosh (x)+a \sinh (x)) (a \cosh (x)+b \sinh (x))+\frac {1}{4} (b \cosh (x)+a \sinh (x)) (a \cosh (x)+b \sinh (x))^3\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.10, size = 87, normalized size = 1.21 \begin {gather*} \frac {1}{32} \left (12 (a-b)^2 (a+b)^2 x+16 a b \left (a^2-b^2\right ) \cosh (2 x)+4 a b \left (a^2+b^2\right ) \cosh (4 x)+8 \left (a^4-b^4\right ) \sinh (2 x)+\left (a^4+6 a^2 b^2+b^4\right ) \sinh (4 x)\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(198\) vs.
\(2(66)=132\).
time = 1.14, size = 199, normalized size = 2.76
method | result | size |
risch | \(\frac {3 x \,a^{4}}{8}-\frac {3 x \,a^{2} b^{2}}{4}+\frac {3 b^{4} x}{8}+\frac {{\mathrm e}^{4 x} a^{4}}{64}+\frac {{\mathrm e}^{4 x} a^{3} b}{16}+\frac {3 \,{\mathrm e}^{4 x} a^{2} b^{2}}{32}+\frac {{\mathrm e}^{4 x} a \,b^{3}}{16}+\frac {{\mathrm e}^{4 x} b^{4}}{64}+\frac {{\mathrm e}^{2 x} a^{4}}{8}+\frac {{\mathrm e}^{2 x} a^{3} b}{4}-\frac {{\mathrm e}^{2 x} a \,b^{3}}{4}-\frac {{\mathrm e}^{2 x} b^{4}}{8}-\frac {{\mathrm e}^{-2 x} a^{4}}{8}+\frac {{\mathrm e}^{-2 x} a^{3} b}{4}-\frac {{\mathrm e}^{-2 x} a \,b^{3}}{4}+\frac {{\mathrm e}^{-2 x} b^{4}}{8}-\frac {{\mathrm e}^{-4 x} a^{4}}{64}+\frac {{\mathrm e}^{-4 x} a^{3} b}{16}-\frac {3 \,{\mathrm e}^{-4 x} a^{2} b^{2}}{32}+\frac {{\mathrm e}^{-4 x} a \,b^{3}}{16}-\frac {{\mathrm e}^{-4 x} b^{4}}{64}\) | \(199\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 103, normalized size = 1.43 \begin {gather*} a^{3} b \cosh \left (x\right )^{4} + a b^{3} \sinh \left (x\right )^{4} + \frac {1}{64} \, a^{4} {\left (24 \, x + e^{\left (4 \, x\right )} + 8 \, e^{\left (2 \, x\right )} - 8 \, e^{\left (-2 \, x\right )} - e^{\left (-4 \, x\right )}\right )} + \frac {1}{64} \, b^{4} {\left (24 \, x + e^{\left (4 \, x\right )} - 8 \, e^{\left (2 \, x\right )} + 8 \, e^{\left (-2 \, x\right )} - e^{\left (-4 \, x\right )}\right )} - \frac {3}{32} \, a^{2} b^{2} {\left (8 \, x - e^{\left (4 \, x\right )} + 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. 168 vs.
\(2 (66) = 132\).
time = 0.35, size = 168, normalized size = 2.33 \begin {gather*} \frac {1}{8} \, {\left (a^{3} b + a b^{3}\right )} \cosh \left (x\right )^{4} + \frac {1}{8} \, {\left (a^{4} + 6 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{3} + \frac {1}{8} \, {\left (a^{3} b + a b^{3}\right )} \sinh \left (x\right )^{4} + \frac {1}{2} \, {\left (a^{3} b - a b^{3}\right )} \cosh \left (x\right )^{2} + \frac {1}{4} \, {\left (2 \, a^{3} b - 2 \, a b^{3} + 3 \, {\left (a^{3} b + a b^{3}\right )} \cosh \left (x\right )^{2}\right )} \sinh \left (x\right )^{2} + \frac {3}{8} \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} x + \frac {1}{8} \, {\left ({\left (a^{4} + 6 \, a^{2} b^{2} + b^{4}\right )} \cosh \left (x\right )^{3} + 4 \, {\left (a^{4} - b^{4}\right )} \cosh \left (x\right )\right )} \sinh \left (x\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. 265 vs.
\(2 (71) = 142\).
time = 0.16, size = 265, normalized size = 3.68 \begin {gather*} \frac {3 a^{4} x \sinh ^{4}{\left (x \right )}}{8} - \frac {3 a^{4} x \sinh ^{2}{\left (x \right )} \cosh ^{2}{\left (x \right )}}{4} + \frac {3 a^{4} x \cosh ^{4}{\left (x \right )}}{8} - \frac {3 a^{4} \sinh ^{3}{\left (x \right )} \cosh {\left (x \right )}}{8} + \frac {5 a^{4} \sinh {\left (x \right )} \cosh ^{3}{\left (x \right )}}{8} + a^{3} b \cosh ^{4}{\left (x \right )} - \frac {3 a^{2} b^{2} x \sinh ^{4}{\left (x \right )}}{4} + \frac {3 a^{2} b^{2} x \sinh ^{2}{\left (x \right )} \cosh ^{2}{\left (x \right )}}{2} - \frac {3 a^{2} b^{2} x \cosh ^{4}{\left (x \right )}}{4} + \frac {3 a^{2} b^{2} \sinh ^{3}{\left (x \right )} \cosh {\left (x \right )}}{4} + \frac {3 a^{2} b^{2} \sinh {\left (x \right )} \cosh ^{3}{\left (x \right )}}{4} + a b^{3} \sinh ^{4}{\left (x \right )} + \frac {3 b^{4} x \sinh ^{4}{\left (x \right )}}{8} - \frac {3 b^{4} x \sinh ^{2}{\left (x \right )} \cosh ^{2}{\left (x \right )}}{4} + \frac {3 b^{4} x \cosh ^{4}{\left (x \right )}}{8} + \frac {5 b^{4} \sinh ^{3}{\left (x \right )} \cosh {\left (x \right )}}{8} - \frac {3 b^{4} \sinh {\left (x \right )} \cosh ^{3}{\left (x \right )}}{8} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 208 vs.
\(2 (66) = 132\).
time = 0.40, size = 208, normalized size = 2.89 \begin {gather*} \frac {1}{64} \, a^{4} e^{\left (4 \, x\right )} + \frac {1}{16} \, a^{3} b e^{\left (4 \, x\right )} + \frac {3}{32} \, a^{2} b^{2} e^{\left (4 \, x\right )} + \frac {1}{16} \, a b^{3} e^{\left (4 \, x\right )} + \frac {1}{64} \, b^{4} e^{\left (4 \, x\right )} + \frac {1}{8} \, a^{4} e^{\left (2 \, x\right )} + \frac {1}{4} \, a^{3} b e^{\left (2 \, x\right )} - \frac {1}{4} \, a b^{3} e^{\left (2 \, x\right )} - \frac {1}{8} \, b^{4} e^{\left (2 \, x\right )} + \frac {3}{8} \, {\left (a^{4} - 2 \, a^{2} b^{2} + b^{4}\right )} x - \frac {1}{64} \, {\left (18 \, a^{4} e^{\left (4 \, x\right )} - 36 \, a^{2} b^{2} e^{\left (4 \, x\right )} + 18 \, b^{4} e^{\left (4 \, x\right )} + 8 \, a^{4} e^{\left (2 \, x\right )} - 16 \, a^{3} b e^{\left (2 \, x\right )} + 16 \, a b^{3} e^{\left (2 \, x\right )} - 8 \, b^{4} e^{\left (2 \, x\right )} + a^{4} - 4 \, a^{3} b + 6 \, a^{2} b^{2} - 4 \, a b^{3} + b^{4}\right )} e^{\left (-4 \, x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 1.56, size = 143, normalized size = 1.99 \begin {gather*} \mathrm {cosh}\left (x\right )\,{\mathrm {sinh}\left (x\right )}^3\,\left (-\frac {3\,a^4}{8}+\frac {3\,a^2\,b^2}{4}+\frac {5\,b^4}{8}\right )-{\mathrm {cosh}\left (x\right )}^4\,\left (a\,b^3-a^3\,b\right )+{\mathrm {cosh}\left (x\right )}^3\,\mathrm {sinh}\left (x\right )\,\left (\frac {5\,a^4}{8}+\frac {3\,a^2\,b^2}{4}-\frac {3\,b^4}{8}\right )+\frac {3\,x\,{\mathrm {cosh}\left (x\right )}^4\,{\left (a^2-b^2\right )}^2}{8}+\frac {3\,x\,{\mathrm {sinh}\left (x\right )}^4\,{\left (a^2-b^2\right )}^2}{8}+2\,a\,b^3\,{\mathrm {cosh}\left (x\right )}^2\,{\mathrm {sinh}\left (x\right )}^2-\frac {3\,x\,{\mathrm {cosh}\left (x\right )}^2\,{\mathrm {sinh}\left (x\right )}^2\,{\left (a^2-b^2\right )}^2}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________