\(\int \text {sech}^2(a+b x) \, dx\) [2]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 8, antiderivative size = 10 \[ \int \text {sech}^2(a+b x) \, dx=\frac {\tanh (a+b x)}{b} \]

[Out]

tanh(b*x+a)/b

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3852, 8} \[ \int \text {sech}^2(a+b x) \, dx=\frac {\tanh (a+b x)}{b} \]

[In]

Int[Sech[a + b*x]^2,x]

[Out]

Tanh[a + b*x]/b

Rule 8

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

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rubi steps \begin{align*} \text {integral}& = \frac {i \text {Subst}(\int 1 \, dx,x,-i \tanh (a+b x))}{b} \\ & = \frac {\tanh (a+b x)}{b} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 10, normalized size of antiderivative = 1.00 \[ \int \text {sech}^2(a+b x) \, dx=\frac {\tanh (a+b x)}{b} \]

[In]

Integrate[Sech[a + b*x]^2,x]

[Out]

Tanh[a + b*x]/b

Maple [A] (verified)

Time = 0.58 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.10

method result size
derivativedivides \(\frac {\tanh \left (b x +a \right )}{b}\) \(11\)
default \(\frac {\tanh \left (b x +a \right )}{b}\) \(11\)
risch \(-\frac {2}{b \left (1+{\mathrm e}^{2 b x +2 a}\right )}\) \(19\)
parallelrisch \(\frac {2 \tanh \left (\frac {b x}{2}+\frac {a}{2}\right )}{b \left (1+\tanh \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}\right )}\) \(30\)

[In]

int(sech(b*x+a)^2,x,method=_RETURNVERBOSE)

[Out]

tanh(b*x+a)/b

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 41 vs. \(2 (10) = 20\).

Time = 0.25 (sec) , antiderivative size = 41, normalized size of antiderivative = 4.10 \[ \int \text {sech}^2(a+b x) \, dx=-\frac {2}{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} + b} \]

[In]

integrate(sech(b*x+a)^2,x, algorithm="fricas")

[Out]

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

Sympy [F]

\[ \int \text {sech}^2(a+b x) \, dx=\int \operatorname {sech}^{2}{\left (a + b x \right )}\, dx \]

[In]

integrate(sech(b*x+a)**2,x)

[Out]

Integral(sech(a + b*x)**2, x)

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.80 \[ \int \text {sech}^2(a+b x) \, dx=\frac {2}{b {\left (e^{\left (-2 \, b x - 2 \, a\right )} + 1\right )}} \]

[In]

integrate(sech(b*x+a)^2,x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.80 \[ \int \text {sech}^2(a+b x) \, dx=-\frac {2}{b {\left (e^{\left (2 \, b x + 2 \, a\right )} + 1\right )}} \]

[In]

integrate(sech(b*x+a)^2,x, algorithm="giac")

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 18, normalized size of antiderivative = 1.80 \[ \int \text {sech}^2(a+b x) \, dx=-\frac {2}{b\,\left ({\mathrm {e}}^{2\,a+2\,b\,x}+1\right )} \]

[In]

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

[Out]

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