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

Optimal result
Mathematica [B] (verified)
Rubi [A] (verified)
Maple [F]
Fricas [F]
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 13, antiderivative size = 71 \[ \int \text {sech}^4\left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {16 e^{-4 a} x \left (c x^n\right )^{-4 b} \operatorname {Hypergeometric2F1}\left (4,\frac {1}{2} \left (4-\frac {1}{b n}\right ),\frac {1}{2} \left (6-\frac {1}{b n}\right ),-e^{-2 a} \left (c x^n\right )^{-2 b}\right )}{1-4 b n} \] Output:

16*x*hypergeom([4, 2-1/2/b/n],[3-1/2/b/n],-1/exp(2*a)/((c*x^n)^(2*b)))/exp 
(4*a)/(-4*b*n+1)/((c*x^n)^(4*b))
 

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(192\) vs. \(2(71)=142\).

Time = 8.90 (sec) , antiderivative size = 192, normalized size of antiderivative = 2.70 \[ \int \text {sech}^4\left (a+b \log \left (c x^n\right )\right ) \, dx=\frac {x \left (-2 e^{2 a} (-1+2 b n) \left (c x^n\right )^{2 b} \operatorname {Hypergeometric2F1}\left (1,1+\frac {1}{2 b n},2+\frac {1}{2 b n},-e^{2 a} \left (c x^n\right )^{2 b}\right )+\left (-2+8 b^2 n^2\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {1}{2 b n},1+\frac {1}{2 b n},-e^{2 a} \left (c x^n\right )^{2 b}\right )+\text {sech}^2\left (a+b \log \left (c x^n\right )\right ) \left (2 b n+\left (-1+8 b^2 n^2+\left (-1+4 b^2 n^2\right ) \cosh \left (2 \left (a+b \log \left (c x^n\right )\right )\right )\right ) \tanh \left (a+b \log \left (c x^n\right )\right )\right )\right )}{12 b^3 n^3} \] Input:

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

Output:

(x*(-2*E^(2*a)*(-1 + 2*b*n)*(c*x^n)^(2*b)*Hypergeometric2F1[1, 1 + 1/(2*b* 
n), 2 + 1/(2*b*n), -(E^(2*a)*(c*x^n)^(2*b))] + (-2 + 8*b^2*n^2)*Hypergeome 
tric2F1[1, 1/(2*b*n), 1 + 1/(2*b*n), -(E^(2*a)*(c*x^n)^(2*b))] + Sech[a + 
b*Log[c*x^n]]^2*(2*b*n + (-1 + 8*b^2*n^2 + (-1 + 4*b^2*n^2)*Cosh[2*(a + b* 
Log[c*x^n])])*Tanh[a + b*Log[c*x^n]])))/(12*b^3*n^3)
 

Rubi [A] (verified)

Time = 0.33 (sec) , antiderivative size = 69, normalized size of antiderivative = 0.97, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {6079, 6081, 795, 888}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \text {sech}^4\left (a+b \log \left (c x^n\right )\right ) \, dx\)

\(\Big \downarrow \) 6079

\(\displaystyle \frac {x \left (c x^n\right )^{-1/n} \int \left (c x^n\right )^{\frac {1}{n}-1} \text {sech}^4\left (a+b \log \left (c x^n\right )\right )d\left (c x^n\right )}{n}\)

\(\Big \downarrow \) 6081

\(\displaystyle \frac {16 e^{-4 a} x \left (c x^n\right )^{-1/n} \int \frac {\left (c x^n\right )^{-4 b+\frac {1}{n}-1}}{\left (e^{-2 a} \left (c x^n\right )^{-2 b}+1\right )^4}d\left (c x^n\right )}{n}\)

\(\Big \downarrow \) 795

\(\displaystyle \frac {16 e^{-4 a} x \left (c x^n\right )^{-1/n} \int \frac {\left (c x^n\right )^{4 b+\frac {1}{n}-1}}{\left (\left (c x^n\right )^{2 b}+e^{-2 a}\right )^4}d\left (c x^n\right )}{n}\)

\(\Big \downarrow \) 888

\(\displaystyle \frac {16 e^{4 a} x \left (c x^n\right )^{4 b} \operatorname {Hypergeometric2F1}\left (4,\frac {1}{2} \left (4+\frac {1}{b n}\right ),\frac {1}{2} \left (6+\frac {1}{b n}\right ),-e^{2 a} \left (c x^n\right )^{2 b}\right )}{4 b n+1}\)

Input:

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

Output:

(16*E^(4*a)*x*(c*x^n)^(4*b)*Hypergeometric2F1[4, (4 + 1/(b*n))/2, (6 + 1/( 
b*n))/2, -(E^(2*a)*(c*x^n)^(2*b))])/(1 + 4*b*n)
 

Defintions of rubi rules used

rule 795
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Int[x^(m + n*p)* 
(b + a/x^n)^p, x] /; FreeQ[{a, b, m, n}, x] && IntegerQ[p] && NegQ[n]
 

rule 888
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p 
*((c*x)^(m + 1)/(c*(m + 1)))*Hypergeometric2F1[-p, (m + 1)/n, (m + 1)/n + 1 
, (-b)*(x^n/a)], x] /; FreeQ[{a, b, c, m, n, p}, x] &&  !IGtQ[p, 0] && (ILt 
Q[p, 0] || GtQ[a, 0])
 

