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

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

Optimal result

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

[Out]

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

Rubi [A] (verified)

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

[In]

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

[Out]

Tanh[a + b*x]/b - Tanh[a + b*x]^3/(3*b)

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}\left (\int \left (1+x^2\right ) \, dx,x,-i \tanh (a+b x)\right )}{b} \\ & = \frac {\tanh (a+b x)}{b}-\frac {\tanh ^3(a+b x)}{3 b} \\ \end{align*}

Mathematica [A] (verified)

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

[In]

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

[Out]

Tanh[a + b*x]/b - Tanh[a + b*x]^3/(3*b)

Maple [A] (verified)

Time = 0.63 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.88

method result size
derivativedivides \(\frac {\left (\frac {2}{3}+\frac {\operatorname {sech}\left (b x +a \right )^{2}}{3}\right ) \tanh \left (b x +a \right )}{b}\) \(23\)
default \(\frac {\left (\frac {2}{3}+\frac {\operatorname {sech}\left (b x +a \right )^{2}}{3}\right ) \tanh \left (b x +a \right )}{b}\) \(23\)
risch \(-\frac {4 \left (3 \,{\mathrm e}^{2 b x +2 a}+1\right )}{3 b \left (1+{\mathrm e}^{2 b x +2 a}\right )^{3}}\) \(32\)
parallelrisch \(\frac {6 \tanh \left (\frac {b x}{2}+\frac {a}{2}\right )^{5}+4 \tanh \left (\frac {b x}{2}+\frac {a}{2}\right )^{3}+6 \tanh \left (\frac {b x}{2}+\frac {a}{2}\right )}{3 b \left (1+\tanh \left (\frac {b x}{2}+\frac {a}{2}\right )^{2}\right )^{3}}\) \(59\)

[In]

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

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 164 vs. \(2 (24) = 48\).

Time = 0.24 (sec) , antiderivative size = 164, normalized size of antiderivative = 6.31 \[ \int \text {sech}^4(a+b x) \, dx=-\frac {8 \, {\left (2 \, \cosh \left (b x + a\right ) + \sinh \left (b x + a\right )\right )}}{3 \, {\left (b \cosh \left (b x + a\right )^{5} + 5 \, b \cosh \left (b x + a\right ) \sinh \left (b x + a\right )^{4} + b \sinh \left (b x + a\right )^{5} + 3 \, b \cosh \left (b x + a\right )^{3} + {\left (10 \, b \cosh \left (b x + a\right )^{2} + 3 \, b\right )} \sinh \left (b x + a\right )^{3} + {\left (10 \, b \cosh \left (b x + a\right )^{3} + 9 \, b \cosh \left (b x + a\right )\right )} \sinh \left (b x + a\right )^{2} + 4 \, b \cosh \left (b x + a\right ) + {\left (5 \, b \cosh \left (b x + a\right )^{4} + 9 \, b \cosh \left (b x + a\right )^{2} + 2 \, b\right )} \sinh \left (b x + a\right )\right )}} \]

[In]

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

[Out]

-8/3*(2*cosh(b*x + a) + sinh(b*x + a))/(b*cosh(b*x + a)^5 + 5*b*cosh(b*x + a)*sinh(b*x + a)^4 + b*sinh(b*x + a
)^5 + 3*b*cosh(b*x + a)^3 + (10*b*cosh(b*x + a)^2 + 3*b)*sinh(b*x + a)^3 + (10*b*cosh(b*x + a)^3 + 9*b*cosh(b*
x + a))*sinh(b*x + a)^2 + 4*b*cosh(b*x + a) + (5*b*cosh(b*x + a)^4 + 9*b*cosh(b*x + a)^2 + 2*b)*sinh(b*x + a))

Sympy [F]

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

[In]

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

[Out]

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 90 vs. \(2 (24) = 48\).

Time = 0.20 (sec) , antiderivative size = 90, normalized size of antiderivative = 3.46 \[ \int \text {sech}^4(a+b x) \, dx=\frac {4 \, e^{\left (-2 \, b x - 2 \, a\right )}}{b {\left (3 \, e^{\left (-2 \, b x - 2 \, a\right )} + 3 \, e^{\left (-4 \, b x - 4 \, a\right )} + e^{\left (-6 \, b x - 6 \, a\right )} + 1\right )}} + \frac {4}{3 \, b {\left (3 \, e^{\left (-2 \, b x - 2 \, a\right )} + 3 \, e^{\left (-4 \, b x - 4 \, a\right )} + e^{\left (-6 \, b x - 6 \, a\right )} + 1\right )}} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

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

[In]

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

[Out]

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