### 3.746 $$\int (a+a \cosh (x)+c \sinh (x))^3 \, dx$$

Optimal. Leaf size=105 $\frac{1}{2} a x \left (5 a^2-3 c^2\right )+\frac{1}{6} a \left (15 a^2-4 c^2\right ) \sinh (x)+\frac{1}{6} c \left (15 a^2-4 c^2\right ) \cosh (x)+\frac{5}{6} \left (a^2 \sinh (x)+a c \cosh (x)\right ) (a \cosh (x)+a+c \sinh (x))+\frac{1}{3} (a \sinh (x)+c \cosh (x)) (a \cosh (x)+a+c \sinh (x))^2$

[Out]

(a*(5*a^2 - 3*c^2)*x)/2 + (c*(15*a^2 - 4*c^2)*Cosh[x])/6 + (a*(15*a^2 - 4*c^2)*Sinh[x])/6 + (5*(a*c*Cosh[x] +
a^2*Sinh[x])*(a + a*Cosh[x] + c*Sinh[x]))/6 + ((c*Cosh[x] + a*Sinh[x])*(a + a*Cosh[x] + c*Sinh[x])^2)/3

________________________________________________________________________________________

Rubi [A]  time = 0.116252, antiderivative size = 105, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 12, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.333, Rules used = {3120, 3146, 2637, 2638} $\frac{1}{2} a x \left (5 a^2-3 c^2\right )+\frac{1}{6} a \left (15 a^2-4 c^2\right ) \sinh (x)+\frac{1}{6} c \left (15 a^2-4 c^2\right ) \cosh (x)+\frac{5}{6} \left (a^2 \sinh (x)+a c \cosh (x)\right ) (a \cosh (x)+a+c \sinh (x))+\frac{1}{3} (a \sinh (x)+c \cosh (x)) (a \cosh (x)+a+c \sinh (x))^2$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(a*(5*a^2 - 3*c^2)*x)/2 + (c*(15*a^2 - 4*c^2)*Cosh[x])/6 + (a*(15*a^2 - 4*c^2)*Sinh[x])/6 + (5*(a*c*Cosh[x] +
a^2*Sinh[x])*(a + a*Cosh[x] + c*Sinh[x]))/6 + ((c*Cosh[x] + a*Sinh[x])*(a + a*Cosh[x] + c*Sinh[x])^2)/3

Rule 3120

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

Rule 3146

Int[(cos[(d_.) + (e_.)*(x_)]*(b_.) + (a_) + (c_.)*sin[(d_.) + (e_.)*(x_)])^(n_.)*((A_.) + cos[(d_.) + (e_.)*(x
_)]*(B_.) + (C_.)*sin[(d_.) + (e_.)*(x_)]), x_Symbol] :> Simp[((B*c - b*C - a*C*Cos[d + e*x] + a*B*Sin[d + e*x
])*(a + b*Cos[d + e*x] + c*Sin[d + e*x])^n)/(a*e*(n + 1)), x] + Dist[1/(a*(n + 1)), Int[(a + b*Cos[d + e*x] +
c*Sin[d + e*x])^(n - 1)*Simp[a*(b*B + c*C)*n + a^2*A*(n + 1) + (n*(a^2*B - B*c^2 + b*c*C) + a*b*A*(n + 1))*Cos
[d + e*x] + (n*(b*B*c + a^2*C - b^2*C) + a*c*A*(n + 1))*Sin[d + e*x], x], x], x] /; FreeQ[{a, b, c, d, e, A, B
, C}, x] && GtQ[n, 0] && NeQ[a^2 - b^2 - c^2, 0]

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

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

Mathematica [A]  time = 0.163128, size = 112, normalized size = 1.07 $\frac{1}{12} \left (-9 c \left (c^2-5 a^2\right ) \cosh (x)+18 a^2 c \cosh (2 x)+3 a^2 c \cosh (3 x)+30 a^3 x+45 a^3 \sinh (x)+9 a^3 \sinh (2 x)+a^3 \sinh (3 x)-18 a c^2 x-9 a c^2 \sinh (x)+9 a c^2 \sinh (2 x)+3 a c^2 \sinh (3 x)+c^3 \cosh (3 x)\right )$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(30*a^3*x - 18*a*c^2*x - 9*c*(-5*a^2 + c^2)*Cosh[x] + 18*a^2*c*Cosh[2*x] + 3*a^2*c*Cosh[3*x] + c^3*Cosh[3*x] +
45*a^3*Sinh[x] - 9*a*c^2*Sinh[x] + 9*a^3*Sinh[2*x] + 9*a*c^2*Sinh[2*x] + a^3*Sinh[3*x] + 3*a*c^2*Sinh[3*x])/1
2

________________________________________________________________________________________

