### 3.1056 $$\int \frac{-\text{csch}(a+b x)+\text{sech}(a+b x)}{\text{csch}(a+b x)+\text{sech}(a+b x)} \, dx$$

Optimal. Leaf size=14 $\frac{1}{b (\tanh (a+b x)+1)}$

[Out]

1/(b*(1 + Tanh[a + b*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.206698, antiderivative size = 14, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 31, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.032, Rules used = {32} $\frac{1}{b (\tanh (a+b x)+1)}$

Antiderivative was successfully veriﬁed.

[In]

Int[(-Csch[a + b*x] + Sech[a + b*x])/(Csch[a + b*x] + Sech[a + b*x]),x]

[Out]

1/(b*(1 + Tanh[a + b*x]))

Rule 32

Int[((a_.) + (b_.)*(x_))^(m_), x_Symbol] :> Simp[(a + b*x)^(m + 1)/(b*(m + 1)), x] /; FreeQ[{a, b, m}, x] && N
eQ[m, -1]

Rubi steps

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

Mathematica [B]  time = 0.0248082, size = 65, normalized size = 4.64 $\frac{\sinh (2 a) \sinh (2 b x)}{2 b}+\frac{\cosh (2 a) \cosh (2 b x)}{2 b}-\frac{\sinh (2 a) \cosh (2 b x)}{2 b}-\frac{\cosh (2 a) \sinh (2 b x)}{2 b}$

Antiderivative was successfully veriﬁed.

[In]

Integrate[(-Csch[a + b*x] + Sech[a + b*x])/(Csch[a + b*x] + Sech[a + b*x]),x]

[Out]

(Cosh[2*a]*Cosh[2*b*x])/(2*b) - (Cosh[2*b*x]*Sinh[2*a])/(2*b) - (Cosh[2*a]*Sinh[2*b*x])/(2*b) + (Sinh[2*a]*Sin
h[2*b*x])/(2*b)

________________________________________________________________________________________

Maple [B]  time = 0.129, size = 36, normalized size = 2.6 \begin{align*}{\frac{1}{b} \left ( 2\, \left ( \tanh \left ( 1/2\,bx+a/2 \right ) +1 \right ) ^{-2}-2\, \left ( \tanh \left ( 1/2\,bx+a/2 \right ) +1 \right ) ^{-1} \right ) } \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

int((-csch(b*x+a)+sech(b*x+a))/(csch(b*x+a)+sech(b*x+a)),x)

[Out]

1/b*(2/(tanh(1/2*b*x+1/2*a)+1)^2-2/(tanh(1/2*b*x+1/2*a)+1))

________________________________________________________________________________________

Maxima [A]  time = 1.10967, size = 19, normalized size = 1.36 \begin{align*} \frac{e^{\left (-2 \, b x - 2 \, a\right )}}{2 \, b} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((-csch(b*x+a)+sech(b*x+a))/(csch(b*x+a)+sech(b*x+a)),x, algorithm="maxima")

[Out]

1/2*e^(-2*b*x - 2*a)/b

________________________________________________________________________________________

Fricas [B]  time = 2.0868, size = 107, normalized size = 7.64 \begin{align*} \frac{1}{2 \,{\left (b \cosh \left (b x + a\right )^{2} + 2 \, b \cosh \left (b x + a\right ) \sinh \left (b x + a\right ) + b \sinh \left (b x + a\right )^{2}\right )}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((-csch(b*x+a)+sech(b*x+a))/(csch(b*x+a)+sech(b*x+a)),x, algorithm="fricas")

[Out]

1/2/(b*cosh(b*x + a)^2 + 2*b*cosh(b*x + a)*sinh(b*x + a) + b*sinh(b*x + a)^2)

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} - \int \frac{\operatorname{csch}{\left (a + b x \right )}}{\operatorname{csch}{\left (a + b x \right )} + \operatorname{sech}{\left (a + b x \right )}}\, dx - \int - \frac{\operatorname{sech}{\left (a + b x \right )}}{\operatorname{csch}{\left (a + b x \right )} + \operatorname{sech}{\left (a + b x \right )}}\, dx \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((-csch(b*x+a)+sech(b*x+a))/(csch(b*x+a)+sech(b*x+a)),x)

[Out]

-Integral(csch(a + b*x)/(csch(a + b*x) + sech(a + b*x)), x) - Integral(-sech(a + b*x)/(csch(a + b*x) + sech(a
+ b*x)), x)

________________________________________________________________________________________

Giac [A]  time = 1.13312, size = 19, normalized size = 1.36 \begin{align*} \frac{e^{\left (-2 \, b x - 2 \, a\right )}}{2 \, b} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

integrate((-csch(b*x+a)+sech(b*x+a))/(csch(b*x+a)+sech(b*x+a)),x, algorithm="giac")

[Out]

1/2*e^(-2*b*x - 2*a)/b