### 3.955 $$\int e^{c+d x} \cosh ^2(a+b x) \, dx$$

Optimal. Leaf size=95 $-\frac{d e^{c+d x} \cosh ^2(a+b x)}{4 b^2-d^2}+\frac{2 b e^{c+d x} \sinh (a+b x) \cosh (a+b x)}{4 b^2-d^2}+\frac{2 b^2 e^{c+d x}}{d \left (4 b^2-d^2\right )}$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0359479, antiderivative size = 95, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 16, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.125, Rules used = {5477, 2194} $-\frac{d e^{c+d x} \cosh ^2(a+b x)}{4 b^2-d^2}+\frac{2 b e^{c+d x} \sinh (a+b x) \cosh (a+b x)}{4 b^2-d^2}+\frac{2 b^2 e^{c+d x}}{d \left (4 b^2-d^2\right )}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 5477

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

Rule 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rubi steps

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

Mathematica [A]  time = 0.141704, size = 55, normalized size = 0.58 $\frac{e^{c+d x} \left (d^2 \cosh (2 (a+b x))-2 b d \sinh (2 (a+b x))-4 b^2+d^2\right )}{2 d^3-8 b^2 d}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.007, size = 124, normalized size = 1.3 \begin{align*}{\frac{\sinh \left ( dx+c \right ) }{2\,d}}+{\frac{\sinh \left ( 2\,a-c+ \left ( 2\,b-d \right ) x \right ) }{8\,b-4\,d}}+{\frac{\sinh \left ( 2\,a+c+ \left ( 2\,b+d \right ) x \right ) }{8\,b+4\,d}}+{\frac{\cosh \left ( dx+c \right ) }{2\,d}}-{\frac{\cosh \left ( 2\,a-c+ \left ( 2\,b-d \right ) x \right ) }{8\,b-4\,d}}+{\frac{\cosh \left ( 2\,a+c+ \left ( 2\,b+d \right ) x \right ) }{8\,b+4\,d}} \end{align*}

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

[In]

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

[Out]

1/2*sinh(d*x+c)/d+1/4*sinh(2*a-c+(2*b-d)*x)/(2*b-d)+1/4*sinh(2*a+c+(2*b+d)*x)/(2*b+d)+1/2*cosh(d*x+c)/d-1/4*co
sh(2*a-c+(2*b-d)*x)/(2*b-d)+1/4*cosh(2*a+c+(2*b+d)*x)/(2*b+d)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

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

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.0804, size = 433, normalized size = 4.56 \begin{align*} \frac{4 \, b d \cosh \left (b x + a\right ) \cosh \left (d x + c\right ) \sinh \left (b x + a\right ) - d^{2} \cosh \left (d x + c\right ) \sinh \left (b x + a\right )^{2} -{\left (d^{2} \cosh \left (b x + a\right )^{2} - 4 \, b^{2} + d^{2}\right )} \cosh \left (d x + c\right ) -{\left (d^{2} \cosh \left (b x + a\right )^{2} - 4 \, b d \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + d^{2} \sinh \left (b x + a\right )^{2} - 4 \, b^{2} + d^{2}\right )} \sinh \left (d x + c\right )}{2 \,{\left ({\left (4 \, b^{2} d - d^{3}\right )} \cosh \left (b x + a\right )^{2} -{\left (4 \, b^{2} d - d^{3}\right )} \sinh \left (b x + a\right )^{2}\right )}} \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 16.198, size = 456, normalized size = 4.8 \begin{align*} \begin{cases} x e^{c} \cosh ^{2}{\left (a \right )} & \text{for}\: b = 0 \wedge d = 0 \\\frac{x e^{c} e^{d x} \sinh ^{2}{\left (a - \frac{d x}{2} \right )}}{4} + \frac{x e^{c} e^{d x} \sinh{\left (a - \frac{d x}{2} \right )} \cosh{\left (a - \frac{d x}{2} \right )}}{2} + \frac{x e^{c} e^{d x} \cosh ^{2}{\left (a - \frac{d x}{2} \right )}}{4} + \frac{e^{c} e^{d x} \sinh{\left (a - \frac{d x}{2} \right )} \cosh{\left (a - \frac{d x}{2} \right )}}{2 d} + \frac{e^{c} e^{d x} \cosh ^{2}{\left (a - \frac{d x}{2} \right )}}{d} & \text{for}\: b = - \frac{d}{2} \\\frac{x e^{c} e^{d x} \sinh ^{2}{\left (a + \frac{d x}{2} \right )}}{4} - \frac{x e^{c} e^{d x} \sinh{\left (a + \frac{d x}{2} \right )} \cosh{\left (a + \frac{d x}{2} \right )}}{2} + \frac{x e^{c} e^{d x} \cosh ^{2}{\left (a + \frac{d x}{2} \right )}}{4} - \frac{3 e^{c} e^{d x} \sinh ^{2}{\left (a + \frac{d x}{2} \right )}}{4 d} + \frac{e^{c} e^{d x} \sinh{\left (a + \frac{d x}{2} \right )} \cosh{\left (a + \frac{d x}{2} \right )}}{d} + \frac{e^{c} e^{d x} \cosh ^{2}{\left (a + \frac{d x}{2} \right )}}{4 d} & \text{for}\: b = \frac{d}{2} \\\left (- \frac{x \sinh ^{2}{\left (a + b x \right )}}{2} + \frac{x \cosh ^{2}{\left (a + b x \right )}}{2} + \frac{\sinh{\left (a + b x \right )} \cosh{\left (a + b x \right )}}{2 b}\right ) e^{c} & \text{for}\: d = 0 \\- \frac{2 b^{2} e^{c} e^{d x} \sinh ^{2}{\left (a + b x \right )}}{4 b^{2} d - d^{3}} + \frac{2 b^{2} e^{c} e^{d x} \cosh ^{2}{\left (a + b x \right )}}{4 b^{2} d - d^{3}} + \frac{2 b d e^{c} e^{d x} \sinh{\left (a + b x \right )} \cosh{\left (a + b x \right )}}{4 b^{2} d - d^{3}} - \frac{d^{2} e^{c} e^{d x} \cosh ^{2}{\left (a + b x \right )}}{4 b^{2} d - d^{3}} & \text{otherwise} \end{cases} \end{align*}

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

