\(\int \frac {e^x (1+\cos (x))}{1-\sin (x)} \, dx\) [561]

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

Optimal result

Integrand size = 16, antiderivative size = 14 \[ \int \frac {e^x (1+\cos (x))}{1-\sin (x)} \, dx=\frac {e^x \cos (x)}{1-\sin (x)} \]

[Out]

exp(x)*cos(x)/(1-sin(x))

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 14, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {2326} \[ \int \frac {e^x (1+\cos (x))}{1-\sin (x)} \, dx=\frac {e^x \cos (x)}{1-\sin (x)} \]

[In]

Int[(E^x*(1 + Cos[x]))/(1 - Sin[x]),x]

[Out]

(E^x*Cos[x])/(1 - Sin[x])

Rule 2326

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = v*(y/(Log[F]*D[u, x]))}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

Rubi steps \begin{align*} \text {integral}& = \frac {e^x \cos (x)}{1-\sin (x)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.93 \[ \int \frac {e^x (1+\cos (x))}{1-\sin (x)} \, dx=-\frac {e^x \cos (x)}{-1+\sin (x)} \]

[In]

Integrate[(E^x*(1 + Cos[x]))/(1 - Sin[x]),x]

[Out]

-((E^x*Cos[x])/(-1 + Sin[x]))

Maple [A] (verified)

Time = 0.25 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.36

method result size
parallelrisch \(-\frac {{\mathrm e}^{x} \left (1+\tan \left (\frac {x}{2}\right )\right )}{\tan \left (\frac {x}{2}\right )-1}\) \(19\)
risch \(-i {\mathrm e}^{x}+\frac {2 \,{\mathrm e}^{x}}{{\mathrm e}^{i x}-i}\) \(21\)
norman \(\frac {-{\mathrm e}^{x} \tan \left (\frac {x}{2}\right )-{\mathrm e}^{x} \left (\tan ^{2}\left (\frac {x}{2}\right )\right )-{\mathrm e}^{x} \left (\tan ^{3}\left (\frac {x}{2}\right )\right )-{\mathrm e}^{x}}{\left (1+\tan ^{2}\left (\frac {x}{2}\right )\right ) \left (\tan \left (\frac {x}{2}\right )-1\right )}\) \(53\)

[In]

int(exp(x)*(cos(x)+1)/(-sin(x)+1),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.71 \[ \int \frac {e^x (1+\cos (x))}{1-\sin (x)} \, dx=\frac {{\left (\cos \left (x\right ) + 1\right )} e^{x} + e^{x} \sin \left (x\right )}{\cos \left (x\right ) - \sin \left (x\right ) + 1} \]

[In]

integrate(exp(x)*(1+cos(x))/(1-sin(x)),x, algorithm="fricas")

[Out]

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

Sympy [F]

\[ \int \frac {e^x (1+\cos (x))}{1-\sin (x)} \, dx=- \int \frac {e^{x}}{\sin {\left (x \right )} - 1}\, dx - \int \frac {e^{x} \cos {\left (x \right )}}{\sin {\left (x \right )} - 1}\, dx \]

[In]

integrate(exp(x)*(1+cos(x))/(1-sin(x)),x)

[Out]

-Integral(exp(x)/(sin(x) - 1), x) - Integral(exp(x)*cos(x)/(sin(x) - 1), x)

Maxima [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.57 \[ \int \frac {e^x (1+\cos (x))}{1-\sin (x)} \, dx=\frac {2 \, \cos \left (x\right ) e^{x}}{\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \sin \left (x\right ) + 1} \]

[In]

integrate(exp(x)*(1+cos(x))/(1-sin(x)),x, algorithm="maxima")

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.43 \[ \int \frac {e^x (1+\cos (x))}{1-\sin (x)} \, dx=-\frac {e^{x} \tan \left (\frac {1}{2} \, x\right ) + e^{x}}{\tan \left (\frac {1}{2} \, x\right ) - 1} \]

[In]

integrate(exp(x)*(1+cos(x))/(1-sin(x)),x, algorithm="giac")

[Out]

-(e^x*tan(1/2*x) + e^x)/(tan(1/2*x) - 1)

Mupad [B] (verification not implemented)

Time = 0.50 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.71 \[ \int \frac {e^x (1+\cos (x))}{1-\sin (x)} \, dx=-\frac {{\mathrm {e}}^x\,\left (-1+{\mathrm {e}}^{x\,1{}\mathrm {i}}\,1{}\mathrm {i}\right )}{{\mathrm {e}}^{x\,1{}\mathrm {i}}-\mathrm {i}} \]

[In]

int(-(exp(x)*(cos(x) + 1))/(sin(x) - 1),x)

[Out]

-(exp(x)*(exp(x*1i)*1i - 1))/(exp(x*1i) - 1i)