Maple [A]  time = 0.035, size = 129, normalized size = 1.2 \begin{align*}{a}^{3}x+3\,{a}^{3}\sinh \left ( x \right ) +3\,{a}^{2}c\cosh \left ( x \right ) +3\,{a}^{3} \left ( 1/2\,\cosh \left ( x \right ) \sinh \left ( x \right ) +x/2 \right ) +3\,{a}^{2}c \left ( \cosh \left ( x \right ) \right ) ^{2}+3\,a{c}^{2} \left ( 1/2\,\cosh \left ( x \right ) \sinh \left ( x \right ) -x/2 \right ) +{a}^{3} \left ({\frac{2}{3}}+{\frac{ \left ( \cosh \left ( x \right ) \right ) ^{2}}{3}} \right ) \sinh \left ( x \right ) +3\,{a}^{2}c \left ( 1/3\,\cosh \left ( x \right ) \left ( \sinh \left ( x \right ) \right ) ^{2}+1/3\,\cosh \left ( x \right ) \right ) +3\,a{c}^{2} \left ( 1/3\,\sinh \left ( x \right ) \left ( \cosh \left ( x \right ) \right ) ^{2}-1/3\,\sinh \left ( x \right ) \right ) +{c}^{3} \left ( -{\frac{2}{3}}+{\frac{ \left ( \sinh \left ( x \right ) \right ) ^{2}}{3}} \right ) \cosh \left ( x \right ) \end{align*}

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

[In]

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

[Out]

a^3*x+3*a^3*sinh(x)+3*a^2*c*cosh(x)+3*a^3*(1/2*cosh(x)*sinh(x)+1/2*x)+3*a^2*c*cosh(x)^2+3*a*c^2*(1/2*cosh(x)*s
inh(x)-1/2*x)+a^3*(2/3+1/3*cosh(x)^2)*sinh(x)+3*a^2*c*(1/3*cosh(x)*sinh(x)^2+1/3*cosh(x))+3*a*c^2*(1/3*sinh(x)
*cosh(x)^2-1/3*sinh(x))+c^3*(-2/3+1/3*sinh(x)^2)*cosh(x)

________________________________________________________________________________________

Maxima [A]  time = 1.0289, size = 185, normalized size = 1.76 \begin{align*} a^{2} c \cosh \left (x\right )^{3} + a c^{2} \sinh \left (x\right )^{3} + a^{3} x + \frac{1}{24} \, c^{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 )} + 3 \,{\left (c \cosh \left (x\right ) + a \sinh \left (x\right )\right )} a^{2} + \frac{3}{8} \,{\left (8 \, a c \cosh \left (x\right )^{2} + a^{2}{\left (4 \, x + e^{\left (2 \, x\right )} - e^{\left (-2 \, x\right )}\right )} - c^{2}{\left (4 \, x - e^{\left (2 \, x\right )} + e^{\left (-2 \, x\right )}\right )}\right )} a \end{align*}

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

[In]

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

[Out]

a^2*c*cosh(x)^3 + a*c^2*sinh(x)^3 + a^3*x + 1/24*c^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) + 3*(c*cosh(x) + a*sinh(x))*a^2 + 3/8*(8*a*c*cosh(x)^2 + a^2*(4*x + e^(2*x)
- e^(-2*x)) - c^2*(4*x - e^(2*x) + e^(-2*x)))*a

________________________________________________________________________________________

