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

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

Optimal result

Integrand size = 18, antiderivative size = 117 \[ \int e^{c (a+b x)} \tanh ^2(d+e x) \, dx=\frac {e^{c (a+b x)}}{b c}-\frac {4 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}+\frac {4 e^{c (a+b x)} \operatorname {Hypergeometric2F1}\left (2,\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-4*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+4*exp(c*(b*x+a))*hypergeom([2, 1/2*b*c/e],[1+1/2*b*c 
/e],-exp(2*e*x+2*d))/b/c
 

Mathematica [A] (verified)

Time = 0.83 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.44 \[ \int e^{c (a+b x)} \tanh ^2(d+e x) \, dx=\frac {e^{c (a+b x)} \left (2 b^2 c^2 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 (2 b c e^{2 d} \operatorname {Hypergeometric2F1}\left (1,\frac {b c}{2 e},1+\frac {b c}{2 e},-e^{2 (d+e x)}\right )-\left (1+e^{2 d}\right ) (e-b c \text {sech}(d) \text {sech}(d+e x) \sinh (e x))\right )\right )}{b c e (b c+2 e) \left (1+e^{2 d}\right )} \] Input:

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

Output:

(E^(c*(a + b*x))*(2*b^2*c^2*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)*(2*b*c*E^(2*d)*Hy 
pergeometric2F1[1, (b*c)/(2*e), 1 + (b*c)/(2*e), -E^(2*(d + e*x))] - (1 + 
E^(2*d))*(e - b*c*Sech[d]*Sech[d + e*x]*Sinh[e*x]))))/(b*c*e*(b*c + 2*e)*( 
1 + E^(2*d)))
 

Rubi [A] (verified)

Time = 0.37 (sec) , antiderivative size = 117, 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.111, 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 ^2(d+e x) \, dx\)

\(\Big \downarrow \) 6007

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

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {4 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}+\frac {4 e^{c (a+b x)} \operatorname {Hypergeometric2F1}\left (2,\frac {b c}{2 e},\frac {b c}{2 e}+1,-e^{2 (d+e x)}\right )}{b c}+\frac {e^{c (a+b x)}}{b c}\)

Input:

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

Output:

E^(c*(a + b*x))/(b*c) - (4*E^(c*(a + b*x))*Hypergeometric2F1[1, (b*c)/(2*e 
), 1 + (b*c)/(2*e), -E^(2*(d + e*x))])/(b*c) + (4*E^(c*(a + b*x))*Hypergeo 
metric2F1[2, (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 )^{2}d x\]

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

-16*b*c*e*integrate(e^(b*c*x + a*c)/(b^2*c^2 - 6*b*c*e + 8*e^2 + (b^2*c^2* 
e^(6*d) - 6*b*c*e*e^(6*d) + 8*e^2*e^(6*d))*e^(6*e*x) + 3*(b^2*c^2*e^(4*d) 
- 6*b*c*e*e^(4*d) + 8*e^2*e^(4*d))*e^(4*e*x) + 3*(b^2*c^2*e^(2*d) - 6*b*c* 
e*e^(2*d) + 8*e^2*e^(2*d))*e^(2*e*x)), x) + (b^2*c^2*e^(a*c) + 10*b*c*e*e^ 
(a*c) + 8*e^2*e^(a*c) + (b^2*c^2*e^(a*c + 4*d) - 6*b*c*e*e^(a*c + 4*d) + 8 
*e^2*e^(a*c + 4*d))*e^(4*e*x) - 2*(b^2*c^2*e^(a*c + 2*d) - 2*b*c*e*e^(a*c 
+ 2*d) - 8*e^2*e^(a*c + 2*d))*e^(2*e*x))*e^(b*c*x)/(b^3*c^3 - 6*b^2*c^2*e 
+ 8*b*c*e^2 + (b^3*c^3*e^(4*d) - 6*b^2*c^2*e*e^(4*d) + 8*b*c*e^2*e^(4*d))* 
e^(4*e*x) + 2*(b^3*c^3*e^(2*d) - 6*b^2*c^2*e*e^(2*d) + 8*b*c*e^2*e^(2*d))* 
e^(2*e*x))
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

(e**(a*c)*(e**(b*c*x + 2*d + 2*e*x)*b*c - 2*e**(b*c*x + 2*d + 2*e*x)*e - 3 
*e**(b*c*x)*b*c - 2*e**(b*c*x)*e + 4*e**(2*d + 2*e*x)*int(e**(b*c*x)/(e**( 
4*d + 4*e*x)*b*c - 2*e**(4*d + 4*e*x)*e + 2*e**(2*d + 2*e*x)*b*c - 4*e**(2 
*d + 2*e*x)*e + b*c - 2*e),x)*b**3*c**3 - 8*e**(2*d + 2*e*x)*int(e**(b*c*x 
)/(e**(4*d + 4*e*x)*b*c - 2*e**(4*d + 4*e*x)*e + 2*e**(2*d + 2*e*x)*b*c - 
4*e**(2*d + 2*e*x)*e + b*c - 2*e),x)*b**2*c**2*e + 4*int(e**(b*c*x)/(e**(4 
*d + 4*e*x)*b*c - 2*e**(4*d + 4*e*x)*e + 2*e**(2*d + 2*e*x)*b*c - 4*e**(2* 
d + 2*e*x)*e + b*c - 2*e),x)*b**3*c**3 - 8*int(e**(b*c*x)/(e**(4*d + 4*e*x 
)*b*c - 2*e**(4*d + 4*e*x)*e + 2*e**(2*d + 2*e*x)*b*c - 4*e**(2*d + 2*e*x) 
*e + b*c - 2*e),x)*b**2*c**2*e))/(b*c*(e**(2*d + 2*e*x)*b*c - 2*e**(2*d + 
2*e*x)*e + b*c - 2*e))