3.156 \(\int \cosh (a+b x) \tanh ^2(c+b x) \, dx\)

Optimal. Leaf size=45 \[ \frac{\sinh (a-c) \text{sech}(b x+c)}{b}-\frac{\cosh (a-c) \tan ^{-1}(\sinh (b x+c))}{b}+\frac{\sinh (a+b x)}{b} \]

[Out]

-((ArcTan[Sinh[c + b*x]]*Cosh[a - c])/b) + (Sech[c + b*x]*Sinh[a - c])/b + Sinh[a + b*x]/b

________________________________________________________________________________________

Rubi [A]  time = 0.0424318, antiderivative size = 45, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 6, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.4, Rules used = {5623, 5620, 2637, 3770, 2606, 8} \[ \frac{\sinh (a-c) \text{sech}(b x+c)}{b}-\frac{\cosh (a-c) \tan ^{-1}(\sinh (b x+c))}{b}+\frac{\sinh (a+b x)}{b} \]

Antiderivative was successfully verified.

[In]

Int[Cosh[a + b*x]*Tanh[c + b*x]^2,x]

[Out]

-((ArcTan[Sinh[c + b*x]]*Cosh[a - c])/b) + (Sech[c + b*x]*Sinh[a - c])/b + Sinh[a + b*x]/b

Rule 5623

Int[Cosh[v_]*Tanh[w_]^(n_.), x_Symbol] :> Int[Sinh[v]*Tanh[w]^(n - 1), x] - Dist[Sinh[v - w], Int[Sech[w]*Tanh
[w]^(n - 1), x], x] /; GtQ[n, 0] && NeQ[w, v] && FreeQ[v - w, x]

Rule 5620

Int[Sinh[v_]*Tanh[w_]^(n_.), x_Symbol] :> Int[Cosh[v]*Tanh[w]^(n - 1), x] - Dist[Cosh[v - w], Int[Sech[w]*Tanh
[w]^(n - 1), x], x] /; GtQ[n, 0] && NeQ[w, v] && FreeQ[v - w, x]

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rule 3770

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rubi steps

\begin{align*} \int \cosh (a+b x) \tanh ^2(c+b x) \, dx &=-(\sinh (a-c) \int \text{sech}(c+b x) \tanh (c+b x) \, dx)+\int \sinh (a+b x) \tanh (c+b x) \, dx\\ &=-(\cosh (a-c) \int \text{sech}(c+b x) \, dx)+\frac{\sinh (a-c) \operatorname{Subst}(\int 1 \, dx,x,\text{sech}(c+b x))}{b}+\int \cosh (a+b x) \, dx\\ &=-\frac{\tan ^{-1}(\sinh (c+b x)) \cosh (a-c)}{b}+\frac{\text{sech}(c+b x) \sinh (a-c)}{b}+\frac{\sinh (a+b x)}{b}\\ \end{align*}

Mathematica [B]  time = 0.0976402, size = 102, normalized size = 2.27 \[ \frac{\sinh (a-c) \text{sech}(b x+c)}{b}-\frac{2 \cosh (a-c) \tan ^{-1}\left (\frac{(\cosh (c)-\sinh (c)) \left (\sinh (c) \cosh \left (\frac{b x}{2}\right )+\cosh (c) \sinh \left (\frac{b x}{2}\right )\right )}{\cosh (c) \cosh \left (\frac{b x}{2}\right )-\sinh (c) \cosh \left (\frac{b x}{2}\right )}\right )}{b}+\frac{\sinh (a) \cosh (b x)}{b}+\frac{\cosh (a) \sinh (b x)}{b} \]

Antiderivative was successfully verified.

[In]

Integrate[Cosh[a + b*x]*Tanh[c + b*x]^2,x]

[Out]

(-2*ArcTan[((Cosh[c] - Sinh[c])*(Cosh[(b*x)/2]*Sinh[c] + Cosh[c]*Sinh[(b*x)/2]))/(Cosh[c]*Cosh[(b*x)/2] - Cosh
[(b*x)/2]*Sinh[c])]*Cosh[a - c])/b + (Cosh[b*x]*Sinh[a])/b + (Sech[c + b*x]*Sinh[a - c])/b + (Cosh[a]*Sinh[b*x
])/b

