Optimal. Leaf size=89 \[ \frac {e^{2 a} (2-p) x \left (c x^n\right )^{-\frac {2}{n (2-p)}} \left (1+e^{-2 a} \left (c x^n\right )^{\frac {2}{n (2-p)}}\right ) \text {sech}^p\left (a-\frac {\log \left (c x^n\right )}{n (2-p)}\right )}{2 (1-p)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 89, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.150, Rules used = {5664, 5668,
267} \begin {gather*} \frac {e^{2 a} (2-p) x \left (c x^n\right )^{-\frac {2}{n (2-p)}} \left (e^{-2 a} \left (c x^n\right )^{\frac {2}{n (2-p)}}+1\right ) \text {sech}^p\left (a-\frac {\log \left (c x^n\right )}{n (2-p)}\right )}{2 (1-p)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 267
Rule 5664
Rule 5668
Rubi steps
\begin {align*} \int \text {sech}^p\left (a+\frac {\log \left (c x^n\right )}{n (-2+p)}\right ) \, dx &=\frac {\left (x \left (c x^n\right )^{-1/n}\right ) \text {Subst}\left (\int x^{-1+\frac {1}{n}} \text {sech}^p\left (a+\frac {\log (x)}{n (-2+p)}\right ) \, dx,x,c x^n\right )}{n}\\ &=\frac {\left (x \left (c x^n\right )^{-\frac {1}{n}+\frac {p}{n (-2+p)}} \left (1+e^{-2 a} \left (c x^n\right )^{-\frac {2}{n (-2+p)}}\right )^p \text {sech}^p\left (a+\frac {\log \left (c x^n\right )}{n (-2+p)}\right )\right ) \text {Subst}\left (\int x^{-1+\frac {1}{n}-\frac {p}{n (-2+p)}} \left (1+e^{-2 a} x^{-\frac {2}{n (-2+p)}}\right )^{-p} \, dx,x,c x^n\right )}{n}\\ &=\frac {e^{2 a} (2-p) x \left (c x^n\right )^{-\frac {2}{n (2-p)}} \left (1+e^{-2 a} \left (c x^n\right )^{\frac {2}{n (2-p)}}\right ) \text {sech}^p\left (a-\frac {\log \left (c x^n\right )}{n (2-p)}\right )}{2 (1-p)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 3.67, size = 114, normalized size = 1.28 \begin {gather*} -\frac {2^{-1+p} (-2+p) x \left (\frac {e^a \left (c x^n\right )^{\frac {1}{2 n-n p}}}{e^{2 a}+\left (c x^n\right )^{-\frac {2}{n (-2+p)}}}\right )^p \left (-1+e^{2 a} \left (c x^n\right )^{\frac {2}{n (-2+p)}} \left (-1+\left (1+e^{-2 a} \left (c x^n\right )^{-\frac {2}{n (-2+p)}}\right )^p\right )\right )}{-1+p} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 1.67, size = 0, normalized size = 0.00 \[\int \mathrm {sech}\left (a +\frac {\ln \left (c \,x^{n}\right )}{n \left (-2+p \right )}\right )^{p}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 474 vs.
\(2 (76) = 152\).
time = 0.38, size = 474, normalized size = 5.33 \begin {gather*} \frac {{\left (p - 2\right )} x \cosh \left (p \log \left (\frac {2 \, {\left (\cosh \left (\frac {a n p - 2 \, a n + n \log \left (x\right ) + \log \left (c\right )}{n p - 2 \, n}\right ) + \sinh \left (\frac {a n p - 2 \, a n + n \log \left (x\right ) + \log \left (c\right )}{n p - 2 \, n}\right )\right )}}{\cosh \left (\frac {a n p - 2 \, a n + n \log \left (x\right ) + \log \left (c\right )}{n p - 2 \, n}\right )^{2} + 2 \, \cosh \left (\frac {a n p - 2 \, a n + n \log \left (x\right ) + \log \left (c\right )}{n p - 2 \, n}\right ) \sinh \left (\frac {a n p - 2 \, a n + n \log \left (x\right ) + \log \left (c\right )}{n p - 2 \, n}\right ) + \sinh \left (\frac {a n p - 2 \, a n + n \log \left (x\right ) + \log \left (c\right )}{n p - 2 \, n}\right )^{2} + 1}\right )\right ) \cosh \left (\frac {a n p - 2 \, a n + n \log \left (x\right ) + \log \left (c\right )}{n p - 2 \, n}\right ) + {\left (p - 2\right )} x \cosh \left (\frac {a n p - 2 \, a n + n \log \left (x\right ) + \log \left (c\right )}{n p - 2 \, n}\right ) \sinh \left (p \log \left (\frac {2 \, {\left (\cosh \left (\frac {a n p - 2 \, a n + n \log \left (x\right ) + \log \left (c\right )}{n p - 2 \, n}\right ) + \sinh \left (\frac {a n p - 2 \, a n + n \log \left (x\right ) + \log \left (c\right )}{n p - 2 \, n}\right )\right )}}{\cosh \left (\frac {a n p - 2 \, a n + n \log \left (x\right ) + \log \left (c\right )}{n p - 2 \, n}\right )^{2} + 2 \, \cosh \left (\frac {a n p - 2 \, a n + n \log \left (x\right ) + \log \left (c\right )}{n p - 2 \, n}\right ) \sinh \left (\frac {a n p - 2 \, a n + n \log \left (x\right ) + \log \left (c\right )}{n p - 2 \, n}\right ) + \sinh \left (\frac {a n p - 2 \, a n + n \log \left (x\right ) + \log \left (c\right )}{n p - 2 \, n}\right )^{2} + 1}\right )\right )}{{\left (p - 1\right )} \cosh \left (\frac {a n p - 2 \, a n + n \log \left (x\right ) + \log \left (c\right )}{n p - 2 \, n}\right ) - {\left (p - 1\right )} \sinh \left (\frac {a n p - 2 \, a n + n \log \left (x\right ) + \log \left (c\right )}{n p - 2 \, n}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \operatorname {sech}^{p}{\left (a + \frac {\log {\left (c x^{n} \right )}}{n \left (p - 2\right )} \right )}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (\frac {1}{\mathrm {cosh}\left (a+\frac {\ln \left (c\,x^n\right )}{n\,\left (p-2\right )}\right )}\right )}^p \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________