Optimal. Leaf size=48 \[ -\frac {\left (-e^{-x}+e^x\right )^n \left (1-e^{2 x}\right ) \, _2F_1\left (1,\frac {2+n}{2};1-\frac {n}{2};e^{2 x}\right )}{n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 52, normalized size of antiderivative = 1.08, number of steps
used = 4, number of rules used = 4, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {2320, 2057,
372, 371} \begin {gather*} -\frac {\left (e^x-e^{-x}\right )^n \left (1-e^{2 x}\right )^{-n} \text {Hypergeometric2F1}\left (-n,-\frac {n}{2},1-\frac {n}{2},e^{2 x}\right )}{n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 371
Rule 372
Rule 2057
Rule 2320
Rubi steps
\begin {align*} \int \left (-e^{-x}+e^x\right )^n \, dx &=\text {Subst}\left (\int \frac {\left (-\frac {1}{x}+x\right )^n}{x} \, dx,x,e^x\right )\\ &=\left (\left (e^x\right )^n \left (-e^{-x}+e^x\right )^n \left (-1+e^{2 x}\right )^{-n}\right ) \text {Subst}\left (\int x^{-1-n} \left (-1+x^2\right )^n \, dx,x,e^x\right )\\ &=\left (\left (e^x\right )^n \left (-e^{-x}+e^x\right )^n \left (1-e^{2 x}\right )^{-n}\right ) \text {Subst}\left (\int x^{-1-n} \left (1-x^2\right )^n \, dx,x,e^x\right )\\ &=-\frac {\left (-e^{-x}+e^x\right )^n \left (1-e^{2 x}\right )^{-n} \, _2F_1\left (-n,-\frac {n}{2};1-\frac {n}{2};e^{2 x}\right )}{n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.05, size = 45, normalized size = 0.94 \begin {gather*} \frac {\left (-e^{-x}+e^x\right )^n \left (-1+e^{2 x}\right ) \, _2F_1\left (1,1+\frac {n}{2};1-\frac {n}{2};e^{2 x}\right )}{n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.01, size = 0, normalized size = 0.00 \[\int \left (-{\mathrm e}^{-x}+{\mathrm e}^{x}\right )^{n}\, 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 [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]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (e^{x} - e^{- x}\right )^{n}\, 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.02 \begin {gather*} \int {\left ({\mathrm {e}}^x-{\mathrm {e}}^{-x}\right )}^n \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________