[In]

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

[Out]

Piecewise((x*exp(c)*cosh(a)**2, Eq(b, 0) & Eq(d, 0)), (x*exp(c)*exp(d*x)*sinh(a - d*x/2)**2/4 + x*exp(c)*exp(d
*x)*sinh(a - d*x/2)*cosh(a - d*x/2)/2 + x*exp(c)*exp(d*x)*cosh(a - d*x/2)**2/4 + exp(c)*exp(d*x)*sinh(a - d*x/
2)*cosh(a - d*x/2)/(2*d) + exp(c)*exp(d*x)*cosh(a - d*x/2)**2/d, Eq(b, -d/2)), (x*exp(c)*exp(d*x)*sinh(a + d*x
/2)**2/4 - x*exp(c)*exp(d*x)*sinh(a + d*x/2)*cosh(a + d*x/2)/2 + x*exp(c)*exp(d*x)*cosh(a + d*x/2)**2/4 - 3*ex
p(c)*exp(d*x)*sinh(a + d*x/2)**2/(4*d) + exp(c)*exp(d*x)*sinh(a + d*x/2)*cosh(a + d*x/2)/d + exp(c)*exp(d*x)*c
osh(a + d*x/2)**2/(4*d), Eq(b, d/2)), ((-x*sinh(a + b*x)**2/2 + x*cosh(a + b*x)**2/2 + sinh(a + b*x)*cosh(a +
b*x)/(2*b))*exp(c), Eq(d, 0)), (-2*b**2*exp(c)*exp(d*x)*sinh(a + b*x)**2/(4*b**2*d - d**3) + 2*b**2*exp(c)*exp
(d*x)*cosh(a + b*x)**2/(4*b**2*d - d**3) + 2*b*d*exp(c)*exp(d*x)*sinh(a + b*x)*cosh(a + b*x)/(4*b**2*d - d**3)
- d**2*exp(c)*exp(d*x)*cosh(a + b*x)**2/(4*b**2*d - d**3), True))

________________________________________________________________________________________

Giac [A]  time = 1.17611, size = 78, normalized size = 0.82 \begin{align*} \frac{e^{\left (2 \, b x + d x + 2 \, a + c\right )}}{4 \,{\left (2 \, b + d\right )}} - \frac{e^{\left (-2 \, b x + d x - 2 \, a + c\right )}}{4 \,{\left (2 \, b - d\right )}} + \frac{e^{\left (d x + c\right )}}{2 \, d} \end{align*}

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

[In]

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

[Out]

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