rule 6079
Int[Sech[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(d_.)]^(p_.), x_Symbol] :> S 
imp[x/(n*(c*x^n)^(1/n))   Subst[Int[x^(1/n - 1)*Sech[d*(a + b*Log[x])]^p, x 
], x, c*x^n], x] /; FreeQ[{a, b, c, d, n, p}, x] && (NeQ[c, 1] || NeQ[n, 1] 
)
 

rule 6081
Int[((e_.)*(x_))^(m_.)*Sech[((a_.) + Log[x_]*(b_.))*(d_.)]^(p_.), x_Symbol] 
 :> Simp[2^p/E^(a*d*p)   Int[(e*x)^m*(1/(x^(b*d*p)*(1 + 1/(E^(2*a*d)*x^(2*b 
*d)))^p)), x], x] /; FreeQ[{a, b, d, e, m}, x] && IntegerQ[p]
 
Maple [F]

\[\int {\operatorname {sech}\left (a +b \ln \left (c \,x^{n}\right )\right )}^{4}d x\]

Input:

int(sech(a+b*ln(c*x^n))^4,x)
 

Output:

int(sech(a+b*ln(c*x^n))^4,x)
 

Fricas [F]

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

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

Output:

integral(sech(b*log(c*x^n) + a)^4, x)
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

integrate(sech(b*log(c*x^n) + a)^4, x)
 

Mupad [F(-1)]

Timed out. \[ \int \text {sech}^4\left (a+b \log \left (c x^n\right )\right ) \, dx=\int \frac {1}{{\mathrm {cosh}\left (a+b\,\ln \left (c\,x^n\right )\right )}^4} \,d x \] Input:

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

Output:

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

Reduce [F]

\[ \int \text {sech}^4\left (a+b \log \left (c x^n\right )\right ) \, dx=\text {too large to display} \] Input:

int(sech(a+b*log(c*x^n))^4,x)
 

Output:

(16*e**(2*a)*c**(2*b)*(8*x**(6*b*n)*e**(6*a)*c**(6*b)*int(x**(2*b*n)/(4*x* 
*(8*b*n)*e**(8*a)*c**(8*b)*b*n - x**(8*b*n)*e**(8*a)*c**(8*b) + 16*x**(6*b 
*n)*e**(6*a)*c**(6*b)*b*n - 4*x**(6*b*n)*e**(6*a)*c**(6*b) + 24*x**(4*b*n) 
*e**(4*a)*c**(4*b)*b*n - 6*x**(4*b*n)*e**(4*a)*c**(4*b) + 16*x**(2*b*n)*e* 
*(2*a)*c**(2*b)*b*n - 4*x**(2*b*n)*e**(2*a)*c**(2*b) + 4*b*n - 1),x)*b**2* 
n**2 + 2*x**(6*b*n)*e**(6*a)*c**(6*b)*int(x**(2*b*n)/(4*x**(8*b*n)*e**(8*a 
)*c**(8*b)*b*n - x**(8*b*n)*e**(8*a)*c**(8*b) + 16*x**(6*b*n)*e**(6*a)*c** 
(6*b)*b*n - 4*x**(6*b*n)*e**(6*a)*c**(6*b) + 24*x**(4*b*n)*e**(4*a)*c**(4* 
b)*b*n - 6*x**(4*b*n)*e**(4*a)*c**(4*b) + 16*x**(2*b*n)*e**(2*a)*c**(2*b)* 
b*n - 4*x**(2*b*n)*e**(2*a)*c**(2*b) + 4*b*n - 1),x)*b*n - x**(6*b*n)*e**( 
6*a)*c**(6*b)*int(x**(2*b*n)/(4*x**(8*b*n)*e**(8*a)*c**(8*b)*b*n - x**(8*b 
*n)*e**(8*a)*c**(8*b) + 16*x**(6*b*n)*e**(6*a)*c**(6*b)*b*n - 4*x**(6*b*n) 
*e**(6*a)*c**(6*b) + 24*x**(4*b*n)*e**(4*a)*c**(4*b)*b*n - 6*x**(4*b*n)*e* 
*(4*a)*c**(4*b) + 16*x**(2*b*n)*e**(2*a)*c**(2*b)*b*n - 4*x**(2*b*n)*e**(2 
*a)*c**(2*b) + 4*b*n - 1),x) + 24*x**(4*b*n)*e**(4*a)*c**(4*b)*int(x**(2*b 
*n)/(4*x**(8*b*n)*e**(8*a)*c**(8*b)*b*n - x**(8*b*n)*e**(8*a)*c**(8*b) + 1 
6*x**(6*b*n)*e**(6*a)*c**(6*b)*b*n - 4*x**(6*b*n)*e**(6*a)*c**(6*b) + 24*x 
**(4*b*n)*e**(4*a)*c**(4*b)*b*n - 6*x**(4*b*n)*e**(4*a)*c**(4*b) + 16*x**( 
2*b*n)*e**(2*a)*c**(2*b)*b*n - 4*x**(2*b*n)*e**(2*a)*c**(2*b) + 4*b*n - 1) 
,x)*b**2*n**2 + 6*x**(4*b*n)*e**(4*a)*c**(4*b)*int(x**(2*b*n)/(4*x**(8*...