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

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.030614, antiderivative size = 88, 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{b e^{a+b x} \cosh ^2(c+d x)}{b^2-4 d^2}-\frac{2 d e^{a+b x} \sinh (c+d x) \cosh (c+d x)}{b^2-4 d^2}-\frac{2 d^2 e^{a+b x}}{b \left (b^2-4 d^2\right )}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(-2*d^2*E^(a + b*x))/(b*(b^2 - 4*d^2)) + (b*E^(a + b*x)*Cosh[c + d*x]^2)/(b^2 - 4*d^2) - (2*d*E^(a + b*x)*Cosh
[c + d*x]*Sinh[c + d*x])/(b^2 - 4*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^{a+b x} \cosh ^2(c+d x) \, dx &=\frac{b e^{a+b x} \cosh ^2(c+d x)}{b^2-4 d^2}-\frac{2 d e^{a+b x} \cosh (c+d x) \sinh (c+d x)}{b^2-4 d^2}-\frac{\left (2 d^2\right ) \int e^{a+b x} \, dx}{b^2-4 d^2}\\ &=-\frac{2 d^2 e^{a+b x}}{b \left (b^2-4 d^2\right )}+\frac{b e^{a+b x} \cosh ^2(c+d x)}{b^2-4 d^2}-\frac{2 d e^{a+b x} \cosh (c+d x) \sinh (c+d x)}{b^2-4 d^2}\\ \end{align*}

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

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

________________________________________________________________________________________

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

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

[In]

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

[Out]

1/2*sinh(b*x+a)/b+1/4*sinh(a-2*c+(b-2*d)*x)/(b-2*d)+1/4*sinh(a+2*c+(b+2*d)*x)/(b+2*d)+1/2*cosh(b*x+a)/b+1/4*co
sh(a-2*c+(b-2*d)*x)/(b-2*d)+1/4*cosh(a+2*c+(b+2*d)*x)/(b+2*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(b*x+a)*cosh(d*x+c)^2,x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

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

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

[In]

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

[Out]

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

________________________________________________________________________________________

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

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

[In]

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

[Out]

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