\(\int e^{c (a+b x)} \tanh (d+e x) \, dx\) [241]

Optimal result
Mathematica [B] (verified)
Rubi [A] (verified)
Maple [F]
Fricas [F]
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 16, antiderivative size = 67 \[ \int e^{c (a+b x)} \tanh (d+e x) \, dx=\frac {e^{c (a+b x)}}{b c}-\frac {2 e^{c (a+b x)} \operatorname {Hypergeometric2F1}\left (1,\frac {b c}{2 e},1+\frac {b c}{2 e},-e^{2 (d+e x)}\right )}{b c} \] Output:

exp(c*(b*x+a))/b/c-2*exp(c*(b*x+a))*hypergeom([1, 1/2*b*c/e],[1+1/2*b*c/e] 
,-exp(2*e*x+2*d))/b/c
 

Mathematica [B] (verified)

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

Time = 0.18 (sec) , antiderivative size = 141, normalized size of antiderivative = 2.10 \[ \int e^{c (a+b x)} \tanh (d+e x) \, dx=\frac {e^{c (a+b x)} \left (2 b c e^{2 (d+e x)} \operatorname {Hypergeometric2F1}\left (1,1+\frac {b c}{2 e},2+\frac {b c}{2 e},-e^{2 (d+e x)}\right )-(b c+2 e) \left (1-e^{2 d}+2 e^{2 d} \operatorname {Hypergeometric2F1}\left (1,\frac {b c}{2 e},1+\frac {b c}{2 e},-e^{2 (d+e x)}\right )\right )\right )}{b c (b c+2 e) \left (1+e^{2 d}\right )} \] Input:

Integrate[E^(c*(a + b*x))*Tanh[d + e*x],x]
 

Output:

(E^(c*(a + b*x))*(2*b*c*E^(2*(d + e*x))*Hypergeometric2F1[1, 1 + (b*c)/(2* 
e), 2 + (b*c)/(2*e), -E^(2*(d + e*x))] - (b*c + 2*e)*(1 - E^(2*d) + 2*E^(2 
*d)*Hypergeometric2F1[1, (b*c)/(2*e), 1 + (b*c)/(2*e), -E^(2*(d + e*x))])) 
)/(b*c*(b*c + 2*e)*(1 + E^(2*d)))
 

Rubi [A] (verified)

Time = 0.29 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {6007, 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^{c (a+b x)} \tanh (d+e x) \, dx\)

\(\Big \downarrow \) 6007

\(\displaystyle \int \left (e^{c (a+b x)}-\frac {2 e^{c (a+b x)}}{e^{2 (d+e x)}+1}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {e^{c (a+b x)}}{b c}-\frac {2 e^{c (a+b x)} \operatorname {Hypergeometric2F1}\left (1,\frac {b c}{2 e},\frac {b c}{2 e}+1,-e^{2 (d+e x)}\right )}{b c}\)

Input:

Int[E^(c*(a + b*x))*Tanh[d + e*x],x]
 

Output:

E^(c*(a + b*x))/(b*c) - (2*E^(c*(a + b*x))*Hypergeometric2F1[1, (b*c)/(2*e 
), 1 + (b*c)/(2*e), -E^(2*(d + e*x))])/(b*c)
 

Defintions of rubi rules used

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

rule 6007
Int[(F_)^((c_.)*((a_.) + (b_.)*(x_)))*Tanh[(d_.) + (e_.)*(x_)]^(n_.), x_Sym 
bol] :> Int[ExpandIntegrand[F^(c*(a + b*x))*((-1 + E^(2*(d + e*x)))^n/(1 + 
E^(2*(d + e*x)))^n), x], x] /; FreeQ[{F, a, b, c, d, e}, x] && IntegerQ[n]
 
Maple [F]

\[\int {\mathrm e}^{c \left (b x +a \right )} \tanh \left (e x +d \right )d x\]

Input:

int(exp(c*(b*x+a))*tanh(e*x+d),x)
 

Output:

int(exp(c*(b*x+a))*tanh(e*x+d),x)
 

Fricas [F]

\[ \int e^{c (a+b x)} \tanh (d+e x) \, dx=\int { e^{\left ({\left (b x + a\right )} c\right )} \tanh \left (e x + d\right ) \,d x } \] Input:

integrate(exp(c*(b*x+a))*tanh(e*x+d),x, algorithm="fricas")
 

Output:

integral(e^(b*c*x + a*c)*tanh(e*x + d), x)
 

Sympy [F]

\[ \int e^{c (a+b x)} \tanh (d+e x) \, dx=e^{a c} \int e^{b c x} \tanh {\left (d + e x \right )}\, dx \] Input:

integrate(exp(c*(b*x+a))*tanh(e*x+d),x)
 

Output:

exp(a*c)*Integral(exp(b*c*x)*tanh(d + e*x), x)
 

Maxima [F]

\[ \int e^{c (a+b x)} \tanh (d+e x) \, dx=\int { e^{\left ({\left (b x + a\right )} c\right )} \tanh \left (e x + d\right ) \,d x } \] Input:

integrate(exp(c*(b*x+a))*tanh(e*x+d),x, algorithm="maxima")
 

Output:

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

Giac [F]

\[ \int e^{c (a+b x)} \tanh (d+e x) \, dx=\int { e^{\left ({\left (b x + a\right )} c\right )} \tanh \left (e x + d\right ) \,d x } \] Input:

integrate(exp(c*(b*x+a))*tanh(e*x+d),x, algorithm="giac")
 

Output:

integrate(e^((b*x + a)*c)*tanh(e*x + d), x)
 

Mupad [F(-1)]

Timed out. \[ \int e^{c (a+b x)} \tanh (d+e x) \, dx=\int {\mathrm {e}}^{c\,\left (a+b\,x\right )}\,\mathrm {tanh}\left (d+e\,x\right ) \,d x \] Input:

int(exp(c*(a + b*x))*tanh(d + e*x),x)
 

Output:

int(exp(c*(a + b*x))*tanh(d + e*x), x)
 

Reduce [F]

\[ \int e^{c (a+b x)} \tanh (d+e x) \, dx=\frac {e^{a c} \left (e^{b c x}-2 \left (\int \frac {e^{b c x}}{e^{2 e x +2 d}+1}d x \right ) b c \right )}{b c} \] Input:

int(exp(c*(b*x+a))*tanh(e*x+d),x)
 

Output:

(e**(a*c)*(e**(b*c*x) - 2*int(e**(b*c*x)/(e**(2*d + 2*e*x) + 1),x)*b*c))/( 
b*c)