3.740 \(\int (a+b \cosh (x)+c \sinh (x))^2 \, dx\)

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 59, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3120, 2637, 2638} \[ \frac {1}{2} x \left (2 a^2+b^2-c^2\right )+\frac {1}{2} (b \sinh (x)+c \cosh (x)) (a+b \cosh (x)+c \sinh (x))+\frac {3}{2} a b \sinh (x)+\frac {3}{2} a c \cosh (x) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

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]

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]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.09, size = 54, normalized size = 0.92 \[ \frac {1}{4} \left (2 x \left (2 a^2+b^2-c^2\right )+8 a b \sinh (x)+8 a c \cosh (x)+\left (b^2+c^2\right ) \sinh (2 x)+2 b c \cosh (2 x)\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.49, size = 59, normalized size = 1.00 \[ \frac {1}{2} \, b c \cosh \relax (x)^{2} + \frac {1}{2} \, b c \sinh \relax (x)^{2} + 2 \, a c \cosh \relax (x) + \frac {1}{2} \, {\left (2 \, a^{2} + b^{2} - c^{2}\right )} x + \frac {1}{2} \, {\left (4 \, a b + {\left (b^{2} + c^{2}\right )} \cosh \relax (x)\right )} \sinh \relax (x) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*b*c*cosh(x)^2 + 1/2*b*c*sinh(x)^2 + 2*a*c*cosh(x) + 1/2*(2*a^2 + b^2 - c^2)*x + 1/2*(4*a*b + (b^2 + c^2)*c
osh(x))*sinh(x)

________________________________________________________________________________________

giac [A]  time = 0.11, size = 83, normalized size = 1.41 \[ \frac {1}{8} \, b^{2} e^{\left (2 \, x\right )} + \frac {1}{4} \, b c e^{\left (2 \, x\right )} + \frac {1}{8} \, c^{2} e^{\left (2 \, x\right )} + a b e^{x} + a c e^{x} + \frac {1}{2} \, {\left (2 \, a^{2} + b^{2} - c^{2}\right )} x - \frac {1}{8} \, {\left (b^{2} - 2 \, b c + c^{2} + 8 \, {\left (a b - a c\right )} e^{x}\right )} e^{\left (-2 \, x\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/8*b^2*e^(2*x) + 1/4*b*c*e^(2*x) + 1/8*c^2*e^(2*x) + a*b*e^x + a*c*e^x + 1/2*(2*a^2 + b^2 - c^2)*x - 1/8*(b^2
 - 2*b*c + c^2 + 8*(a*b - a*c)*e^x)*e^(-2*x)

________________________________________________________________________________________

maple [A]  time = 0.15, size = 54, normalized size = 0.92 \[ a^{2} x +2 a b \sinh \relax (x )+2 a c \cosh \relax (x )+b^{2} \left (\frac {\cosh \relax (x ) \sinh \relax (x )}{2}+\frac {x}{2}\right )+c b \left (\cosh ^{2}\relax (x )\right )+c^{2} \left (\frac {\cosh \relax (x ) \sinh \relax (x )}{2}-\frac {x}{2}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.50, size = 63, normalized size = 1.07 \[ b c \cosh \relax (x)^{2} + \frac {1}{8} \, b^{2} {\left (4 \, x + e^{\left (2 \, x\right )} - e^{\left (-2 \, x\right )}\right )} - \frac {1}{8} \, c^{2} {\left (4 \, x - e^{\left (2 \, x\right )} + e^{\left (-2 \, x\right )}\right )} + a^{2} x + 2 \, {\left (c \cosh \relax (x) + b \sinh \relax (x)\right )} a \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 1.54, size = 55, normalized size = 0.93 \[ x\,a^2+2\,\mathrm {sinh}\relax (x)\,a\,b+2\,a\,c\,\mathrm {cosh}\relax (x)+\frac {\mathrm {sinh}\relax (x)\,b^2\,\mathrm {cosh}\relax (x)}{2}+\frac {x\,b^2}{2}+b\,c\,{\mathrm {cosh}\relax (x)}^2+\frac {\mathrm {sinh}\relax (x)\,c^2\,\mathrm {cosh}\relax (x)}{2}-\frac {x\,c^2}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.21, size = 100, normalized size = 1.69 \[ a^{2} x + 2 a b \sinh {\relax (x )} + 2 a c \cosh {\relax (x )} - \frac {b^{2} x \sinh ^{2}{\relax (x )}}{2} + \frac {b^{2} x \cosh ^{2}{\relax (x )}}{2} + \frac {b^{2} \sinh {\relax (x )} \cosh {\relax (x )}}{2} + b c \cosh ^{2}{\relax (x )} + \frac {c^{2} x \sinh ^{2}{\relax (x )}}{2} - \frac {c^{2} x \cosh ^{2}{\relax (x )}}{2} + \frac {c^{2} \sinh {\relax (x )} \cosh {\relax (x )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*cosh(x)+c*sinh(x))**2,x)

[Out]

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

________________________________________________________________________________________