________________________________________________________________________________________

Maple [C]  time = 0.089, size = 207, normalized size = 4.6 \begin{align*}{\frac{{{\rm e}^{bx+a}}}{2\,b}}-{\frac{{{\rm e}^{-bx-a}}}{2\,b}}+{\frac{{{\rm e}^{bx+a}} \left ({{\rm e}^{2\,a}}-{{\rm e}^{2\,c}} \right ) }{b \left ({{\rm e}^{2\,bx+2\,a+2\,c}}+{{\rm e}^{2\,a}} \right ) }}+{\frac{{\frac{i}{2}}\ln \left ({{\rm e}^{bx+a}}-i{{\rm e}^{a-c}} \right ){{\rm e}^{-a-c}}{{\rm e}^{2\,a}}}{b}}+{\frac{{\frac{i}{2}}\ln \left ({{\rm e}^{bx+a}}-i{{\rm e}^{a-c}} \right ){{\rm e}^{-a-c}}{{\rm e}^{2\,c}}}{b}}-{\frac{{\frac{i}{2}}\ln \left ({{\rm e}^{bx+a}}+i{{\rm e}^{a-c}} \right ){{\rm e}^{-a-c}}{{\rm e}^{2\,a}}}{b}}-{\frac{{\frac{i}{2}}\ln \left ({{\rm e}^{bx+a}}+i{{\rm e}^{a-c}} \right ){{\rm e}^{-a-c}}{{\rm e}^{2\,c}}}{b}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(b*x+a)*tanh(b*x+c)^2,x)

[Out]

1/2*exp(b*x+a)/b-1/2*exp(-b*x-a)/b+1/b*exp(b*x+a)*(exp(2*a)-exp(2*c))/(exp(2*b*x+2*a+2*c)+exp(2*a))+1/2*I/b*ln
(exp(b*x+a)-I*exp(a-c))*exp(-a-c)*exp(2*a)+1/2*I/b*ln(exp(b*x+a)-I*exp(a-c))*exp(-a-c)*exp(2*c)-1/2*I/b*ln(exp
(b*x+a)+I*exp(a-c))*exp(-a-c)*exp(2*a)-1/2*I/b*ln(exp(b*x+a)+I*exp(a-c))*exp(-a-c)*exp(2*c)

________________________________________________________________________________________

