\(\int e^{2 (a+b x)} (g \cosh (d+b x)+f \sinh (d+b x))^2 \, dx\) [10]

Optimal result
Mathematica [A] (verified)
Rubi [A] (warning: unable to verify)
Maple [B] (verified)
Fricas [B] (verification not implemented)
Sympy [B] (verification not implemented)
Maxima [B] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 29, antiderivative size = 72 \[ \int e^{2 (a+b x)} (g \cosh (d+b x)+f \sinh (d+b x))^2 \, dx=\frac {e^{2 (a+d)+4 b x} (f+g)^2}{16 b}-\frac {e^{2 a+2 b x} \left (f^2-g^2\right )}{4 b}+\frac {1}{4} e^{2 a-2 d} (f-g)^2 x \] Output:

1/16*exp(4*b*x+2*a+2*d)*(f+g)^2/b-1/4*exp(2*b*x+2*a)*(f^2-g^2)/b+1/4*exp(2 
*a-2*d)*(f-g)^2*x
 

Mathematica [A] (verified)

Time = 0.63 (sec) , antiderivative size = 68, normalized size of antiderivative = 0.94 \[ \int e^{2 (a+b x)} (g \cosh (d+b x)+f \sinh (d+b x))^2 \, dx=\frac {e^{2 a-2 d} \left (-2 e^{2 (d+b x)} (f-g) (f+g)+\frac {1}{2} e^{4 (d+b x)} (f+g)^2+2 (f-g)^2 (d+b x)\right )}{8 b} \] Input:

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

Output:

(E^(2*a - 2*d)*(-2*E^(2*(d + b*x))*(f - g)*(f + g) + (E^(4*(d + b*x))*(f + 
 g)^2)/2 + 2*(f - g)^2*(d + b*x)))/(8*b)
 

Rubi [A] (warning: unable to verify)

Time = 0.26 (sec) , antiderivative size = 60, normalized size of antiderivative = 0.83, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {2720, 27, 243, 49, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int e^{2 (a+b x)} (f \sinh (b x+d)+g \cosh (b x+d))^2 \, dx\)

\(\Big \downarrow \) 2720

\(\displaystyle \frac {\int \frac {1}{4} e^{2 a-b x} \left (f-g-e^{2 b x} (f+g)\right )^2de^{b x}}{b}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {e^{2 a} \int e^{-b x} \left (f-g-e^{2 b x} (f+g)\right )^2de^{b x}}{4 b}\)

\(\Big \downarrow \) 243

\(\displaystyle \frac {e^{2 a} \int e^{-b x} \left (f-g-e^{2 b x} (f+g)\right )^2de^{2 b x}}{8 b}\)

\(\Big \downarrow \) 49

\(\displaystyle \frac {e^{2 a} \int \left (e^{-b x} (f-g)^2+e^{2 b x} (f+g)^2-2 \left (f^2-g^2\right )\right )de^{2 b x}}{8 b}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {e^{2 a} \left (-2 e^{2 b x} \left (f^2-g^2\right )+\frac {1}{2} e^{2 b x} (f+g)^2+(f-g)^2 \log \left (e^{2 b x}\right )\right )}{8 b}\)

Input:

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

Output:

(E^(2*a)*((E^(2*b*x)*(f + g)^2)/2 - 2*E^(2*b*x)*(f^2 - g^2) + (f - g)^2*Lo 
g[E^(2*b*x)]))/(8*b)
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 49
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}, x] 
&& IGtQ[m, 0] && IGtQ[m + n + 2, 0]
 

rule 243
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[1/2   Subst[In 
t[x^((m - 1)/2)*(a + b*x)^p, x], x, x^2], x] /; FreeQ[{a, b, m, p}, x] && I 
ntegerQ[(m - 1)/2]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2720
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] 
   Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct 
ionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ 
[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) 
*(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
 
Maple [B] (verified)

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

Time = 28.40 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.89

method result size
risch \(\frac {{\mathrm e}^{2 a -2 d} f^{2} x}{4}-\frac {{\mathrm e}^{2 a -2 d} f g x}{2}+\frac {{\mathrm e}^{2 a -2 d} g^{2} x}{4}+\frac {{\mathrm e}^{4 b x +2 a +2 d} f^{2}}{16 b}+\frac {{\mathrm e}^{4 b x +2 a +2 d} f g}{8 b}+\frac {{\mathrm e}^{4 b x +2 a +2 d} g^{2}}{16 b}-\frac {{\mathrm e}^{2 b x +2 a} f^{2}}{4 b}+\frac {{\mathrm e}^{2 b x +2 a} g^{2}}{4 b}\) \(136\)
default \(\frac {\left (\frac {g^{2}}{2}-\frac {f^{2}}{2}\right ) \sinh \left (2 b x +2 a \right )}{2 b}+\frac {\left (\frac {g^{2}}{2}-\frac {f^{2}}{2}\right ) \cosh \left (2 b x +2 a \right )}{2 b}+\frac {\left (f^{2}-2 f g +g^{2}\right ) \cosh \left (2 a -2 d \right ) x}{4}+\frac {\left (f^{2}-2 f g +g^{2}\right ) \sinh \left (2 a -2 d \right ) x}{4}+\frac {\left (\frac {1}{4} g^{2}+\frac {1}{4} f^{2}+\frac {1}{2} f g \right ) \sinh \left (4 b x +2 a +2 d \right )}{4 b}+\frac {\left (\frac {1}{4} g^{2}+\frac {1}{4} f^{2}+\frac {1}{2} f g \right ) \cosh \left (4 b x +2 a +2 d \right )}{4 b}\) \(160\)
parts \(f^{2} \left (\frac {x \cosh \left (2 a -2 d \right )}{4}-\frac {\sinh \left (2 b x +2 a \right )}{4 b}+\frac {\sinh \left (4 b x +2 a +2 d \right )}{16 b}+\frac {x \sinh \left (2 a -2 d \right )}{4}-\frac {\cosh \left (2 b x +2 a \right )}{4 b}+\frac {\cosh \left (4 b x +2 a +2 d \right )}{16 b}\right )+g^{2} \left (\frac {x \cosh \left (2 a -2 d \right )}{4}+\frac {\sinh \left (2 b x +2 a \right )}{4 b}+\frac {\sinh \left (4 b x +2 a +2 d \right )}{16 b}+\frac {x \sinh \left (2 a -2 d \right )}{4}+\frac {\cosh \left (2 b x +2 a \right )}{4 b}+\frac {\cosh \left (4 b x +2 a +2 d \right )}{16 b}\right )+2 f g \left (-\frac {x \cosh \left (2 a -2 d \right )}{4}+\frac {\sinh \left (4 b x +2 a +2 d \right )}{16 b}-\frac {x \sinh \left (2 a -2 d \right )}{4}+\frac {\cosh \left (4 b x +2 a +2 d \right )}{16 b}\right )\) \(241\)
orering \(\frac {\left (4 b x +3\right ) {\mathrm e}^{2 b x +2 a} \left (g \cosh \left (b x +d \right )+f \sinh \left (b x +d \right )\right )^{2}}{4 b}-\frac {\left (6 b x +1\right ) \left (2 \,{\mathrm e}^{2 b x +2 a} b \left (g \cosh \left (b x +d \right )+f \sinh \left (b x +d \right )\right )^{2}+2 \,{\mathrm e}^{2 b x +2 a} \left (g \cosh \left (b x +d \right )+f \sinh \left (b x +d \right )\right ) \left (g b \sinh \left (b x +d \right )+f b \cosh \left (b x +d \right )\right )\right )}{8 b^{2}}+\frac {x \left (4 \,{\mathrm e}^{2 b x +2 a} b^{2} \left (g \cosh \left (b x +d \right )+f \sinh \left (b x +d \right )\right )^{2}+8 \,{\mathrm e}^{2 b x +2 a} b \left (g \cosh \left (b x +d \right )+f \sinh \left (b x +d \right )\right ) \left (g b \sinh \left (b x +d \right )+f b \cosh \left (b x +d \right )\right )+2 \,{\mathrm e}^{2 b x +2 a} \left (g b \sinh \left (b x +d \right )+f b \cosh \left (b x +d \right )\right )^{2}+2 \,{\mathrm e}^{2 b x +2 a} \left (g \cosh \left (b x +d \right )+f \sinh \left (b x +d \right )\right ) \left (g \,b^{2} \cosh \left (b x +d \right )+f \,b^{2} \sinh \left (b x +d \right )\right )\right )}{8 b^{2}}\) \(302\)

Input:

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

Output:

1/4*exp(2*a-2*d)*f^2*x-1/2*exp(2*a-2*d)*f*g*x+1/4*exp(2*a-2*d)*g^2*x+1/16* 
exp(4*b*x+2*a+2*d)/b*f^2+1/8*exp(4*b*x+2*a+2*d)/b*f*g+1/16*exp(4*b*x+2*a+2 
*d)/b*g^2-1/4/b*exp(2*b*x+2*a)*f^2+1/4/b*exp(2*b*x+2*a)*g^2
 

Fricas [B] (verification not implemented)

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

Time = 0.08 (sec) , antiderivative size = 356, normalized size of antiderivative = 4.94 \[ \int e^{2 (a+b x)} (g \cosh (d+b x)+f \sinh (d+b x))^2 \, dx=\frac {{\left (f^{2} + 2 \, f g + g^{2} + 4 \, {\left (b f^{2} - 2 \, b f g + b g^{2}\right )} x\right )} \cosh \left (b x + d\right )^{2} \cosh \left (-2 \, a + 2 \, d\right ) + {\left ({\left (f^{2} + 2 \, f g + g^{2} + 4 \, {\left (b f^{2} - 2 \, b f g + b g^{2}\right )} x\right )} \cosh \left (-2 \, a + 2 \, d\right ) - {\left (f^{2} + 2 \, f g + g^{2} + 4 \, {\left (b f^{2} - 2 \, b f g + b g^{2}\right )} x\right )} \sinh \left (-2 \, a + 2 \, d\right )\right )} \sinh \left (b x + d\right )^{2} - 4 \, {\left (f^{2} - g^{2}\right )} \cosh \left (-2 \, a + 2 \, d\right ) + 2 \, {\left ({\left (f^{2} + 2 \, f g + g^{2} - 4 \, {\left (b f^{2} - 2 \, b f g + b g^{2}\right )} x\right )} \cosh \left (b x + d\right ) \cosh \left (-2 \, a + 2 \, d\right ) - {\left (f^{2} + 2 \, f g + g^{2} - 4 \, {\left (b f^{2} - 2 \, b f g + b g^{2}\right )} x\right )} \cosh \left (b x + d\right ) \sinh \left (-2 \, a + 2 \, d\right )\right )} \sinh \left (b x + d\right ) - {\left ({\left (f^{2} + 2 \, f g + g^{2} + 4 \, {\left (b f^{2} - 2 \, b f g + b g^{2}\right )} x\right )} \cosh \left (b x + d\right )^{2} - 4 \, f^{2} + 4 \, g^{2}\right )} \sinh \left (-2 \, a + 2 \, d\right )}{16 \, {\left (b \cosh \left (b x + d\right )^{2} - 2 \, b \cosh \left (b x + d\right ) \sinh \left (b x + d\right ) + b \sinh \left (b x + d\right )^{2}\right )}} \] Input:

integrate(exp(2*b*x+2*a)*(g*cosh(b*x+d)+f*sinh(b*x+d))^2,x, algorithm="fri 
cas")
 

Output:

1/16*((f^2 + 2*f*g + g^2 + 4*(b*f^2 - 2*b*f*g + b*g^2)*x)*cosh(b*x + d)^2* 
cosh(-2*a + 2*d) + ((f^2 + 2*f*g + g^2 + 4*(b*f^2 - 2*b*f*g + b*g^2)*x)*co 
sh(-2*a + 2*d) - (f^2 + 2*f*g + g^2 + 4*(b*f^2 - 2*b*f*g + b*g^2)*x)*sinh( 
-2*a + 2*d))*sinh(b*x + d)^2 - 4*(f^2 - g^2)*cosh(-2*a + 2*d) + 2*((f^2 + 
2*f*g + g^2 - 4*(b*f^2 - 2*b*f*g + b*g^2)*x)*cosh(b*x + d)*cosh(-2*a + 2*d 
) - (f^2 + 2*f*g + g^2 - 4*(b*f^2 - 2*b*f*g + b*g^2)*x)*cosh(b*x + d)*sinh 
(-2*a + 2*d))*sinh(b*x + d) - ((f^2 + 2*f*g + g^2 + 4*(b*f^2 - 2*b*f*g + b 
*g^2)*x)*cosh(b*x + d)^2 - 4*f^2 + 4*g^2)*sinh(-2*a + 2*d))/(b*cosh(b*x + 
d)^2 - 2*b*cosh(b*x + d)*sinh(b*x + d) + b*sinh(b*x + d)^2)
 

Sympy [B] (verification not implemented)

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

Time = 0.51 (sec) , antiderivative size = 428, normalized size of antiderivative = 5.94 \[ \int e^{2 (a+b x)} (g \cosh (d+b x)+f \sinh (d+b x))^2 \, dx=\begin {cases} \frac {f^{2} x e^{2 a} e^{2 b x} \sinh ^{2}{\left (b x + d \right )}}{4} - \frac {f^{2} x e^{2 a} e^{2 b x} \sinh {\left (b x + d \right )} \cosh {\left (b x + d \right )}}{2} + \frac {f^{2} x e^{2 a} e^{2 b x} \cosh ^{2}{\left (b x + d \right )}}{4} - \frac {f g x e^{2 a} e^{2 b x} \sinh ^{2}{\left (b x + d \right )}}{2} + f g x e^{2 a} e^{2 b x} \sinh {\left (b x + d \right )} \cosh {\left (b x + d \right )} - \frac {f g x e^{2 a} e^{2 b x} \cosh ^{2}{\left (b x + d \right )}}{2} + \frac {g^{2} x e^{2 a} e^{2 b x} \sinh ^{2}{\left (b x + d \right )}}{4} - \frac {g^{2} x e^{2 a} e^{2 b x} \sinh {\left (b x + d \right )} \cosh {\left (b x + d \right )}}{2} + \frac {g^{2} x e^{2 a} e^{2 b x} \cosh ^{2}{\left (b x + d \right )}}{4} + \frac {f^{2} e^{2 a} e^{2 b x} \sinh ^{2}{\left (b x + d \right )}}{2 b} - \frac {f^{2} e^{2 a} e^{2 b x} \sinh {\left (b x + d \right )} \cosh {\left (b x + d \right )}}{4 b} + \frac {f g e^{2 a} e^{2 b x} \sinh {\left (b x + d \right )} \cosh {\left (b x + d \right )}}{2 b} - \frac {g^{2} e^{2 a} e^{2 b x} \sinh ^{2}{\left (b x + d \right )}}{2 b} + \frac {3 g^{2} e^{2 a} e^{2 b x} \sinh {\left (b x + d \right )} \cosh {\left (b x + d \right )}}{4 b} & \text {for}\: b \neq 0 \\x \left (f \sinh {\left (d \right )} + g \cosh {\left (d \right )}\right )^{2} e^{2 a} & \text {otherwise} \end {cases} \] Input:

integrate(exp(2*b*x+2*a)*(g*cosh(b*x+d)+f*sinh(b*x+d))**2,x)
 

Output:

Piecewise((f**2*x*exp(2*a)*exp(2*b*x)*sinh(b*x + d)**2/4 - f**2*x*exp(2*a) 
*exp(2*b*x)*sinh(b*x + d)*cosh(b*x + d)/2 + f**2*x*exp(2*a)*exp(2*b*x)*cos 
h(b*x + d)**2/4 - f*g*x*exp(2*a)*exp(2*b*x)*sinh(b*x + d)**2/2 + f*g*x*exp 
(2*a)*exp(2*b*x)*sinh(b*x + d)*cosh(b*x + d) - f*g*x*exp(2*a)*exp(2*b*x)*c 
osh(b*x + d)**2/2 + g**2*x*exp(2*a)*exp(2*b*x)*sinh(b*x + d)**2/4 - g**2*x 
*exp(2*a)*exp(2*b*x)*sinh(b*x + d)*cosh(b*x + d)/2 + g**2*x*exp(2*a)*exp(2 
*b*x)*cosh(b*x + d)**2/4 + f**2*exp(2*a)*exp(2*b*x)*sinh(b*x + d)**2/(2*b) 
 - f**2*exp(2*a)*exp(2*b*x)*sinh(b*x + d)*cosh(b*x + d)/(4*b) + f*g*exp(2* 
a)*exp(2*b*x)*sinh(b*x + d)*cosh(b*x + d)/(2*b) - g**2*exp(2*a)*exp(2*b*x) 
*sinh(b*x + d)**2/(2*b) + 3*g**2*exp(2*a)*exp(2*b*x)*sinh(b*x + d)*cosh(b* 
x + d)/(4*b), Ne(b, 0)), (x*(f*sinh(d) + g*cosh(d))**2*exp(2*a), True))
 

Maxima [B] (verification not implemented)

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

Time = 0.05 (sec) , antiderivative size = 169, normalized size of antiderivative = 2.35 \[ \int e^{2 (a+b x)} (g \cosh (d+b x)+f \sinh (d+b x))^2 \, dx=\frac {1}{16} \, {\left (4 \, x e^{\left (2 \, a - 2 \, d\right )} - \frac {{\left (4 \, e^{\left (-2 \, b x - 2 \, d\right )} - 1\right )} e^{\left (4 \, b x + 2 \, a + 2 \, d\right )}}{b} + \frac {4 \, d e^{\left (2 \, a - 2 \, d\right )}}{b}\right )} f^{2} - \frac {1}{8} \, {\left (4 \, x e^{\left (2 \, a - 2 \, d\right )} + \frac {4 \, d e^{\left (2 \, a - 2 \, d\right )}}{b} - \frac {e^{\left (4 \, b x + 2 \, a + 2 \, d\right )}}{b}\right )} f g + \frac {1}{16} \, {\left (4 \, x e^{\left (2 \, a - 2 \, d\right )} + \frac {{\left (4 \, e^{\left (-2 \, b x - 2 \, d\right )} + 1\right )} e^{\left (4 \, b x + 2 \, a + 2 \, d\right )}}{b} + \frac {4 \, d e^{\left (2 \, a - 2 \, d\right )}}{b}\right )} g^{2} \] Input:

integrate(exp(2*b*x+2*a)*(g*cosh(b*x+d)+f*sinh(b*x+d))^2,x, algorithm="max 
ima")
 

Output:

1/16*(4*x*e^(2*a - 2*d) - (4*e^(-2*b*x - 2*d) - 1)*e^(4*b*x + 2*a + 2*d)/b 
 + 4*d*e^(2*a - 2*d)/b)*f^2 - 1/8*(4*x*e^(2*a - 2*d) + 4*d*e^(2*a - 2*d)/b 
 - e^(4*b*x + 2*a + 2*d)/b)*f*g + 1/16*(4*x*e^(2*a - 2*d) + (4*e^(-2*b*x - 
 2*d) + 1)*e^(4*b*x + 2*a + 2*d)/b + 4*d*e^(2*a - 2*d)/b)*g^2
 

Giac [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 124, normalized size of antiderivative = 1.72 \[ \int e^{2 (a+b x)} (g \cosh (d+b x)+f \sinh (d+b x))^2 \, dx=\frac {{\left (f^{2} e^{\left (4 \, b x + 2 \, a + 4 \, d\right )} + 2 \, f g e^{\left (4 \, b x + 2 \, a + 4 \, d\right )} + g^{2} e^{\left (4 \, b x + 2 \, a + 4 \, d\right )} - 4 \, f^{2} e^{\left (2 \, b x + 2 \, a + 2 \, d\right )} + 4 \, g^{2} e^{\left (2 \, b x + 2 \, a + 2 \, d\right )} + 4 \, {\left (f^{2} e^{\left (2 \, a\right )} - 2 \, f g e^{\left (2 \, a\right )} + g^{2} e^{\left (2 \, a\right )}\right )} {\left (b x + d\right )}\right )} e^{\left (-2 \, d\right )}}{16 \, b} \] Input:

integrate(exp(2*b*x+2*a)*(g*cosh(b*x+d)+f*sinh(b*x+d))^2,x, algorithm="gia 
c")
 

Output:

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

Mupad [B] (verification not implemented)

Time = 2.84 (sec) , antiderivative size = 159, normalized size of antiderivative = 2.21 \[ \int e^{2 (a+b x)} (g \cosh (d+b x)+f \sinh (d+b x))^2 \, dx=\frac {x\,{\mathrm {cosh}\left (d+b\,x\right )}^2\,{\mathrm {e}}^{2\,a+2\,b\,x}\,{\left (f-g\right )}^2}{4}-\frac {{\mathrm {cosh}\left (d+b\,x\right )}^2\,{\mathrm {e}}^{2\,a+2\,b\,x}\,\left (\frac {f^2}{2}-\frac {g^2}{2}\right )}{b}+\frac {x\,{\mathrm {e}}^{2\,a+2\,b\,x}\,{\mathrm {sinh}\left (d+b\,x\right )}^2\,{\left (f-g\right )}^2}{4}-\frac {x\,\mathrm {cosh}\left (d+b\,x\right )\,{\mathrm {e}}^{2\,a+2\,b\,x}\,\mathrm {sinh}\left (d+b\,x\right )\,{\left (f-g\right )}^2}{2}+\frac {\mathrm {cosh}\left (d+b\,x\right )\,{\mathrm {e}}^{2\,a+2\,b\,x}\,\mathrm {sinh}\left (d+b\,x\right )\,\left (\frac {3\,f^2}{4}+\frac {f\,g}{2}-\frac {g^2}{4}\right )}{b} \] Input:

int(exp(2*a + 2*b*x)*(g*cosh(d + b*x) + f*sinh(d + b*x))^2,x)
 

Output:

(x*cosh(d + b*x)^2*exp(2*a + 2*b*x)*(f - g)^2)/4 - (cosh(d + b*x)^2*exp(2* 
a + 2*b*x)*(f^2/2 - g^2/2))/b + (x*exp(2*a + 2*b*x)*sinh(d + b*x)^2*(f - g 
)^2)/4 - (x*cosh(d + b*x)*exp(2*a + 2*b*x)*sinh(d + b*x)*(f - g)^2)/2 + (c 
osh(d + b*x)*exp(2*a + 2*b*x)*sinh(d + b*x)*((f*g)/2 + (3*f^2)/4 - g^2/4)) 
/b
 

Reduce [B] (verification not implemented)

Time = 0.27 (sec) , antiderivative size = 236, normalized size of antiderivative = 3.28 \[ \int e^{2 (a+b x)} (g \cosh (d+b x)+f \sinh (d+b x))^2 \, dx=\frac {e^{2 b x +2 a} \left (2 \cosh \left (b x +d \right )^{2} b \,f^{2} x -4 \cosh \left (b x +d \right )^{2} b f g x +2 \cosh \left (b x +d \right )^{2} b \,g^{2} x -\cosh \left (b x +d \right )^{2} f^{2}+2 \cosh \left (b x +d \right )^{2} f g +3 \cosh \left (b x +d \right )^{2} g^{2}-4 \cosh \left (b x +d \right ) \sinh \left (b x +d \right ) b \,f^{2} x +8 \cosh \left (b x +d \right ) \sinh \left (b x +d \right ) b f g x -4 \cosh \left (b x +d \right ) \sinh \left (b x +d \right ) b \,g^{2} x +2 \sinh \left (b x +d \right )^{2} b \,f^{2} x -4 \sinh \left (b x +d \right )^{2} b f g x +2 \sinh \left (b x +d \right )^{2} b \,g^{2} x +3 \sinh \left (b x +d \right )^{2} f^{2}+2 \sinh \left (b x +d \right )^{2} f g -\sinh \left (b x +d \right )^{2} g^{2}\right )}{8 b} \] Input:

int(exp(2*b*x+2*a)*(g*cosh(b*x+d)+f*sinh(b*x+d))^2,x)
 

Output:

(e**(2*a + 2*b*x)*(2*cosh(b*x + d)**2*b*f**2*x - 4*cosh(b*x + d)**2*b*f*g* 
x + 2*cosh(b*x + d)**2*b*g**2*x - cosh(b*x + d)**2*f**2 + 2*cosh(b*x + d)* 
*2*f*g + 3*cosh(b*x + d)**2*g**2 - 4*cosh(b*x + d)*sinh(b*x + d)*b*f**2*x 
+ 8*cosh(b*x + d)*sinh(b*x + d)*b*f*g*x - 4*cosh(b*x + d)*sinh(b*x + d)*b* 
g**2*x + 2*sinh(b*x + d)**2*b*f**2*x - 4*sinh(b*x + d)**2*b*f*g*x + 2*sinh 
(b*x + d)**2*b*g**2*x + 3*sinh(b*x + d)**2*f**2 + 2*sinh(b*x + d)**2*f*g - 
 sinh(b*x + d)**2*g**2))/(8*b)