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(b*x+a))

________________________________________________________________________________________

Rubi [A]  time = 0.21, antiderivative size = 14, normalized size of antiderivative = 1.00, 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 verified.

[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.02, 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 verified.

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

________________________________________________________________________________________

fricas [B]  time = 0.41, size = 40, normalized size = 2.86 \[ \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 )}} \]

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

________________________________________________________________________________________

giac [A]  time = 0.15, size = 14, normalized size = 1.00 \[ \frac {e^{\left (-2 \, b x - 2 \, a\right )}}{2 \, b} \]

Verification 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

________________________________________________________________________________________

maple [B]  time = 1.08, size = 36, normalized size = 2.57 \[ \frac {-\frac {2}{\tanh \left (\frac {b x}{2}+\frac {a}{2}\right )+1}+\frac {2}{\left (\tanh \left (\frac {b x}{2}+\frac {a}{2}\right )+1\right )^{2}}}{b} \]

Verification 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/(tanh(1/2*b*x+1/2*a)+1)^2)

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 14, normalized size = 1.00 \[ \frac {e^{\left (-2 \, b x - 2 \, a\right )}}{2 \, b} \]

Verification 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

________________________________________________________________________________________

mupad [B]  time = 0.08, size = 14, normalized size = 1.00 \[ \frac {{\mathrm {e}}^{-2\,a-2\,b\,x}}{2\,b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((1/cosh(a + b*x) - 1/sinh(a + b*x))/(1/cosh(a + b*x) + 1/sinh(a + b*x)),x)

[Out]

exp(- 2*a - 2*b*x)/(2*b)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ - \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 \left (- \frac {\operatorname {sech}{\left (a + b x \right )}}{\operatorname {csch}{\left (a + b x \right )} + \operatorname {sech}{\left (a + b x \right )}}\right )\, dx \]

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

________________________________________________________________________________________