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

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

Optimal result

Integrand size = 29, antiderivative size = 78 \[ \int \frac {e^{2 (a+b x)}}{g \cosh (d+b x)+f \sinh (d+b x)} \, dx=\frac {2 e^{2 a-d+b x}}{b (f+g)}-\frac {2 e^{2 a-2 d} \sqrt {f-g} \text {arctanh}\left (\frac {e^{d+b x} \sqrt {f+g}}{\sqrt {f-g}}\right )}{b (f+g)^{3/2}} \] Output:

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

Mathematica [A] (verified)

Time = 0.27 (sec) , antiderivative size = 71, normalized size of antiderivative = 0.91 \[ \int \frac {e^{2 (a+b x)}}{g \cosh (d+b x)+f \sinh (d+b x)} \, dx=\frac {2 e^{2 a-2 d} \left (\frac {e^{d+b x}}{f+g}-\frac {\sqrt {f-g} \text {arctanh}\left (\frac {e^{d+b x} \sqrt {f+g}}{\sqrt {f-g}}\right )}{(f+g)^{3/2}}\right )}{b} \] Input:

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

Output:

(2*E^(2*a - 2*d)*(E^(d + b*x)/(f + g) - (Sqrt[f - g]*ArcTanh[(E^(d + b*x)* 
Sqrt[f + g])/Sqrt[f - g]])/(f + g)^(3/2)))/b
 

Rubi [A] (warning: unable to verify)

Time = 0.25 (sec) , antiderivative size = 63, normalized size of antiderivative = 0.81, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.138, Rules used = {2720, 27, 262, 221}

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 \frac {e^{2 (a+b x)}}{f \sinh (b x+d)+g \cosh (b x+d)} \, dx\)

\(\Big \downarrow \) 2720

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 262

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

\(\Big \downarrow \) 221

\(\displaystyle -\frac {2 e^{2 a} \left (\frac {\sqrt {f-g} \text {arctanh}\left (\frac {e^{b x} \sqrt {f+g}}{\sqrt {f-g}}\right )}{(f+g)^{3/2}}-\frac {e^{b x}}{f+g}\right )}{b}\)

Input:

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

Output:

(-2*E^(2*a)*(-(E^(b*x)/(f + g)) + (Sqrt[f - g]*ArcTanh[(E^(b*x)*Sqrt[f + g 
])/Sqrt[f - g]])/(f + g)^(3/2)))/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 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 

