Integrand size = 13, antiderivative size = 48 \[ \int \left (-e^{-x}+e^x\right )^n \, dx=-\frac {\left (-e^{-x}+e^x\right )^n \left (1-e^{2 x}\right ) \operatorname {Hypergeometric2F1}\left (1,\frac {2+n}{2},1-\frac {n}{2},e^{2 x}\right )}{n} \] Output:
-(-1/exp(x)+exp(x))^n*(1-exp(2*x))*hypergeom([1, 1+1/2*n],[1-1/2*n],exp(2* x))/n
Time = 0.05 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.94 \[ \int \left (-e^{-x}+e^x\right )^n \, dx=\frac {\left (-e^{-x}+e^x\right )^n \left (-1+e^{2 x}\right ) \operatorname {Hypergeometric2F1}\left (1,1+\frac {n}{2},1-\frac {n}{2},e^{2 x}\right )}{n} \] Input:
Integrate[(-E^(-x) + E^x)^n,x]
Output:
((-E^(-x) + E^x)^n*(-1 + E^(2*x))*Hypergeometric2F1[1, 1 + n/2, 1 - n/2, E ^(2*x)])/n
Time = 0.20 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.08, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {2720, 1938, 279, 278}
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 \left (e^x-e^{-x}\right )^n \, dx\) |
\(\Big \downarrow \) 2720 |
\(\displaystyle \int e^{-x} \left (e^x-e^{-x}\right )^nde^x\) |
\(\Big \downarrow \) 1938 |
\(\displaystyle \left (e^x\right )^n \left (e^x-e^{-x}\right )^n \left (e^{2 x}-1\right )^{-n} \int \left (e^x\right )^{-n-1} \left (-1+e^{2 x}\right )^nde^x\) |
\(\Big \downarrow \) 279 |
\(\displaystyle \left (e^x\right )^n \left (e^x-e^{-x}\right )^n \left (1-e^{2 x}\right )^{-n} \int \left (e^x\right )^{-n-1} \left (1-e^{2 x}\right )^nde^x\) |
\(\Big \downarrow \) 278 |
\(\displaystyle -\frac {\left (e^x-e^{-x}\right )^n \left (1-e^{2 x}\right )^{-n} \operatorname {Hypergeometric2F1}\left (-n,-\frac {n}{2},1-\frac {n}{2},e^{2 x}\right )}{n}\) |
Input:
Int[(-E^(-x) + E^x)^n,x]
Output:
-(((-E^(-x) + E^x)^n*Hypergeometric2F1[-n, -1/2*n, 1 - n/2, E^(2*x)])/((1 - E^(2*x))^n*n))
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[a^p*(( c*x)^(m + 1)/(c*(m + 1)))*Hypergeometric2F1[-p, (m + 1)/2, (m + 1)/2 + 1, ( -b)*(x^2/a)], x] /; FreeQ[{a, b, c, m, p}, x] && !IGtQ[p, 0] && (ILtQ[p, 0 ] || GtQ[a, 0])
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[a^IntP art[p]*((a + b*x^2)^FracPart[p]/(1 + b*(x^2/a))^FracPart[p]) Int[(c*x)^m* (1 + b*(x^2/a))^p, x], x] /; FreeQ[{a, b, c, m, p}, x] && !IGtQ[p, 0] && !(ILtQ[p, 0] || GtQ[a, 0])
Int[((c_.)*(x_))^(m_.)*((a_.)*(x_)^(j_.) + (b_.)*(x_)^(n_.))^(p_), x_Symbol ] :> Simp[c^IntPart[m]*(c*x)^FracPart[m]*((a*x^j + b*x^n)^FracPart[p]/(x^(F racPart[m] + j*FracPart[p])*(a + b*x^(n - j))^FracPart[p])) Int[x^(m + j* p)*(a + b*x^(n - j))^p, x], x] /; FreeQ[{a, b, c, j, m, n, p}, x] && !Inte gerQ[p] && NeQ[n, j] && PosQ[n - j]
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct ionOfExponentialQ[u, x] && !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ [{a, m, n}, x] && IntegerQ[m*n]] && !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) *(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
\[\int \left (-{\mathrm e}^{-x}+{\mathrm e}^{x}\right )^{n}d x\]
Input:
int((-1/exp(x)+exp(x))^n,x)
Output:
int((-1/exp(x)+exp(x))^n,x)
\[ \int \left (-e^{-x}+e^x\right )^n \, dx=\int { {\left (-e^{\left (-x\right )} + e^{x}\right )}^{n} \,d x } \] Input:
integrate((-1/exp(x)+exp(x))^n,x, algorithm="fricas")
Output:
integral((-e^(-x) + e^x)^n, x)
\[ \int \left (-e^{-x}+e^x\right )^n \, dx=\int \left (e^{x} - e^{- x}\right )^{n}\, dx \] Input:
integrate((-1/exp(x)+exp(x))**n,x)
Output:
Integral((exp(x) - exp(-x))**n, x)
\[ \int \left (-e^{-x}+e^x\right )^n \, dx=\int { {\left (-e^{\left (-x\right )} + e^{x}\right )}^{n} \,d x } \] Input:
integrate((-1/exp(x)+exp(x))^n,x, algorithm="maxima")
Output:
integrate((-e^(-x) + e^x)^n, x)
\[ \int \left (-e^{-x}+e^x\right )^n \, dx=\int { {\left (-e^{\left (-x\right )} + e^{x}\right )}^{n} \,d x } \] Input:
integrate((-1/exp(x)+exp(x))^n,x, algorithm="giac")
Output:
integrate((-e^(-x) + e^x)^n, x)
Timed out. \[ \int \left (-e^{-x}+e^x\right )^n \, dx=\int {\left ({\mathrm {e}}^x-{\mathrm {e}}^{-x}\right )}^n \,d x \] Input:
int((exp(x) - exp(-x))^n,x)
Output:
int((exp(x) - exp(-x))^n, x)
\[ \int \left (-e^{-x}+e^x\right )^n \, dx=\frac {\left (e^{2 x}-1\right )^{n}-2 e^{n x} \left (\int \frac {\left (e^{2 x}-1\right )^{n}}{e^{n x +2 x}-e^{n x}}d x \right ) n}{e^{n x} n} \] Input:
int((-1/exp(x)+exp(x))^n,x)
Output:
((e**(2*x) - 1)**n - 2*e**(n*x)*int((e**(2*x) - 1)**n/(e**(n*x + 2*x) - e* *(n*x)),x)*n)/(e**(n*x)*n)