\(\int e^x \sec ^3(1-e^x) \, dx\) [684]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [B] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 34 \[ \int e^x \sec ^3\left (1-e^x\right ) \, dx=-\frac {1}{2} \text {arctanh}\left (\sin \left (1-e^x\right )\right )-\frac {1}{2} \sec \left (1-e^x\right ) \tan \left (1-e^x\right ) \]

[Out]

1/2*arctanh(sin(-1+exp(x)))+1/2*sec(-1+exp(x))*tan(-1+exp(x))

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {2320, 3853, 3855} \[ \int e^x \sec ^3\left (1-e^x\right ) \, dx=-\frac {1}{2} \text {arctanh}\left (\sin \left (1-e^x\right )\right )-\frac {1}{2} \tan \left (1-e^x\right ) \sec \left (1-e^x\right ) \]

[In]

Int[E^x*Sec[1 - E^x]^3,x]

[Out]

-1/2*ArcTanh[Sin[1 - E^x]] - (Sec[1 - E^x]*Tan[1 - E^x])/2

Rule 2320

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = \text {Subst}\left (\int \sec ^3(1-x) \, dx,x,e^x\right ) \\ & = -\frac {1}{2} \sec \left (1-e^x\right ) \tan \left (1-e^x\right )+\frac {1}{2} \text {Subst}\left (\int \sec (1-x) \, dx,x,e^x\right ) \\ & = -\frac {1}{2} \tanh ^{-1}\left (\sin \left (1-e^x\right )\right )-\frac {1}{2} \sec \left (1-e^x\right ) \tan \left (1-e^x\right ) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.00 \[ \int e^x \sec ^3\left (1-e^x\right ) \, dx=-\frac {1}{2} \text {arctanh}\left (\sin \left (1-e^x\right )\right )-\frac {1}{2} \sec \left (1-e^x\right ) \tan \left (1-e^x\right ) \]

[In]

Integrate[E^x*Sec[1 - E^x]^3,x]

[Out]

-1/2*ArcTanh[Sin[1 - E^x]] - (Sec[1 - E^x]*Tan[1 - E^x])/2

Maple [A] (verified)

Time = 0.74 (sec) , antiderivative size = 28, normalized size of antiderivative = 0.82

method result size
derivativedivides \(\frac {\sec \left (-1+{\mathrm e}^{x}\right ) \tan \left (-1+{\mathrm e}^{x}\right )}{2}+\frac {\ln \left (\sec \left (-1+{\mathrm e}^{x}\right )+\tan \left (-1+{\mathrm e}^{x}\right )\right )}{2}\) \(28\)
default \(\frac {\sec \left (-1+{\mathrm e}^{x}\right ) \tan \left (-1+{\mathrm e}^{x}\right )}{2}+\frac {\ln \left (\sec \left (-1+{\mathrm e}^{x}\right )+\tan \left (-1+{\mathrm e}^{x}\right )\right )}{2}\) \(28\)
norman \(\frac {\tan ^{3}\left (-\frac {1}{2}+\frac {{\mathrm e}^{x}}{2}\right )+\tan \left (-\frac {1}{2}+\frac {{\mathrm e}^{x}}{2}\right )}{\left (\tan ^{2}\left (-\frac {1}{2}+\frac {{\mathrm e}^{x}}{2}\right )-1\right )^{2}}-\frac {\ln \left (\tan \left (-\frac {1}{2}+\frac {{\mathrm e}^{x}}{2}\right )-1\right )}{2}+\frac {\ln \left (\tan \left (-\frac {1}{2}+\frac {{\mathrm e}^{x}}{2}\right )+1\right )}{2}\) \(57\)
risch \(-\frac {i \left ({\mathrm e}^{3 i \left (-1+{\mathrm e}^{x}\right )}-{\mathrm e}^{i \left (-1+{\mathrm e}^{x}\right )}\right )}{\left ({\mathrm e}^{2 i \left (-1+{\mathrm e}^{x}\right )}+1\right )^{2}}+\frac {\ln \left ({\mathrm e}^{i \left (-1+{\mathrm e}^{x}\right )}+i\right )}{2}-\frac {\ln \left ({\mathrm e}^{i \left (-1+{\mathrm e}^{x}\right )}-i\right )}{2}\) \(64\)
parallelrisch \(\frac {\left (-\cos \left (-2+2 \,{\mathrm e}^{x}\right )-1\right ) \ln \left (\tan \left (-\frac {1}{2}+\frac {{\mathrm e}^{x}}{2}\right )-1\right )+\left (\cos \left (-2+2 \,{\mathrm e}^{x}\right )+1\right ) \ln \left (\tan \left (-\frac {1}{2}+\frac {{\mathrm e}^{x}}{2}\right )+1\right )+2 \sin \left (-1+{\mathrm e}^{x}\right )}{2 \cos \left (-2+2 \,{\mathrm e}^{x}\right )+2}\) \(65\)

[In]

