3.1.77 \(\int \frac {1}{a-a \text {sech}(c+d x)} \, dx\) [77]

Optimal. Leaf size=30 \[ \frac {x}{a}-\frac {\tanh (c+d x)}{d (a-a \text {sech}(c+d x))} \]

[Out]

x/a-tanh(d*x+c)/d/(a-a*sech(d*x+c))

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 30, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {3862, 8} \begin {gather*} \frac {x}{a}-\frac {\tanh (c+d x)}{d (a-a \text {sech}(c+d x))} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(a - a*Sech[c + d*x])^(-1),x]

[Out]

x/a - Tanh[c + d*x]/(d*(a - a*Sech[c + d*x]))

Rule 8

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

Rule 3862

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n_), x_Symbol] :> Simp[(-Cot[c + d*x])*((a + b*Csc[c + d*x])^n/(d*
(2*n + 1))), x] + Dist[1/(a^2*(2*n + 1)), Int[(a + b*Csc[c + d*x])^(n + 1)*(a*(2*n + 1) - b*(n + 1)*Csc[c + d*
x]), x], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0] && LeQ[n, -1] && IntegerQ[2*n]

Rubi steps

\begin {align*} \int \frac {1}{a-a \text {sech}(c+d x)} \, dx &=-\frac {\tanh (c+d x)}{d (a-a \text {sech}(c+d x))}+\frac {\int a \, dx}{a^2}\\ &=\frac {x}{a}-\frac {\tanh (c+d x)}{d (a-a \text {sech}(c+d x))}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.10, size = 59, normalized size = 1.97 \begin {gather*} \frac {\text {csch}\left (\frac {c}{2}\right ) \text {csch}\left (\frac {1}{2} (c+d x)\right ) \left (-d x \cosh \left (\frac {d x}{2}\right )+d x \cosh \left (c+\frac {d x}{2}\right )+2 \sinh \left (\frac {d x}{2}\right )\right )}{2 a d} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(a - a*Sech[c + d*x])^(-1),x]

[Out]

(Csch[c/2]*Csch[(c + d*x)/2]*(-(d*x*Cosh[(d*x)/2]) + d*x*Cosh[c + (d*x)/2] + 2*Sinh[(d*x)/2]))/(2*a*d)

________________________________________________________________________________________

Maple [A]
time = 1.72, size = 48, normalized size = 1.60

method result size
risch \(\frac {x}{a}-\frac {2}{a d \left ({\mathrm e}^{d x +c}-1\right )}\) \(25\)
derivativedivides \(\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {1}{\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}}{d a}\) \(48\)
default \(\frac {\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\ln \left (\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {1}{\tanh \left (\frac {d x}{2}+\frac {c}{2}\right )}}{d a}\) \(48\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a-a*sech(d*x+c)),x,method=_RETURNVERBOSE)

[Out]

1/d/a*(ln(tanh(1/2*d*x+1/2*c)+1)-ln(tanh(1/2*d*x+1/2*c)-1)-1/tanh(1/2*d*x+1/2*c))

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 35, normalized size = 1.17 \begin {gather*} \frac {d x + c}{a d} + \frac {2}{{\left (a e^{\left (-d x - c\right )} - a\right )} d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a-a*sech(d*x+c)),x, algorithm="maxima")

[Out]

(d*x + c)/(a*d) + 2/((a*e^(-d*x - c) - a)*d)

________________________________________________________________________________________

Fricas [A]
time = 0.42, size = 50, normalized size = 1.67 \begin {gather*} \frac {d x \cosh \left (d x + c\right ) + d x \sinh \left (d x + c\right ) - d x - 2}{a d \cosh \left (d x + c\right ) + a d \sinh \left (d x + c\right ) - a d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a-a*sech(d*x+c)),x, algorithm="fricas")

[Out]

(d*x*cosh(d*x + c) + d*x*sinh(d*x + c) - d*x - 2)/(a*d*cosh(d*x + c) + a*d*sinh(d*x + c) - a*d)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \frac {\int \frac {1}{\operatorname {sech}{\left (c + d x \right )} - 1}\, dx}{a} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a-a*sech(d*x+c)),x)

[Out]

-Integral(1/(sech(c + d*x) - 1), x)/a

________________________________________________________________________________________

Giac [A]
time = 0.38, size = 29, normalized size = 0.97 \begin {gather*} \frac {\frac {d x + c}{a} - \frac {2}{a {\left (e^{\left (d x + c\right )} - 1\right )}}}{d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/(a-a*sech(d*x+c)),x, algorithm="giac")

[Out]

((d*x + c)/a - 2/(a*(e^(d*x + c) - 1)))/d

________________________________________________________________________________________

Mupad [B]
time = 1.26, size = 24, normalized size = 0.80 \begin {gather*} \frac {x}{a}-\frac {2}{a\,d\,\left ({\mathrm {e}}^{c+d\,x}-1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/(a - a/cosh(c + d*x)),x)

[Out]

x/a - 2/(a*d*(exp(c + d*x) - 1))

________________________________________________________________________________________