3.6.53 \(\int \frac {e^x}{1-\cos (x)} \, dx\) [553]

Optimal. Leaf size=26 \[ (-1+i) e^{(1+i) x} \, _2F_1\left (1-i,2;2-i;e^{i x}\right ) \]

[Out]

(-1+I)*exp((1+I)*x)*hypergeom([2, 1-I],[2-I],exp(I*x))

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {4543, 4538} \begin {gather*} (-1+i) e^{(1+i) x} \text {Hypergeometric2F1}\left (1-i,2,2-i,e^{i x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

(-1 + I)*E^((1 + I)*x)*Hypergeometric2F1[1 - I, 2, 2 - I, E^(I*x)]

Rule 4538

Int[Csc[(d_.) + (e_.)*(x_)]^(n_.)*(F_)^((c_.)*((a_.) + (b_.)*(x_))), x_Symbol] :> Simp[(-2*I)^n*E^(I*n*(d + e*
x))*(F^(c*(a + b*x))/(I*e*n + b*c*Log[F]))*Hypergeometric2F1[n, n/2 - I*b*c*(Log[F]/(2*e)), 1 + n/2 - I*b*c*(L
og[F]/(2*e)), E^(2*I*(d + e*x))], x] /; FreeQ[{F, a, b, c, d, e}, x] && IntegerQ[n]

Rule 4543

Int[(Cos[(d_.) + (e_.)*(x_)]*(g_.) + (f_))^(n_.)*(F_)^((c_.)*((a_.) + (b_.)*(x_))), x_Symbol] :> Dist[2^n*f^n,
 Int[F^(c*(a + b*x))*Sin[d/2 + e*(x/2)]^(2*n), x], x] /; FreeQ[{F, a, b, c, d, e, f, g}, x] && EqQ[f + g, 0] &
& ILtQ[n, 0]

Rubi steps

\begin {align*} \int \frac {e^x}{1-\cos (x)} \, dx &=\frac {1}{2} \int e^x \csc ^2\left (\frac {x}{2}\right ) \, dx\\ &=(-1+i) e^{(1+i) x} \, _2F_1\left (1-i,2;2-i;e^{i x}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [B] Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(84\) vs. \(2(26)=52\).
time = 0.06, size = 84, normalized size = 3.23 \begin {gather*} \frac {(1+i) e^x \sin \left (\frac {x}{2}\right ) \left ((1-i) \cos \left (\frac {x}{2}\right )+(1+i) \, _2F_1\left (-i,1;1-i;e^{i x}\right ) \sin \left (\frac {x}{2}\right )+e^{i x} \, _2F_1\left (1,1-i;2-i;e^{i x}\right ) \sin \left (\frac {x}{2}\right )\right )}{-1+\cos (x)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

((1 + I)*E^x*Sin[x/2]*((1 - I)*Cos[x/2] + (1 + I)*Hypergeometric2F1[-I, 1, 1 - I, E^(I*x)]*Sin[x/2] + E^(I*x)*
Hypergeometric2F1[1, 1 - I, 2 - I, E^(I*x)]*Sin[x/2]))/(-1 + Cos[x])

________________________________________________________________________________________

Maple [F]
time = 0.02, size = 0, normalized size = 0.00 \[\int \frac {{\mathrm e}^{x}}{1-\cos \left (x \right )}\, dx\]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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]

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

[Out]

2*((cos(x)^2 + sin(x)^2 - 2*cos(x) + 1)*integrate(e^x*sin(x)/(cos(x)^2 + sin(x)^2 - 2*cos(x) + 1), x) - e^x*si
n(x))/(cos(x)^2 + sin(x)^2 - 2*cos(x) + 1)

________________________________________________________________________________________

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]

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

[Out]

integral(-e^x/(cos(x) - 1), x)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - \int \frac {e^{x}}{\cos {\left (x \right )} - 1}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(exp(x)/(1-cos(x)),x)

[Out]

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

________________________________________________________________________________________

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]

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

[Out]

integrate(-e^x/(cos(x) - 1), x)

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.04 \begin {gather*} -\int \frac {{\mathrm {e}}^x}{\cos \left (x\right )-1} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________