3.6.84 \(\int (a \cosh (x)+b \sinh (x))^5 \, dx\) [584]

Optimal. Leaf size=61 \[ \left (a^2-b^2\right )^2 (b \cosh (x)+a \sinh (x))+\frac {2}{3} \left (a^2-b^2\right ) (b \cosh (x)+a \sinh (x))^3+\frac {1}{5} (b \cosh (x)+a \sinh (x))^5 \]

[Out]

(a^2-b^2)^2*(b*cosh(x)+a*sinh(x))+2/3*(a^2-b^2)*(b*cosh(x)+a*sinh(x))^3+1/5*(b*cosh(x)+a*sinh(x))^5

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 61, 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 = {3151, 200} \begin {gather*} \frac {2}{3} \left (a^2-b^2\right ) (a \sinh (x)+b \cosh (x))^3+\left (a^2-b^2\right )^2 (a \sinh (x)+b \cosh (x))+\frac {1}{5} (a \sinh (x)+b \cosh (x))^5 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a*Cosh[x] + b*Sinh[x])^5,x]

[Out]

(a^2 - b^2)^2*(b*Cosh[x] + a*Sinh[x]) + (2*(a^2 - b^2)*(b*Cosh[x] + a*Sinh[x])^3)/3 + (b*Cosh[x] + a*Sinh[x])^
5/5

Rule 200

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[ExpandIntegrand[(a + b*x^n)^p, x], x] /; FreeQ[{a, b}, x]
&& IGtQ[n, 0] && IGtQ[p, 0]

Rule 3151

Int[(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int
[(a^2 + b^2 - x^2)^((n - 1)/2), x], x, b*Cos[c + d*x] - a*Sin[c + d*x]], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a
^2 + b^2, 0] && IGtQ[(n - 1)/2, 0]

Rubi steps

\begin {align*} \int (a \cosh (x)+b \sinh (x))^5 \, dx &=i \text {Subst}\left (\int \left (a^2-b^2-x^2\right )^2 \, dx,x,-i b \cosh (x)-i a \sinh (x)\right )\\ &=i \text {Subst}\left (\int \left (a^4 \left (1+\frac {-2 a^2 b^2+b^4}{a^4}\right )-2 a^2 \left (1-\frac {b^2}{a^2}\right ) x^2+x^4\right ) \, dx,x,-i b \cosh (x)-i a \sinh (x)\right )\\ &=\left (a^2-b^2\right )^2 (b \cosh (x)+a \sinh (x))+\frac {2}{3} \left (a^2-b^2\right ) (b \cosh (x)+a \sinh (x))^3+\frac {1}{5} (b \cosh (x)+a \sinh (x))^5\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(133\) vs. \(2(61)=122\).
time = 0.16, size = 133, normalized size = 2.18 \begin {gather*} \frac {1}{240} \left (150 b \left (a^2-b^2\right )^2 \cosh (x)-25 b \left (-3 a^4+2 a^2 b^2+b^4\right ) \cosh (3 x)+3 b \left (5 a^4+10 a^2 b^2+b^4\right ) \cosh (5 x)+150 a \left (a^2-b^2\right )^2 \sinh (x)+25 a \left (a^4+2 a^2 b^2-3 b^4\right ) \sinh (3 x)+3 a \left (a^4+10 a^2 b^2+5 b^4\right ) \sinh (5 x)\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a*Cosh[x] + b*Sinh[x])^5,x]

[Out]

(150*b*(a^2 - b^2)^2*Cosh[x] - 25*b*(-3*a^4 + 2*a^2*b^2 + b^4)*Cosh[3*x] + 3*b*(5*a^4 + 10*a^2*b^2 + b^4)*Cosh
[5*x] + 150*a*(a^2 - b^2)^2*Sinh[x] + 25*a*(a^4 + 2*a^2*b^2 - 3*b^4)*Sinh[3*x] + 3*a*(a^4 + 10*a^2*b^2 + 5*b^4
)*Sinh[5*x])/240

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(361\) vs. \(2(57)=114\).
time = 1.14, size = 362, normalized size = 5.93