rule 262
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x) 
^(m - 1)*((a + b*x^2)^(p + 1)/(b*(m + 2*p + 1))), x] - Simp[a*c^2*((m - 1)/ 
(b*(m + 2*p + 1)))   Int[(c*x)^(m - 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b 
, c, p}, x] && GtQ[m, 2 - 1] && NeQ[m + 2*p + 1, 0] && IntBinomialQ[a, b, c 
, 2, m, p, x]
 

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. \(142\) vs. \(2(67)=134\).

Time = 3.03 (sec) , antiderivative size = 143, normalized size of antiderivative = 1.83

method result size
risch \(\frac {2 \,{\mathrm e}^{b x +2 a -d}}{b \left (f +g \right )}+\frac {\ln \left ({\mathrm e}^{b x +a}-\frac {\sqrt {\left (f -g \right ) \left (f +g \right )}\, {\mathrm e}^{a -d}}{f +g}\right ) \sqrt {\left (f -g \right ) \left (f +g \right )}\, {\mathrm e}^{2 a -2 d}}{b \left (f +g \right )^{2}}-\frac {\ln \left ({\mathrm e}^{b x +a}+\frac {\sqrt {\left (f -g \right ) \left (f +g \right )}\, {\mathrm e}^{a -d}}{f +g}\right ) \sqrt {\left (f -g \right ) \left (f +g \right )}\, {\mathrm e}^{2 a -2 d}}{b \left (f +g \right )^{2}}\) \(143\)

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 149 vs. \(2 (67) = 134\).

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

integrate(exp(2*b*x+2*a)/(g*cosh(b*x+d)+f*sinh(b*x+d)),x, algorithm="frica 
s")
 

Output:

[(sqrt((f - g)/(f + g))*(cosh(-2*a + 2*d) - sinh(-2*a + 2*d))*log(((f + g) 
*cosh(b*x + d)^2 + 2*(f + g)*cosh(b*x + d)*sinh(b*x + d) + (f + g)*sinh(b* 
x + d)^2 - 2*((f + g)*cosh(b*x + d) + (f + g)*sinh(b*x + d))*sqrt((f - g)/ 
(f + g)) + f - g)/((f + g)*cosh(b*x + d)^2 + 2*(f + g)*cosh(b*x + d)*sinh( 
b*x + d) + (f + g)*sinh(b*x + d)^2 - f + g)) + 2*cosh(b*x + d)*cosh(-2*a + 
 2*d) + 2*(cosh(-2*a + 2*d) - sinh(-2*a + 2*d))*sinh(b*x + d) - 2*cosh(b*x 
 + d)*sinh(-2*a + 2*d))/(b*f + b*g), -2*(sqrt(-(f - g)/(f + g))*(cosh(-2*a 
 + 2*d) - sinh(-2*a + 2*d))*arctan(-((f + g)*cosh(b*x + d) + (f + g)*sinh( 
b*x + d))*sqrt(-(f - g)/(f + g))/(f - g)) - cosh(b*x + d)*cosh(-2*a + 2*d) 
 - (cosh(-2*a + 2*d) - sinh(-2*a + 2*d))*sinh(b*x + d) + cosh(b*x + d)*sin 
h(-2*a + 2*d))/(b*f + b*g)]
 

Sympy [F]

\[ \int \frac {e^{2 (a+b x)}}{g \cosh (d+b x)+f \sinh (d+b x)} \, dx=e^{2 a} \int \frac {e^{2 b x}}{f \sinh {\left (b x + d \right )} + g \cosh {\left (b x + d \right )}}\, dx \] Input:

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

Output:

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

Maxima [F(-2)]

Exception generated. \[ \int \frac {e^{2 (a+b x)}}{g \cosh (d+b x)+f \sinh (d+b x)} \, dx=\text {Exception raised: ValueError} \] Input:

integrate(exp(2*b*x+2*a)/(g*cosh(b*x+d)+f*sinh(b*x+d)),x, algorithm="maxim 
a")
 

Output:

Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(4*f^2-4*g^2>0)', see `assume?` f 
or more de
 

Giac [A] (verification not implemented)

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

integrate(exp(2*b*x+2*a)/(g*cosh(b*x+d)+f*sinh(b*x+d)),x, algorithm="giac" 
)
 

Output:

2*((f - g)*arctan((f*e^(b*x + d) + g*e^(b*x + d))/sqrt(-f^2 + g^2))/(sqrt( 
-f^2 + g^2)*(f*e^(2*d) + g*e^(2*d))) + e^(b*x + d)/(f*e^(2*d) + g*e^(2*d)) 
)*e^(2*a)/b
 

Mupad [B] (verification not implemented)

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

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.21 \[ \int \frac {e^{2 (a+b x)}}{g \cosh (d+b x)+f \sinh (d+b x)} \, dx=\frac {2 e^{2 a} \left (-\sqrt {-f^{2}+g^{2}}\, \mathit {atan} \left (\frac {e^{b x +d} f +e^{b x +d} g}{\sqrt {-f^{2}+g^{2}}}\right )+e^{b x +d} f +e^{b x +d} g \right )}{e^{2 d} b \left (f^{2}+2 f g +g^{2}\right )} \] Input:

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

Output:

(2*e**(2*a)*( - sqrt( - f**2 + g**2)*atan((e**(b*x + d)*f + e**(b*x + d)*g 
)/sqrt( - f**2 + g**2)) + e**(b*x + d)*f + e**(b*x + d)*g))/(e**(2*d)*b*(f 
**2 + 2*f*g + g**2))