### 3.583 $$\int (a \cosh (x)+b \sinh (x))^4 \, dx$$

Optimal. Leaf size=72 $\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$

[Out]

(3*(a^2 - b^2)^2*x)/8 + (3*(a^2 - b^2)*(b*Cosh[x] + a*Sinh[x])*(a*Cosh[x] + b*Sinh[x]))/8 + ((b*Cosh[x] + a*Si
nh[x])*(a*Cosh[x] + b*Sinh[x])^3)/4

________________________________________________________________________________________

Rubi [A]  time = 0.037078, antiderivative size = 72, normalized size of antiderivative = 1., 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 = {3073, 8} $\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$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(3*(a^2 - b^2)^2*x)/8 + (3*(a^2 - b^2)*(b*Cosh[x] + a*Sinh[x])*(a*Cosh[x] + b*Sinh[x]))/8 + ((b*Cosh[x] + a*Si
nh[x])*(a*Cosh[x] + b*Sinh[x])^3)/4

Rule 3073

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

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

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.14543, size = 87, normalized size = 1.21 $\frac{1}{32} \left (8 \left (a^4-b^4\right ) \sinh (2 x)+\left (6 a^2 b^2+a^4+b^4\right ) \sinh (4 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)+12 x (a-b)^2 (a+b)^2\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(12*(a - b)^2*(a + b)^2*x + 16*a*b*(a^2 - b^2)*Cosh[2*x] + 4*a*b*(a^2 + b^2)*Cosh[4*x] + 8*(a^4 - b^4)*Sinh[2*
x] + (a^4 + 6*a^2*b^2 + b^4)*Sinh[4*x])/32

________________________________________________________________________________________

Maple [A]  time = 0.027, size = 118, normalized size = 1.6 \begin{align*}{b}^{4} \left ( \left ({\frac{ \left ( \sinh \left ( x \right ) \right ) ^{3}}{4}}-{\frac{3\,\sinh \left ( x \right ) }{8}} \right ) \cosh \left ( x \right ) +{\frac{3\,x}{8}} \right ) +4\,a{b}^{3} \left ( 1/4\, \left ( \sinh \left ( x \right ) \right ) ^{2} \left ( \cosh \left ( x \right ) \right ) ^{2}-1/4\, \left ( \cosh \left ( x \right ) \right ) ^{2} \right ) +6\,{a}^{2}{b}^{2} \left ( 1/4\,\sinh \left ( x \right ) \left ( \cosh \left ( x \right ) \right ) ^{3}-1/8\,\cosh \left ( x \right ) \sinh \left ( x \right ) -x/8 \right ) +4\,{a}^{3}b \left ( 1/4\, \left ( \sinh \left ( x \right ) \right ) ^{2} \left ( \cosh \left ( x \right ) \right ) ^{2}+1/4\, \left ( \cosh \left ( x \right ) \right ) ^{2} \right ) +{a}^{4} \left ( \left ({\frac{ \left ( \cosh \left ( x \right ) \right ) ^{3}}{4}}+{\frac{3\,\cosh \left ( x \right ) }{8}} \right ) \sinh \left ( x \right ) +{\frac{3\,x}{8}} \right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

b^4*((1/4*sinh(x)^3-3/8*sinh(x))*cosh(x)+3/8*x)+4*a*b^3*(1/4*sinh(x)^2*cosh(x)^2-1/4*cosh(x)^2)+6*a^2*b^2*(1/4
*sinh(x)*cosh(x)^3-1/8*cosh(x)*sinh(x)-1/8*x)+4*a^3*b*(1/4*sinh(x)^2*cosh(x)^2+1/4*cosh(x)^2)+a^4*((1/4*cosh(x
)^3+3/8*cosh(x))*sinh(x)+3/8*x)

________________________________________________________________________________________

Maxima [A]  time = 1.07815, size = 139, normalized size = 1.93 \begin{align*} 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{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

a^3*b*cosh(x)^4 + a*b^3*sinh(x)^4 + 1/64*a^4*(24*x + e^(4*x) + 8*e^(2*x) - 8*e^(-2*x) - e^(-4*x)) + 1/64*b^4*(
24*x + e^(4*x) - 8*e^(2*x) + 8*e^(-2*x) - e^(-4*x)) - 3/32*a^2*b^2*(8*x - e^(4*x) + e^(-4*x))

________________________________________________________________________________________

Fricas [B]  time = 2.35033, size = 425, normalized size = 5.9 \begin{align*} \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{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/8*(a^3*b + a*b^3)*cosh(x)^4 + 1/8*(a^4 + 6*a^2*b^2 + b^4)*cosh(x)*sinh(x)^3 + 1/8*(a^3*b + a*b^3)*sinh(x)^4
+ 1/2*(a^3*b - a*b^3)*cosh(x)^2 + 1/4*(2*a^3*b - 2*a*b^3 + 3*(a^3*b + a*b^3)*cosh(x)^2)*sinh(x)^2 + 3/8*(a^4 -
2*a^2*b^2 + b^4)*x + 1/8*((a^4 + 6*a^2*b^2 + b^4)*cosh(x)^3 + 4*(a^4 - b^4)*cosh(x))*sinh(x)

________________________________________________________________________________________

Sympy [B]  time = 0.946163, size = 265, normalized size = 3.68 \begin{align*} \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{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

3*a**4*x*sinh(x)**4/8 - 3*a**4*x*sinh(x)**2*cosh(x)**2/4 + 3*a**4*x*cosh(x)**4/8 - 3*a**4*sinh(x)**3*cosh(x)/8
+ 5*a**4*sinh(x)*cosh(x)**3/8 + a**3*b*cosh(x)**4 - 3*a**2*b**2*x*sinh(x)**4/4 + 3*a**2*b**2*x*sinh(x)**2*cos
h(x)**2/2 - 3*a**2*b**2*x*cosh(x)**4/4 + 3*a**2*b**2*sinh(x)**3*cosh(x)/4 + 3*a**2*b**2*sinh(x)*cosh(x)**3/4 +
a*b**3*sinh(x)**4 + 3*b**4*x*sinh(x)**4/8 - 3*b**4*x*sinh(x)**2*cosh(x)**2/4 + 3*b**4*x*cosh(x)**4/8 + 5*b**4
*sinh(x)**3*cosh(x)/8 - 3*b**4*sinh(x)*cosh(x)**3/8

________________________________________________________________________________________

Giac [B]  time = 1.14752, size = 281, normalized size = 3.9 \begin{align*} \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{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/64*a^4*e^(4*x) + 1/16*a^3*b*e^(4*x) + 3/32*a^2*b^2*e^(4*x) + 1/16*a*b^3*e^(4*x) + 1/64*b^4*e^(4*x) + 1/8*a^4
*e^(2*x) + 1/4*a^3*b*e^(2*x) - 1/4*a*b^3*e^(2*x) - 1/8*b^4*e^(2*x) + 3/8*(a^4 - 2*a^2*b^2 + b^4)*x - 1/64*(18*
a^4*e^(4*x) - 36*a^2*b^2*e^(4*x) + 18*b^4*e^(4*x) + 8*a^4*e^(2*x) - 16*a^3*b*e^(2*x) + 16*a*b^3*e^(2*x) - 8*b^
4*e^(2*x) + a^4 - 4*a^3*b + 6*a^2*b^2 - 4*a*b^3 + b^4)*e^(-4*x)