3.560 \(\int \frac {e^x (1-\cos (x))}{1-\sin (x)} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 48, normalized size of antiderivative = 1.04, number of steps used = 7, number of rules used = 6, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {4462, 4459, 4442, 2194, 2251, 2288} \[ -4 i e^x \text {Hypergeometric2F1}\left (-i,1,1-i,-i e^{i x}\right )+2 i e^x+\frac {e^x \cos (x)}{1-\sin (x)} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2251

Int[((a_) + (b_.)*(F_)^((e_.)*((c_.) + (d_.)*(x_))))^(p_)*(G_)^((h_.)*((f_.) + (g_.)*(x_))), x_Symbol] :> Simp
[(a^p*G^(h*(f + g*x))*Hypergeometric2F1[-p, (g*h*Log[G])/(d*e*Log[F]), (g*h*Log[G])/(d*e*Log[F]) + 1, Simplify
[-((b*F^(e*(c + d*x)))/a)]])/(g*h*Log[G]), x] /; FreeQ[{F, G, a, b, c, d, e, f, g, h, p}, x] && (ILtQ[p, 0] ||
 GtQ[a, 0])

Rule 2288

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]

Rule 4442

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

Rule 4459

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

Rule 4462

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.76, size = 72, normalized size = 1.57 \[ \frac {1}{2} (\cos (x)-1) \csc ^2\left (\frac {x}{2}\right ) \left (4 i (\sinh (x)+\cosh (x)) \, _2F_1(-i,1;1-i;\sin (x)-i \cos (x))-\frac {e^x \left ((1+2 i) \cot \left (\frac {x}{2}\right )+(1-2 i)\right )}{\cot \left (\frac {x}{2}\right )-1}\right ) \]

Antiderivative was successfully verified.

[In]

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

[Out]

((-1 + Cos[x])*Csc[x/2]^2*(-((E^x*((1 - 2*I) + (1 + 2*I)*Cot[x/2]))/(-1 + Cot[x/2])) + (4*I)*Hypergeometric2F1
[-I, 1, 1 - I, (-I)*Cos[x] + Sin[x]]*(Cosh[x] + Sinh[x])))/2

________________________________________________________________________________________

IntegrateAlgebraic [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {e^x (1-\cos (x))}{1-\sin (x)} \, dx \]

Verification is Not applicable to the result.

[In]

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

[Out]

Could not integrate

________________________________________________________________________________________

fricas [F]  time = 1.14, size = 0, normalized size = 0.00 \[ {\rm integral}\left (\frac {{\left (\cos \relax (x) - 1\right )} e^{x}}{\sin \relax (x) - 1}, x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (\cos \relax (x) - 1\right )} e^{x}}{\sin \relax (x) - 1}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \frac {2 \, {\left (\cos \relax (x) e^{x} - 2 \, {\left (\cos \relax (x)^{2} + \sin \relax (x)^{2} - 2 \, \sin \relax (x) + 1\right )} \int \frac {\cos \relax (x) e^{x}}{\cos \relax (x)^{2} + \sin \relax (x)^{2} - 2 \, \sin \relax (x) + 1}\,{d x}\right )}}{\cos \relax (x)^{2} + \sin \relax (x)^{2} - 2 \, \sin \relax (x) + 1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {{\mathrm {e}}^x\,\left (\cos \relax (x)-1\right )}{\sin \relax (x)-1} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________