method result size
risch \(\frac {5 b^{5} {\mathrm e}^{x}}{16}+\frac {{\mathrm e}^{5 x} a^{4} b}{32}+\frac {{\mathrm e}^{5 x} a^{3} b^{2}}{16}+\frac {{\mathrm e}^{5 x} a^{2} b^{3}}{16}+\frac {{\mathrm e}^{5 x} a \,b^{4}}{32}+\frac {5 \,{\mathrm e}^{3 x} a^{4} b}{32}+\frac {5 \,{\mathrm e}^{3 x} a^{3} b^{2}}{48}-\frac {5 \,{\mathrm e}^{3 x} a^{2} b^{3}}{48}-\frac {5 \,{\mathrm e}^{3 x} a \,b^{4}}{32}+\frac {5 \,{\mathrm e}^{3 x} a^{5}}{96}-\frac {5 \,{\mathrm e}^{3 x} b^{5}}{96}+\frac {5 \,{\mathrm e}^{-x} a^{3} b^{2}}{8}-\frac {5 \,{\mathrm e}^{-x} a^{2} b^{3}}{8}-\frac {5 \,{\mathrm e}^{-x} a \,b^{4}}{16}+\frac {5 \,{\mathrm e}^{-3 x} a^{4} b}{32}-\frac {5 \,{\mathrm e}^{-3 x} a^{3} b^{2}}{48}-\frac {5 \,{\mathrm e}^{-3 x} a^{2} b^{3}}{48}+\frac {5 \,{\mathrm e}^{-3 x} a \,b^{4}}{32}+\frac {{\mathrm e}^{-5 x} a^{4} b}{32}-\frac {{\mathrm e}^{-5 x} a^{3} b^{2}}{16}+\frac {{\mathrm e}^{-5 x} a^{2} b^{3}}{16}-\frac {{\mathrm e}^{-5 x} a \,b^{4}}{32}-\frac {5 a^{3} b^{2} {\mathrm e}^{x}}{8}+\frac {5 b^{4} {\mathrm e}^{x} a}{16}-\frac {5 \,{\mathrm e}^{-x} a^{5}}{16}+\frac {5 \,{\mathrm e}^{-x} b^{5}}{16}+\frac {{\mathrm e}^{5 x} a^{5}}{160}+\frac {{\mathrm e}^{5 x} b^{5}}{160}-\frac {5 \,{\mathrm e}^{-3 x} a^{5}}{96}-\frac {5 \,{\mathrm e}^{-3 x} b^{5}}{96}+\frac {5 \,{\mathrm e}^{x} a^{4} b}{16}-\frac {5 \,{\mathrm e}^{x} a^{2} b^{3}}{8}+\frac {5 \,{\mathrm e}^{-x} a^{4} b}{16}+\frac {5 a^{5} {\mathrm e}^{x}}{16}-\frac {{\mathrm e}^{-5 x} a^{5}}{160}+\frac {{\mathrm e}^{-5 x} b^{5}}{160}\) \(362\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*cosh(x)+b*sinh(x))^5,x,method=_RETURNVERBOSE)

[Out]

5/16*b^5*exp(x)+1/32*exp(5*x)*a^4*b+1/16*exp(5*x)*a^3*b^2+1/16*exp(5*x)*a^2*b^3+1/32*exp(5*x)*a*b^4+5/32*exp(3
*x)*a^4*b+5/48*exp(3*x)*a^3*b^2-5/48*exp(3*x)*a^2*b^3-5/32*exp(3*x)*a*b^4+5/96*exp(3*x)*a^5-5/96*exp(3*x)*b^5+
5/8*exp(-x)*a^3*b^2-5/8*exp(-x)*a^2*b^3-5/16*exp(-x)*a*b^4+5/32*exp(-3*x)*a^4*b-5/48*exp(-3*x)*a^3*b^2-5/48*ex
p(-3*x)*a^2*b^3+5/32*exp(-3*x)*a*b^4+1/32*exp(-5*x)*a^4*b-1/16*exp(-5*x)*a^3*b^2+1/16*exp(-5*x)*a^2*b^3-1/32*e
xp(-5*x)*a*b^4-5/8*a^3*b^2*exp(x)+5/16*b^4*exp(x)*a-5/16*exp(-x)*a^5+5/16*exp(-x)*b^5+1/160*exp(5*x)*a^5+1/160
*exp(5*x)*b^5-5/96*exp(-3*x)*a^5-5/96*exp(-3*x)*b^5+5/16*exp(x)*a^4*b-5/8*exp(x)*a^2*b^3+5/16*exp(-x)*a^4*b+5/
16*a^5*exp(x)-1/160*exp(-5*x)*a^5+1/160*exp(-5*x)*b^5

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 191 vs. \(2 (57) = 114\).
time = 0.27, size = 191, normalized size = 3.13 \begin {gather*} a^{4} b \cosh \left (x\right )^{5} + a b^{4} \sinh \left (x\right )^{5} + \frac {1}{48} \, {\left ({\left (5 \, e^{\left (-2 \, x\right )} - 30 \, e^{\left (-4 \, x\right )} + 3\right )} e^{\left (5 \, x\right )} + 30 \, e^{\left (-x\right )} - 5 \, e^{\left (-3 \, x\right )} - 3 \, e^{\left (-5 \, x\right )}\right )} a^{3} b^{2} - \frac {1}{48} \, {\left ({\left (5 \, e^{\left (-2 \, x\right )} + 30 \, e^{\left (-4 \, x\right )} - 3\right )} e^{\left (5 \, x\right )} + 30 \, e^{\left (-x\right )} + 5 \, e^{\left (-3 \, x\right )} - 3 \, e^{\left (-5 \, x\right )}\right )} a^{2} b^{3} + \frac {1}{480} \, a^{5} {\left (3 \, e^{\left (5 \, x\right )} + 25 \, e^{\left (3 \, x\right )} - 150 \, e^{\left (-x\right )} - 25 \, e^{\left (-3 \, x\right )} - 3 \, e^{\left (-5 \, x\right )} + 150 \, e^{x}\right )} + \frac {1}{480} \, b^{5} {\left (3 \, e^{\left (5 \, x\right )} - 25 \, e^{\left (3 \, x\right )} + 150 \, e^{\left (-x\right )} - 25 \, e^{\left (-3 \, x\right )} + 3 \, e^{\left (-5 \, x\right )} + 150 \, e^{x}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*cosh(x)+b*sinh(x))^5,x, algorithm="maxima")