int(exp(x)*sec(-1+exp(x))^3,x,method=_RETURNVERBOSE)

[Out]

1/2*sec(-1+exp(x))*tan(-1+exp(x))+1/2*ln(sec(-1+exp(x))+tan(-1+exp(x)))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 52 vs. \(2 (21) = 42\).

Time = 0.32 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.53 \[ \int e^x \sec ^3\left (1-e^x\right ) \, dx=\frac {\cos \left (e^{x} - 1\right )^{2} \log \left (\sin \left (e^{x} - 1\right ) + 1\right ) - \cos \left (e^{x} - 1\right )^{2} \log \left (-\sin \left (e^{x} - 1\right ) + 1\right ) + 2 \, \sin \left (e^{x} - 1\right )}{4 \, \cos \left (e^{x} - 1\right )^{2}} \]

[In]

integrate(exp(x)*sec(-1+exp(x))^3,x, algorithm="fricas")

[Out]

1/4*(cos(e^x - 1)^2*log(sin(e^x - 1) + 1) - cos(e^x - 1)^2*log(-sin(e^x - 1) + 1) + 2*sin(e^x - 1))/cos(e^x -
1)^2

Sympy [F]

\[ \int e^x \sec ^3\left (1-e^x\right ) \, dx=\int e^{x} \sec ^{3}{\left (e^{x} - 1 \right )}\, dx \]

[In]

integrate(exp(x)*sec(-1+exp(x))**3,x)

[Out]

Integral(exp(x)*sec(exp(x) - 1)**3, x)

Maxima [A] (verification not implemented)

none

Time = 0.20 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.15 \[ \int e^x \sec ^3\left (1-e^x\right ) \, dx=-\frac {\sin \left (e^{x} - 1\right )}{2 \, {\left (\sin \left (e^{x} - 1\right )^{2} - 1\right )}} + \frac {1}{4} \, \log \left (\sin \left (e^{x} - 1\right ) + 1\right ) - \frac {1}{4} \, \log \left (\sin \left (e^{x} - 1\right ) - 1\right ) \]

[In]

integrate(exp(x)*sec(-1+exp(x))^3,x, algorithm="maxima")

[Out]

-1/2*sin(e^x - 1)/(sin(e^x - 1)^2 - 1) + 1/4*log(sin(e^x - 1) + 1) - 1/4*log(sin(e^x - 1) - 1)

Giac [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.21 \[ \int e^x \sec ^3\left (1-e^x\right ) \, dx=-\frac {\sin \left (e^{x} - 1\right )}{2 \, {\left (\sin \left (e^{x} - 1\right )^{2} - 1\right )}} + \frac {1}{4} \, \log \left (\sin \left (e^{x} - 1\right ) + 1\right ) - \frac {1}{4} \, \log \left (-\sin \left (e^{x} - 1\right ) + 1\right ) \]

[In]

integrate(exp(x)*sec(-1+exp(x))^3,x, algorithm="giac")

[Out]

-1/2*sin(e^x - 1)/(sin(e^x - 1)^2 - 1) + 1/4*log(sin(e^x - 1) + 1) - 1/4*log(-sin(e^x - 1) + 1)

Mupad [B] (verification not implemented)

Time = 2.14 (sec) , antiderivative size = 78, normalized size of antiderivative = 2.29 \[ \int e^x \sec ^3\left (1-e^x\right ) \, dx=-\mathrm {atan}\left ({\mathrm {e}}^{-\mathrm {i}}\,{\mathrm {e}}^{{\mathrm {e}}^x\,1{}\mathrm {i}}\right )\,1{}\mathrm {i}-\frac {{\mathrm {e}}^{-\mathrm {i}}\,{\mathrm {e}}^{{\mathrm {e}}^x\,1{}\mathrm {i}}\,1{}\mathrm {i}}{{\mathrm {e}}^{-2{}\mathrm {i}}\,{\mathrm {e}}^{{\mathrm {e}}^x\,2{}\mathrm {i}}+1}+\frac {{\mathrm {e}}^{-\mathrm {i}}\,{\mathrm {e}}^{{\mathrm {e}}^x\,1{}\mathrm {i}}\,2{}\mathrm {i}}{2\,{\mathrm {e}}^{-2{}\mathrm {i}}\,{\mathrm {e}}^{{\mathrm {e}}^x\,2{}\mathrm {i}}+{\mathrm {e}}^{-4{}\mathrm {i}}\,{\mathrm {e}}^{{\mathrm {e}}^x\,4{}\mathrm {i}}+1} \]

[In]

int(exp(x)/cos(exp(x) - 1)^3,x)

[Out]

(exp(-1i)*exp(exp(x)*1i)*2i)/(2*exp(-2i)*exp(exp(x)*2i) + exp(-4i)*exp(exp(x)*4i) + 1) - (exp(-1i)*exp(exp(x)*
1i)*1i)/(exp(-2i)*exp(exp(x)*2i) + 1) - atan(exp(-1i)*exp(exp(x)*1i))*1i