Maxima [B]  time = 1.75529, size = 139, normalized size = 3.09 \begin{align*} \frac{{\left (e^{\left (2 \, a\right )} + e^{\left (2 \, c\right )}\right )} \arctan \left (e^{\left (-b x - c\right )}\right ) e^{\left (-a - c\right )}}{b} - \frac{e^{\left (-b x - a\right )}}{2 \, b} + \frac{{\left (3 \, e^{\left (2 \, a\right )} - 2 \, e^{\left (2 \, c\right )}\right )} e^{\left (-2 \, b x - 2 \, a\right )} + e^{\left (2 \, c\right )}}{2 \, b{\left (e^{\left (-b x - a + 2 \, c\right )} + e^{\left (-3 \, b x - a\right )}\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(e^(2*a) + e^(2*c))*arctan(e^(-b*x - c))*e^(-a - c)/b - 1/2*e^(-b*x - a)/b + 1/2*((3*e^(2*a) - 2*e^(2*c))*e^(-
2*b*x - 2*a) + e^(2*c))/(b*(e^(-b*x - a + 2*c) + e^(-3*b*x - a)))

________________________________________________________________________________________

Fricas [B]  time = 2.2155, size = 2491, normalized size = 55.36 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*(cosh(b*x + c)^4*cosh(-a + c)^2 + (cosh(-a + c)^2 - 2*cosh(-a + c)*sinh(-a + c) + sinh(-a + c)^2)*sinh(b*x
 + c)^4 + 4*(cosh(b*x + c)*cosh(-a + c)^2 - 2*cosh(b*x + c)*cosh(-a + c)*sinh(-a + c) + cosh(b*x + c)*sinh(-a
+ c)^2)*sinh(b*x + c)^3 + 3*(cosh(-a + c)^2 - 1)*cosh(b*x + c)^2 + 3*(2*cosh(b*x + c)^2*cosh(-a + c)^2 + (2*co
sh(b*x + c)^2 + 1)*sinh(-a + c)^2 + cosh(-a + c)^2 - 2*(2*cosh(b*x + c)^2*cosh(-a + c) + cosh(-a + c))*sinh(-a
 + c) - 1)*sinh(b*x + c)^2 + (cosh(b*x + c)^4 + 3*cosh(b*x + c)^2)*sinh(-a + c)^2 - 2*((cosh(-a + c)^2 + 1)*co
sh(b*x + c)^3 + (cosh(-a + c)^2 - 2*cosh(-a + c)*sinh(-a + c) + sinh(-a + c)^2 + 1)*sinh(b*x + c)^3 - 3*(2*cos
h(b*x + c)*cosh(-a + c)*sinh(-a + c) - cosh(b*x + c)*sinh(-a + c)^2 - (cosh(-a + c)^2 + 1)*cosh(b*x + c))*sinh
(b*x + c)^2 + (cosh(b*x + c)^3 + cosh(b*x + c))*sinh(-a + c)^2 + (cosh(-a + c)^2 + 1)*cosh(b*x + c) + (3*(cosh
(-a + c)^2 + 1)*cosh(b*x + c)^2 + (3*cosh(b*x + c)^2 + 1)*sinh(-a + c)^2 + cosh(-a + c)^2 - 2*(3*cosh(b*x + c)
^2*cosh(-a + c) + cosh(-a + c))*sinh(-a + c) + 1)*sinh(b*x + c) - 2*(cosh(b*x + c)^3*cosh(-a + c) + cosh(b*x +
 c)*cosh(-a + c))*sinh(-a + c))*arctan(cosh(b*x + c) + sinh(b*x + c)) + 2*(2*cosh(b*x + c)^3*cosh(-a + c)^2 +
(2*cosh(b*x + c)^3 + 3*cosh(b*x + c))*sinh(-a + c)^2 + 3*(cosh(-a + c)^2 - 1)*cosh(b*x + c) - 2*(2*cosh(b*x +
c)^3*cosh(-a + c) + 3*cosh(b*x + c)*cosh(-a + c))*sinh(-a + c))*sinh(b*x + c) - 2*(cosh(b*x + c)^4*cosh(-a + c
) + 3*cosh(b*x + c)^2*cosh(-a + c))*sinh(-a + c) - 1)/(b*cosh(b*x + c)^3*cosh(-a + c) + (b*cosh(-a + c) - b*si
nh(-a + c))*sinh(b*x + c)^3 + b*cosh(b*x + c)*cosh(-a + c) + 3*(b*cosh(b*x + c)*cosh(-a + c) - b*cosh(b*x + c)
*sinh(-a + c))*sinh(b*x + c)^2 + (3*b*cosh(b*x + c)^2*cosh(-a + c) + b*cosh(-a + c) - (3*b*cosh(b*x + c)^2 + b
)*sinh(-a + c))*sinh(b*x + c) - (b*cosh(b*x + c)^3 + b*cosh(b*x + c))*sinh(-a + c))

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(b*x+a)*tanh(b*x+c)**2,x)

[Out]

Integral(cosh(a + b*x)*tanh(b*x + c)**2, x)

________________________________________________________________________________________

Giac [A]  time = 1.19028, size = 116, normalized size = 2.58 \begin{align*} -\frac{2 \,{\left (e^{\left (2 \, a\right )} + e^{\left (2 \, c\right )}\right )} \arctan \left (e^{\left (b x + c\right )}\right ) e^{\left (-a - c\right )} - \frac{{\left (2 \, e^{\left (2 \, b x + 2 \, a\right )} - 3 \, e^{\left (2 \, b x + 2 \, c\right )} - 1\right )} e^{\left (-a\right )}}{e^{\left (3 \, b x + 2 \, c\right )} + e^{\left (b x\right )}} - e^{\left (b x + a\right )}}{2 \, b} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*(2*(e^(2*a) + e^(2*c))*arctan(e^(b*x + c))*e^(-a - c) - (2*e^(2*b*x + 2*a) - 3*e^(2*b*x + 2*c) - 1)*e^(-a
)/(e^(3*b*x + 2*c) + e^(b*x)) - e^(b*x + a))/b