[Out]

a^4*b*cosh(x)^5 + a*b^4*sinh(x)^5 + 1/48*((5*e^(-2*x) - 30*e^(-4*x) + 3)*e^(5*x) + 30*e^(-x) - 5*e^(-3*x) - 3*
e^(-5*x))*a^3*b^2 - 1/48*((5*e^(-2*x) + 30*e^(-4*x) - 3)*e^(5*x) + 30*e^(-x) + 5*e^(-3*x) - 3*e^(-5*x))*a^2*b^
3 + 1/480*a^5*(3*e^(5*x) + 25*e^(3*x) - 150*e^(-x) - 25*e^(-3*x) - 3*e^(-5*x) + 150*e^x) + 1/480*b^5*(3*e^(5*x
) - 25*e^(3*x) + 150*e^(-x) - 25*e^(-3*x) + 3*e^(-5*x) + 150*e^x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 298 vs. \(2 (57) = 114\).
time = 0.37, size = 298, normalized size = 4.89 \begin {gather*} \frac {1}{80} \, {\left (5 \, a^{4} b + 10 \, a^{2} b^{3} + b^{5}\right )} \cosh \left (x\right )^{5} + \frac {1}{16} \, {\left (5 \, a^{4} b + 10 \, a^{2} b^{3} + b^{5}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{4} + \frac {1}{80} \, {\left (a^{5} + 10 \, a^{3} b^{2} + 5 \, a b^{4}\right )} \sinh \left (x\right )^{5} + \frac {5}{48} \, {\left (3 \, a^{4} b - 2 \, a^{2} b^{3} - b^{5}\right )} \cosh \left (x\right )^{3} + \frac {1}{48} \, {\left (5 \, a^{5} + 10 \, a^{3} b^{2} - 15 \, a b^{4} + 6 \, {\left (a^{5} + 10 \, a^{3} b^{2} + 5 \, a b^{4}\right )} \cosh \left (x\right )^{2}\right )} \sinh \left (x\right )^{3} + \frac {1}{16} \, {\left (2 \, {\left (5 \, a^{4} b + 10 \, a^{2} b^{3} + b^{5}\right )} \cosh \left (x\right )^{3} + 5 \, {\left (3 \, a^{4} b - 2 \, a^{2} b^{3} - b^{5}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )^{2} + \frac {5}{8} \, {\left (a^{4} b - 2 \, a^{2} b^{3} + b^{5}\right )} \cosh \left (x\right ) + \frac {1}{16} \, {\left (10 \, a^{5} - 20 \, a^{3} b^{2} + 10 \, a b^{4} + {\left (a^{5} + 10 \, a^{3} b^{2} + 5 \, a b^{4}\right )} \cosh \left (x\right )^{4} + 5 \, {\left (a^{5} + 2 \, a^{3} b^{2} - 3 \, a b^{4}\right )} \cosh \left (x\right )^{2}\right )} \sinh \left (x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*cosh(x)+b*sinh(x))^5,x, algorithm="fricas")

[Out]

1/80*(5*a^4*b + 10*a^2*b^3 + b^5)*cosh(x)^5 + 1/16*(5*a^4*b + 10*a^2*b^3 + b^5)*cosh(x)*sinh(x)^4 + 1/80*(a^5
+ 10*a^3*b^2 + 5*a*b^4)*sinh(x)^5 + 5/48*(3*a^4*b - 2*a^2*b^3 - b^5)*cosh(x)^3 + 1/48*(5*a^5 + 10*a^3*b^2 - 15
*a*b^4 + 6*(a^5 + 10*a^3*b^2 + 5*a*b^4)*cosh(x)^2)*sinh(x)^3 + 1/16*(2*(5*a^4*b + 10*a^2*b^3 + b^5)*cosh(x)^3
+ 5*(3*a^4*b - 2*a^2*b^3 - b^5)*cosh(x))*sinh(x)^2 + 5/8*(a^4*b - 2*a^2*b^3 + b^5)*cosh(x) + 1/16*(10*a^5 - 20
*a^3*b^2 + 10*a*b^4 + (a^5 + 10*a^3*b^2 + 5*a*b^4)*cosh(x)^4 + 5*(a^5 + 2*a^3*b^2 - 3*a*b^4)*cosh(x)^2)*sinh(x
)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 172 vs. \(2 (56) = 112\).
time = 0.31, size = 172, normalized size = 2.82 \begin {gather*} \frac {8 a^{5} \sinh ^{5}{\left (x \right )}}{15} - \frac {4 a^{5} \sinh ^{3}{\left (x \right )} \cosh ^{2}{\left (x \right )}}{3} + a^{5} \sinh {\left (x \right )} \cosh ^{4}{\left (x \right )} + a^{4} b \cosh ^{5}{\left (x \right )} - \frac {4 a^{3} b^{2} \sinh ^{5}{\left (x \right )}}{3} + \frac {10 a^{3} b^{2} \sinh ^{3}{\left (x \right )} \cosh ^{2}{\left (x \right )}}{3} + \frac {10 a^{2} b^{3} \sinh ^{2}{\left (x \right )} \cosh ^{3}{\left (x \right )}}{3} - \frac {4 a^{2} b^{3} \cosh ^{5}{\left (x \right )}}{3} + a b^{4} \sinh ^{5}{\left (x \right )} + b^{5} \sinh ^{4}{\left (x \right )} \cosh {\left (x \right )} - \frac {4 b^{5} \sinh ^{2}{\left (x \right )} \cosh ^{3}{\left (x \right )}}{3} + \frac {8 b^{5} \cosh ^{5}{\left (x \right )}}{15} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*cosh(x)+b*sinh(x))**5,x)

[Out]

8*a**5*sinh(x)**5/15 - 4*a**5*sinh(x)**3*cosh(x)**2/3 + a**5*sinh(x)*cosh(x)**4 + a**4*b*cosh(x)**5 - 4*a**3*b
**2*sinh(x)**5/3 + 10*a**3*b**2*sinh(x)**3*cosh(x)**2/3 + 10*a**2*b**3*sinh(x)**2*cosh(x)**3/3 - 4*a**2*b**3*c
osh(x)**5/3 + a*b**4*sinh(x)**5 + b**5*sinh(x)**4*cosh(x) - 4*b**5*sinh(x)**2*cosh(x)**3/3 + 8*b**5*cosh(x)**5
/15

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 344 vs. \(2 (57) = 114\).
time = 0.42, size = 344, normalized size = 5.64 \begin {gather*} \frac {1}{160} \, a^{5} e^{\left (5 \, x\right )} + \frac {1}{32} \, a^{4} b e^{\left (5 \, x\right )} + \frac {1}{16} \, a^{3} b^{2} e^{\left (5 \, x\right )} + \frac {1}{16} \, a^{2} b^{3} e^{\left (5 \, x\right )} + \frac {1}{32} \, a b^{4} e^{\left (5 \, x\right )} + \frac {1}{160} \, b^{5} e^{\left (5 \, x\right )} + \frac {5}{96} \, a^{5} e^{\left (3 \, x\right )} + \frac {5}{32} \, a^{4} b e^{\left (3 \, x\right )} + \frac {5}{48} \, a^{3} b^{2} e^{\left (3 \, x\right )} - \frac {5}{48} \, a^{2} b^{3} e^{\left (3 \, x\right )} - \frac {5}{32} \, a b^{4} e^{\left (3 \, x\right )} - \frac {5}{96} \, b^{5} e^{\left (3 \, x\right )} + \frac {5}{16} \, a^{5} e^{x} + \frac {5}{16} \, a^{4} b e^{x} - \frac {5}{8} \, a^{3} b^{2} e^{x} - \frac {5}{8} \, a^{2} b^{3} e^{x} + \frac {5}{16} \, a b^{4} e^{x} + \frac {5}{16} \, b^{5} e^{x} - \frac {1}{480} \, {\left (150 \, a^{5} e^{\left (4 \, x\right )} - 150 \, a^{4} b e^{\left (4 \, x\right )} - 300 \, a^{3} b^{2} e^{\left (4 \, x\right )} + 300 \, a^{2} b^{3} e^{\left (4 \, x\right )} + 150 \, a b^{4} e^{\left (4 \, x\right )} - 150 \, b^{5} e^{\left (4 \, x\right )} + 25 \, a^{5} e^{\left (2 \, x\right )} - 75 \, a^{4} b e^{\left (2 \, x\right )} + 50 \, a^{3} b^{2} e^{\left (2 \, x\right )} + 50 \, a^{2} b^{3} e^{\left (2 \, x\right )} - 75 \, a b^{4} e^{\left (2 \, x\right )} + 25 \, b^{5} e^{\left (2 \, x\right )} + 3 \, a^{5} - 15 \, a^{4} b + 30 \, a^{3} b^{2} - 30 \, a^{2} b^{3} + 15 \, a b^{4} - 3 \, b^{5}\right )} e^{\left (-5 \, x\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a*cosh(x)+b*sinh(x))^5,x, algorithm="giac")

[Out]

1/160*a^5*e^(5*x) + 1/32*a^4*b*e^(5*x) + 1/16*a^3*b^2*e^(5*x) + 1/16*a^2*b^3*e^(5*x) + 1/32*a*b^4*e^(5*x) + 1/
160*b^5*e^(5*x) + 5/96*a^5*e^(3*x) + 5/32*a^4*b*e^(3*x) + 5/48*a^3*b^2*e^(3*x) - 5/48*a^2*b^3*e^(3*x) - 5/32*a
*b^4*e^(3*x) - 5/96*b^5*e^(3*x) + 5/16*a^5*e^x + 5/16*a^4*b*e^x - 5/8*a^3*b^2*e^x - 5/8*a^2*b^3*e^x + 5/16*a*b
^4*e^x + 5/16*b^5*e^x - 1/480*(150*a^5*e^(4*x) - 150*a^4*b*e^(4*x) - 300*a^3*b^2*e^(4*x) + 300*a^2*b^3*e^(4*x)
 + 150*a*b^4*e^(4*x) - 150*b^5*e^(4*x) + 25*a^5*e^(2*x) - 75*a^4*b*e^(2*x) + 50*a^3*b^2*e^(2*x) + 50*a^2*b^3*e
^(2*x) - 75*a*b^4*e^(2*x) + 25*b^5*e^(2*x) + 3*a^5 - 15*a^4*b + 30*a^3*b^2 - 30*a^2*b^3 + 15*a*b^4 - 3*b^5)*e^
(-5*x)

________________________________________________________________________________________

Mupad [B]
time = 0.12, size = 117, normalized size = 1.92 \begin {gather*} {\mathrm {cosh}\left (x\right )}^5\,\left (a^4\,b-\frac {4\,a^2\,b^3}{3}+\frac {8\,b^5}{15}\right )+{\mathrm {sinh}\left (x\right )}^5\,\left (\frac {8\,a^5}{15}-\frac {4\,a^3\,b^2}{3}+a\,b^4\right )-{\mathrm {cosh}\left (x\right )}^2\,{\mathrm {sinh}\left (x\right )}^3\,\left (\frac {4\,a^5}{3}-\frac {10\,a^3\,b^2}{3}\right )+a^5\,{\mathrm {cosh}\left (x\right )}^4\,\mathrm {sinh}\left (x\right )-{\mathrm {cosh}\left (x\right )}^3\,{\mathrm {sinh}\left (x\right )}^2\,\left (\frac {4\,b^5}{3}-\frac {10\,a^2\,b^3}{3}\right )+b^5\,\mathrm {cosh}\left (x\right )\,{\mathrm {sinh}\left (x\right )}^4 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a*cosh(x) + b*sinh(x))^5,x)

[Out]

cosh(x)^5*(a^4*b + (8*b^5)/15 - (4*a^2*b^3)/3) + sinh(x)^5*(a*b^4 + (8*a^5)/15 - (4*a^3*b^2)/3) - cosh(x)^2*si
nh(x)^3*((4*a^5)/3 - (10*a^3*b^2)/3) + a^5*cosh(x)^4*sinh(x) - cosh(x)^3*sinh(x)^2*((4*b^5)/3 - (10*a^2*b^3)/3
) + b^5*cosh(x)*sinh(x)^4

________________________________________________________________________________________