\(\int e^{2 (a+b x)} \sinh ^2(a+b x) \, dx\) [873]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 40 \[ \int e^{2 (a+b x)} \sinh ^2(a+b x) \, dx=-\frac {e^{2 a+2 b x}}{4 b}+\frac {e^{4 a+4 b x}}{16 b}+\frac {x}{4} \]

[Out]

-1/4*exp(2*b*x+2*a)/b+1/16*exp(4*b*x+4*a)/b+1/4*x

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 40, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {2320, 12, 272, 45} \[ \int e^{2 (a+b x)} \sinh ^2(a+b x) \, dx=-\frac {e^{2 a+2 b x}}{4 b}+\frac {e^{4 a+4 b x}}{16 b}+\frac {x}{4} \]

[In]

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

[Out]

-1/4*E^(2*a + 2*b*x)/b + E^(4*a + 4*b*x)/(16*b) + x/4

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 2320

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\left (1-x^2\right )^2}{4 x} \, dx,x,e^{a+b x}\right )}{b} \\ & = \frac {\text {Subst}\left (\int \frac {\left (1-x^2\right )^2}{x} \, dx,x,e^{a+b x}\right )}{4 b} \\ & = \frac {\text {Subst}\left (\int \frac {(1-x)^2}{x} \, dx,x,e^{2 a+2 b x}\right )}{8 b} \\ & = \frac {\text {Subst}\left (\int \left (-2+\frac {1}{x}+x\right ) \, dx,x,e^{2 a+2 b x}\right )}{8 b} \\ & = -\frac {e^{2 a+2 b x}}{4 b}+\frac {e^{4 a+4 b x}}{16 b}+\frac {x}{4} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.80 \[ \int e^{2 (a+b x)} \sinh ^2(a+b x) \, dx=\frac {-4 e^{2 (a+b x)}+e^{4 (a+b x)}+4 b x}{16 b} \]

[In]

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

[Out]

(-4*E^(2*(a + b*x)) + E^(4*(a + b*x)) + 4*b*x)/(16*b)

Maple [A] (verified)

Time = 0.15 (sec) , antiderivative size = 33, normalized size of antiderivative = 0.82

method result size
risch \(-\frac {{\mathrm e}^{2 b x +2 a}}{4 b}+\frac {{\mathrm e}^{4 b x +4 a}}{16 b}+\frac {x}{4}\) \(33\)
default \(\frac {x}{4}-\frac {\sinh \left (2 b x +2 a \right )}{4 b}+\frac {\sinh \left (4 b x +4 a \right )}{16 b}-\frac {\cosh \left (2 b x +2 a \right )}{4 b}+\frac {\cosh \left (4 b x +4 a \right )}{16 b}\) \(61\)

[In]

int(exp(2*b*x+2*a)*sinh(b*x+a)^2,x,method=_RETURNVERBOSE)

[Out]

-1/4*exp(2*b*x+2*a)/b+1/16*exp(4*b*x+4*a)/b+1/4*x

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 92 vs. \(2 (32) = 64\).

Time = 0.27 (sec) , antiderivative size = 92, normalized size of antiderivative = 2.30 \[ \int e^{2 (a+b x)} \sinh ^2(a+b x) \, dx=\frac {{\left (4 \, b x + 1\right )} \cosh \left (b x + a\right )^{2} - 2 \, {\left (4 \, b x - 1\right )} \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + {\left (4 \, b x + 1\right )} \sinh \left (b x + a\right )^{2} - 4}{16 \, {\left (b \cosh \left (b x + a\right )^{2} - 2 \, b \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + b \sinh \left (b x + a\right )^{2}\right )}} \]

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 139 vs. \(2 (29) = 58\).

Time = 0.44 (sec) , antiderivative size = 139, normalized size of antiderivative = 3.48 \[ \int e^{2 (a+b x)} \sinh ^2(a+b x) \, dx=\begin {cases} \frac {x e^{2 a} e^{2 b x} \sinh ^{2}{\left (a + b x \right )}}{4} - \frac {x e^{2 a} e^{2 b x} \sinh {\left (a + b x \right )} \cosh {\left (a + b x \right )}}{2} + \frac {x e^{2 a} e^{2 b x} \cosh ^{2}{\left (a + b x \right )}}{4} + \frac {e^{2 a} e^{2 b x} \sinh ^{2}{\left (a + b x \right )}}{2 b} - \frac {e^{2 a} e^{2 b x} \sinh {\left (a + b x \right )} \cosh {\left (a + b x \right )}}{4 b} & \text {for}\: b \neq 0 \\x e^{2 a} \sinh ^{2}{\left (a \right )} & \text {otherwise} \end {cases} \]

[In]

integrate(exp(2*b*x+2*a)*sinh(b*x+a)**2,x)

[Out]

Piecewise((x*exp(2*a)*exp(2*b*x)*sinh(a + b*x)**2/4 - x*exp(2*a)*exp(2*b*x)*sinh(a + b*x)*cosh(a + b*x)/2 + x*
exp(2*a)*exp(2*b*x)*cosh(a + b*x)**2/4 + exp(2*a)*exp(2*b*x)*sinh(a + b*x)**2/(2*b) - exp(2*a)*exp(2*b*x)*sinh
(a + b*x)*cosh(a + b*x)/(4*b), Ne(b, 0)), (x*exp(2*a)*sinh(a)**2, True))

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.92 \[ \int e^{2 (a+b x)} \sinh ^2(a+b x) \, dx=\frac {1}{4} \, x - \frac {{\left (4 \, e^{\left (-2 \, b x - 2 \, a\right )} - 1\right )} e^{\left (4 \, b x + 4 \, a\right )}}{16 \, b} + \frac {a}{4 \, b} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.80 \[ \int e^{2 (a+b x)} \sinh ^2(a+b x) \, dx=\frac {1}{4} \, x + \frac {e^{\left (4 \, b x + 4 \, a\right )}}{16 \, b} - \frac {e^{\left (2 \, b x + 2 \, a\right )}}{4 \, b} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 2.37 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.80 \[ \int e^{2 (a+b x)} \sinh ^2(a+b x) \, dx=\frac {x}{4}-\frac {\frac {{\mathrm {e}}^{2\,a+2\,b\,x}}{4}-\frac {{\mathrm {e}}^{4\,a+4\,b\,x}}{16}}{b} \]

[In]

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

[Out]

x/4 - (exp(2*a + 2*b*x)/4 - exp(4*a + 4*b*x)/16)/b