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

Optimal. Leaf size=117 \[ -\frac{4 e^{c (a+b x)} \, _2F_1\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)} \, _2F_1\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} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.126796, antiderivative size = 117, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 3, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {5484, 2194, 2251} \[ -\frac{4 e^{c (a+b x)} \, _2F_1\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)} \, _2F_1\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} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 5484

Int[(F_)^((c_.)*((a_.) + (b_.)*(x_)))*Tanh[(d_.) + (e_.)*(x_)]^(n_.), x_Symbol] :> 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] && Integer
Q[n]

Rule 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2251

Int[((a_) + (b_.)*(F_)^((e_.)*((c_.) + (d_.)*(x_))))^(p_)*(G_)^((h_.)*((f_.) + (g_.)*(x_))), x_Symbol] :> Simp
[(a^p*G^(h*(f + g*x))*Hypergeometric2F1[-p, (g*h*Log[G])/(d*e*Log[F]), (g*h*Log[G])/(d*e*Log[F]) + 1, Simplify
[-((b*F^(e*(c + d*x)))/a)]])/(g*h*Log[G]), x] /; FreeQ[{F, G, a, b, c, d, e, f, g, h, p}, x] && (ILtQ[p, 0] ||
 GtQ[a, 0])

Rubi steps

\begin{align*} \int e^{c (a+b x)} \tanh ^2(d+e x) \, dx &=\int \left (e^{c (a+b x)}+\frac{4 e^{c (a+b x)}}{\left (1+e^{2 (d+e x)}\right )^2}-\frac{4 e^{c (a+b x)}}{1+e^{2 (d+e x)}}\right ) \, dx\\ &=4 \int \frac{e^{c (a+b x)}}{\left (1+e^{2 (d+e x)}\right )^2} \, dx-4 \int \frac{e^{c (a+b x)}}{1+e^{2 (d+e x)}} \, dx+\int e^{c (a+b x)} \, dx\\ &=\frac{e^{c (a+b x)}}{b c}-\frac{4 e^{c (a+b x)} \, _2F_1\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)} \, _2F_1\left (2,\frac{b c}{2 e};1+\frac{b c}{2 e};-e^{2 (d+e x)}\right )}{b c}\\ \end{align*}

Mathematica [A]  time = 3.25664, size = 169, normalized size = 1.44 \[ \frac{e^{c (a+b x)} \left (2 b^2 c^2 e^{2 (d+e x)} \, _2F_1\left (1,\frac{b c}{2 e}+1;\frac{b c}{2 e}+2;-e^{2 (d+e x)}\right )-(b c+2 e) \left (2 b c e^{2 d} \, _2F_1\left (1,\frac{b c}{2 e};\frac{b c}{2 e}+1;-e^{2 (d+e x)}\right )-\left (e^{2 d}+1\right ) (e-b c \text{sech}(d) \sinh (e x) \text{sech}(d+e x))\right )\right )}{b c \left (e^{2 d}+1\right ) e (b c+2 e)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

(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)*Hypergeometric2F1[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)))

________________________________________________________________________________________

Maple [F]  time = 0.068, size = 0, normalized size = 0. \begin{align*} \int{{\rm e}^{c \left ( bx+a \right ) }} \left ( \tanh \left ( ex+d \right ) \right ) ^{2}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} -16 \, b c e \int \frac{e^{\left (b c x + a c\right )}}{b^{2} c^{2} - 6 \, b c e + 8 \, e^{2} +{\left (b^{2} c^{2} e^{\left (6 \, d\right )} - 6 \, b c e e^{\left (6 \, d\right )} + 8 \, e^{2} e^{\left (6 \, d\right )}\right )} e^{\left (6 \, e x\right )} + 3 \,{\left (b^{2} c^{2} e^{\left (4 \, d\right )} - 6 \, b c e e^{\left (4 \, d\right )} + 8 \, e^{2} e^{\left (4 \, d\right )}\right )} e^{\left (4 \, e x\right )} + 3 \,{\left (b^{2} c^{2} e^{\left (2 \, d\right )} - 6 \, b c e e^{\left (2 \, d\right )} + 8 \, e^{2} e^{\left (2 \, d\right )}\right )} e^{\left (2 \, e x\right )}}\,{d x} + \frac{{\left (b^{2} c^{2} e^{\left (a c\right )} + 10 \, b c e e^{\left (a c\right )} + 8 \, e^{2} e^{\left (a c\right )} +{\left (b^{2} c^{2} e^{\left (a c + 4 \, d\right )} - 6 \, b c e e^{\left (a c + 4 \, d\right )} + 8 \, e^{2} e^{\left (a c + 4 \, d\right )}\right )} e^{\left (4 \, e x\right )} - 2 \,{\left (b^{2} c^{2} e^{\left (a c + 2 \, d\right )} - 2 \, b c e e^{\left (a c + 2 \, d\right )} - 8 \, e^{2} e^{\left (a c + 2 \, d\right )}\right )} e^{\left (2 \, e x\right )}\right )} e^{\left (b c x\right )}}{b^{3} c^{3} - 6 \, b^{2} c^{2} e + 8 \, b c e^{2} +{\left (b^{3} c^{3} e^{\left (4 \, d\right )} - 6 \, b^{2} c^{2} e e^{\left (4 \, d\right )} + 8 \, b c e^{2} e^{\left (4 \, d\right )}\right )} e^{\left (4 \, e x\right )} + 2 \,{\left (b^{3} c^{3} e^{\left (2 \, d\right )} - 6 \, b^{2} c^{2} e e^{\left (2 \, d\right )} + 8 \, b c e^{2} e^{\left (2 \, d\right )}\right )} e^{\left (2 \, e x\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-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))

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (e^{\left (b c x + a c\right )} \tanh \left (e x + d\right )^{2}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} e^{a c} \int e^{b c x} \tanh ^{2}{\left (d + e x \right )}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int e^{\left ({\left (b x + a\right )} c\right )} \tanh \left (e x + d\right )^{2}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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