\(\int \frac {\text {sech}^4(a+b \log (c x^n))}{x} \, dx\) [194]

   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 = 17, antiderivative size = 42 \[ \int \frac {\text {sech}^4\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {\tanh \left (a+b \log \left (c x^n\right )\right )}{b n}-\frac {\tanh ^3\left (a+b \log \left (c x^n\right )\right )}{3 b n} \]

[Out]

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

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {3852} \[ \int \frac {\text {sech}^4\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {\tanh \left (a+b \log \left (c x^n\right )\right )}{b n}-\frac {\tanh ^3\left (a+b \log \left (c x^n\right )\right )}{3 b n} \]

[In]

Int[Sech[a + b*Log[c*x^n]]^4/x,x]

[Out]

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

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

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.00 \[ \int \frac {\text {sech}^4\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {\tanh \left (a+b \log \left (c x^n\right )\right )}{b n}-\frac {\tanh ^3\left (a+b \log \left (c x^n\right )\right )}{3 b n} \]

[In]

Integrate[Sech[a + b*Log[c*x^n]]^4/x,x]

[Out]

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

Maple [A] (verified)

Time = 18.95 (sec) , antiderivative size = 36, normalized size of antiderivative = 0.86

method result size
derivativedivides \(\frac {\left (\frac {2}{3}+\frac {{\operatorname {sech}\left (a +b \ln \left (c \,x^{n}\right )\right )}^{2}}{3}\right ) \tanh \left (a +b \ln \left (c \,x^{n}\right )\right )}{n b}\) \(36\)
default \(\frac {\left (\frac {2}{3}+\frac {{\operatorname {sech}\left (a +b \ln \left (c \,x^{n}\right )\right )}^{2}}{3}\right ) \tanh \left (a +b \ln \left (c \,x^{n}\right )\right )}{n b}\) \(36\)
parallelrisch \(\frac {6 {\tanh \left (\frac {a}{2}+b \ln \left (\sqrt {c \,x^{n}}\right )\right )}^{5}+4 {\tanh \left (\frac {a}{2}+b \ln \left (\sqrt {c \,x^{n}}\right )\right )}^{3}+6 \tanh \left (\frac {a}{2}+b \ln \left (\sqrt {c \,x^{n}}\right )\right )}{3 b n {\left (1+{\tanh \left (\frac {a}{2}+b \ln \left (\sqrt {c \,x^{n}}\right )\right )}^{2}\right )}^{3}}\) \(86\)
risch \(-\frac {4 \left (3 \left (x^{n}\right )^{2 b} c^{2 b} {\mathrm e}^{2 a} {\mathrm e}^{i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}} {\mathrm e}^{-i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )} {\mathrm e}^{-i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}} {\mathrm e}^{i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )}+1\right )}{3 b n {\left (\left (x^{n}\right )^{2 b} c^{2 b} {\mathrm e}^{2 a} {\mathrm e}^{i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}} {\mathrm e}^{-i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )} {\mathrm e}^{-i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}} {\mathrm e}^{i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )}+1\right )}^{3}}\) \(222\)

[In]

int(sech(a+b*ln(c*x^n))^4/x,x,method=_RETURNVERBOSE)

[Out]

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 272 vs. \(2 (40) = 80\).

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

[In]

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

[Out]

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

Sympy [F]

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

[In]

integrate(sech(a+b*ln(c*x**n))**4/x,x)

[Out]

Integral(sech(a + b*log(c*x**n))**4/x, x)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 91 vs. \(2 (40) = 80\).

Time = 0.21 (sec) , antiderivative size = 91, normalized size of antiderivative = 2.17 \[ \int \frac {\text {sech}^4\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\frac {4 \, {\left (3 \, c^{2 \, b} e^{\left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right )} + 1\right )}}{3 \, {\left (b c^{6 \, b} n e^{\left (6 \, b \log \left (x^{n}\right ) + 6 \, a\right )} + 3 \, b c^{4 \, b} n e^{\left (4 \, b \log \left (x^{n}\right ) + 4 \, a\right )} + 3 \, b c^{2 \, b} n e^{\left (2 \, b \log \left (x^{n}\right ) + 2 \, a\right )} + b n\right )}} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.12 \[ \int \frac {\text {sech}^4\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=-\frac {4 \, {\left (3 \, c^{2 \, b} x^{2 \, b n} e^{\left (2 \, a\right )} + 1\right )}}{3 \, {\left (c^{2 \, b} x^{2 \, b n} e^{\left (2 \, a\right )} + 1\right )}^{3} b n} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 2.01 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.31 \[ \int \frac {\text {sech}^4\left (a+b \log \left (c x^n\right )\right )}{x} \, dx=\frac {4\,{\mathrm {e}}^{4\,a}\,{\left (c\,x^n\right )}^{4\,b}\,\left ({\mathrm {e}}^{2\,a}\,{\left (c\,x^n\right )}^{2\,b}+3\right )}{3\,b\,n\,{\left ({\mathrm {e}}^{2\,a}\,{\left (c\,x^n\right )}^{2\,b}+1\right )}^3} \]

[In]

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

[Out]

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