### 3.582 $$\int (a \cosh (x)+b \sinh (x))^3 \, dx$$

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0248492, antiderivative size = 35, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 11, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.091, Rules used = {3072} $\left (a^2-b^2\right ) (a \sinh (x)+b \cosh (x))+\frac{1}{3} (a \sinh (x)+b \cosh (x))^3$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 3072

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))^3 \, dx &=i \operatorname{Subst}\left (\int \left (a^2-b^2-x^2\right ) \, dx,x,-i b \cosh (x)-i a \sinh (x)\right )\\ &=\left (a^2-b^2\right ) (b \cosh (x)+a \sinh (x))+\frac{1}{3} (b \cosh (x)+a \sinh (x))^3\\ \end{align*}

Mathematica [A]  time = 0.126669, size = 63, normalized size = 1.8 $\frac{1}{12} \left (9 a \left (a^2-b^2\right ) \sinh (x)+a \left (a^2+3 b^2\right ) \sinh (3 x)+9 b \left (a^2-b^2\right ) \cosh (x)+b \left (3 a^2+b^2\right ) \cosh (3 x)\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [B]  time = 0.025, size = 68, normalized size = 1.9 \begin{align*}{b}^{3} \left ( -{\frac{2}{3}}+{\frac{ \left ( \sinh \left ( x \right ) \right ) ^{2}}{3}} \right ) \cosh \left ( x \right ) +3\,a{b}^{2} \left ( 1/3\,\sinh \left ( x \right ) \left ( \cosh \left ( x \right ) \right ) ^{2}-1/3\,\sinh \left ( x \right ) \right ) +3\,{a}^{2}b \left ( 1/3\,\cosh \left ( x \right ) \left ( \sinh \left ( x \right ) \right ) ^{2}+1/3\,\cosh \left ( x \right ) \right ) +{a}^{3} \left ({\frac{2}{3}}+{\frac{ \left ( \cosh \left ( x \right ) \right ) ^{2}}{3}} \right ) \sinh \left ( x \right ) \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [B]  time = 1.01723, size = 93, normalized size = 2.66 \begin{align*} a^{2} b \cosh \left (x\right )^{3} + a b^{2} \sinh \left (x\right )^{3} + \frac{1}{24} \, b^{3}{\left (e^{\left (3 \, x\right )} - 9 \, e^{\left (-x\right )} + e^{\left (-3 \, x\right )} - 9 \, e^{x}\right )} + \frac{1}{24} \, a^{3}{\left (e^{\left (3 \, x\right )} - 9 \, e^{\left (-x\right )} - e^{\left (-3 \, x\right )} + 9 \, e^{x}\right )} \end{align*}

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

[In]

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

[Out]

a^2*b*cosh(x)^3 + a*b^2*sinh(x)^3 + 1/24*b^3*(e^(3*x) - 9*e^(-x) + e^(-3*x) - 9*e^x) + 1/24*a^3*(e^(3*x) - 9*e
^(-x) - e^(-3*x) + 9*e^x)

________________________________________________________________________________________

Fricas [B]  time = 2.38148, size = 261, normalized size = 7.46 \begin{align*} \frac{1}{12} \,{\left (3 \, a^{2} b + b^{3}\right )} \cosh \left (x\right )^{3} + \frac{1}{4} \,{\left (3 \, a^{2} b + b^{3}\right )} \cosh \left (x\right ) \sinh \left (x\right )^{2} + \frac{1}{12} \,{\left (a^{3} + 3 \, a b^{2}\right )} \sinh \left (x\right )^{3} + \frac{3}{4} \,{\left (a^{2} b - b^{3}\right )} \cosh \left (x\right ) + \frac{1}{4} \,{\left (3 \, a^{3} - 3 \, a b^{2} +{\left (a^{3} + 3 \, a b^{2}\right )} \cosh \left (x\right )^{2}\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))^3,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [B]  time = 0.43813, size = 66, normalized size = 1.89 \begin{align*} - \frac{2 a^{3} \sinh ^{3}{\left (x \right )}}{3} + a^{3} \sinh{\left (x \right )} \cosh ^{2}{\left (x \right )} + a^{2} b \cosh ^{3}{\left (x \right )} + a b^{2} \sinh ^{3}{\left (x \right )} + b^{3} \sinh ^{2}{\left (x \right )} \cosh{\left (x \right )} - \frac{2 b^{3} \cosh ^{3}{\left (x \right )}}{3} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [B]  time = 1.14039, size = 181, normalized size = 5.17 \begin{align*} \frac{1}{24} \, a^{3} e^{\left (3 \, x\right )} + \frac{1}{8} \, a^{2} b e^{\left (3 \, x\right )} + \frac{1}{8} \, a b^{2} e^{\left (3 \, x\right )} + \frac{1}{24} \, b^{3} e^{\left (3 \, x\right )} + \frac{3}{8} \, a^{3} e^{x} + \frac{3}{8} \, a^{2} b e^{x} - \frac{3}{8} \, a b^{2} e^{x} - \frac{3}{8} \, b^{3} e^{x} - \frac{1}{24} \,{\left (9 \, a^{3} e^{\left (2 \, x\right )} - 9 \, a^{2} b e^{\left (2 \, x\right )} - 9 \, a b^{2} e^{\left (2 \, x\right )} + 9 \, b^{3} e^{\left (2 \, x\right )} + a^{3} - 3 \, a^{2} b + 3 \, a b^{2} - b^{3}\right )} e^{\left (-3 \, x\right )} \end{align*}

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

[In]

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

[Out]

1/24*a^3*e^(3*x) + 1/8*a^2*b*e^(3*x) + 1/8*a*b^2*e^(3*x) + 1/24*b^3*e^(3*x) + 3/8*a^3*e^x + 3/8*a^2*b*e^x - 3/
8*a*b^2*e^x - 3/8*b^3*e^x - 1/24*(9*a^3*e^(2*x) - 9*a^2*b*e^(2*x) - 9*a*b^2*e^(2*x) + 9*b^3*e^(2*x) + a^3 - 3*
a^2*b + 3*a*b^2 - b^3)*e^(-3*x)