Fricas [A]  time = 2.41206, size = 381, normalized size = 3.63 \begin{align*} \frac{3}{2} \, a^{2} c \cosh \left (x\right )^{2} + \frac{1}{12} \,{\left (3 \, a^{2} c + c^{3}\right )} \cosh \left (x\right )^{3} + \frac{1}{12} \,{\left (a^{3} + 3 \, a c^{2}\right )} \sinh \left (x\right )^{3} + \frac{1}{4} \,{\left (6 \, a^{2} c +{\left (3 \, a^{2} c + c^{3}\right )} \cosh \left (x\right )\right )} \sinh \left (x\right )^{2} + \frac{1}{2} \,{\left (5 \, a^{3} - 3 \, a c^{2}\right )} x + \frac{3}{4} \,{\left (5 \, a^{2} c - c^{3}\right )} \cosh \left (x\right ) + \frac{1}{4} \,{\left (15 \, a^{3} - 3 \, a c^{2} +{\left (a^{3} + 3 \, a c^{2}\right )} \cosh \left (x\right )^{2} + 6 \,{\left (a^{3} + a c^{2}\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+a*cosh(x)+c*sinh(x))^3,x, algorithm="fricas")

[Out]

3/2*a^2*c*cosh(x)^2 + 1/12*(3*a^2*c + c^3)*cosh(x)^3 + 1/12*(a^3 + 3*a*c^2)*sinh(x)^3 + 1/4*(6*a^2*c + (3*a^2*
c + c^3)*cosh(x))*sinh(x)^2 + 1/2*(5*a^3 - 3*a*c^2)*x + 3/4*(5*a^2*c - c^3)*cosh(x) + 1/4*(15*a^3 - 3*a*c^2 +
(a^3 + 3*a*c^2)*cosh(x)^2 + 6*(a^3 + a*c^2)*cosh(x))*sinh(x)

________________________________________________________________________________________

Sympy [A]  time = 1.06227, size = 189, normalized size = 1.8 \begin{align*} - \frac{3 a^{3} x \sinh ^{2}{\left (x \right )}}{2} + \frac{3 a^{3} x \cosh ^{2}{\left (x \right )}}{2} + a^{3} x - \frac{2 a^{3} \sinh ^{3}{\left (x \right )}}{3} + a^{3} \sinh{\left (x \right )} \cosh ^{2}{\left (x \right )} + \frac{3 a^{3} \sinh{\left (x \right )} \cosh{\left (x \right )}}{2} + 3 a^{3} \sinh{\left (x \right )} + 3 a^{2} c \sinh ^{2}{\left (x \right )} + a^{2} c \cosh ^{3}{\left (x \right )} + 3 a^{2} c \cosh{\left (x \right )} + \frac{3 a c^{2} x \sinh ^{2}{\left (x \right )}}{2} - \frac{3 a c^{2} x \cosh ^{2}{\left (x \right )}}{2} + a c^{2} \sinh ^{3}{\left (x \right )} + \frac{3 a c^{2} \sinh{\left (x \right )} \cosh{\left (x \right )}}{2} + c^{3} \sinh ^{2}{\left (x \right )} \cosh{\left (x \right )} - \frac{2 c^{3} \cosh ^{3}{\left (x \right )}}{3} \end{align*}

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

[In]

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

[Out]

-3*a**3*x*sinh(x)**2/2 + 3*a**3*x*cosh(x)**2/2 + a**3*x - 2*a**3*sinh(x)**3/3 + a**3*sinh(x)*cosh(x)**2 + 3*a*
*3*sinh(x)*cosh(x)/2 + 3*a**3*sinh(x) + 3*a**2*c*sinh(x)**2 + a**2*c*cosh(x)**3 + 3*a**2*c*cosh(x) + 3*a*c**2*
x*sinh(x)**2/2 - 3*a*c**2*x*cosh(x)**2/2 + a*c**2*sinh(x)**3 + 3*a*c**2*sinh(x)*cosh(x)/2 + c**3*sinh(x)**2*co
sh(x) - 2*c**3*cosh(x)**3/3

________________________________________________________________________________________

Giac [A]  time = 1.11794, size = 251, normalized size = 2.39 \begin{align*} \frac{1}{24} \, a^{3} e^{\left (3 \, x\right )} + \frac{1}{8} \, a^{2} c e^{\left (3 \, x\right )} + \frac{1}{8} \, a c^{2} e^{\left (3 \, x\right )} + \frac{1}{24} \, c^{3} e^{\left (3 \, x\right )} + \frac{3}{8} \, a^{3} e^{\left (2 \, x\right )} + \frac{3}{4} \, a^{2} c e^{\left (2 \, x\right )} + \frac{3}{8} \, a c^{2} e^{\left (2 \, x\right )} + \frac{15}{8} \, a^{3} e^{x} + \frac{15}{8} \, a^{2} c e^{x} - \frac{3}{8} \, a c^{2} e^{x} - \frac{3}{8} \, c^{3} e^{x} + \frac{1}{2} \,{\left (5 \, a^{3} - 3 \, a c^{2}\right )} x - \frac{1}{24} \,{\left (a^{3} - 3 \, a^{2} c + 3 \, a c^{2} - c^{3} + 9 \,{\left (5 \, a^{3} - 5 \, a^{2} c - a c^{2} + c^{3}\right )} e^{\left (2 \, x\right )} + 9 \,{\left (a^{3} - 2 \, a^{2} c + a c^{2}\right )} e^{x}\right )} e^{\left (-3 \, x\right )} \end{align*}

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

[In]

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

[Out]

1/24*a^3*e^(3*x) + 1/8*a^2*c*e^(3*x) + 1/8*a*c^2*e^(3*x) + 1/24*c^3*e^(3*x) + 3/8*a^3*e^(2*x) + 3/4*a^2*c*e^(2
*x) + 3/8*a*c^2*e^(2*x) + 15/8*a^3*e^x + 15/8*a^2*c*e^x - 3/8*a*c^2*e^x - 3/8*c^3*e^x + 1/2*(5*a^3 - 3*a*c^2)*
x - 1/24*(a^3 - 3*a^2*c + 3*a*c^2 - c^3 + 9*(5*a^3 - 5*a^2*c - a*c^2 + c^3)*e^(2*x) + 9*(a^3 - 2*a^2*c + a*c^2
)*e^x)*e^(-3*x)