Integrand size = 16, antiderivative size = 41 \[ \int \frac {e^x (1+\sin (x))}{1-\cos (x)} \, dx=(-2+2 i) e^{(1+i) x} \operatorname {Hypergeometric2F1}\left (1-i,2,2-i,e^{i x}\right )+\frac {e^x \sin (x)}{1-\cos (x)} \] Output:
(-2+2*I)*exp((1+I)*x)*hypergeom([2, 1-I],[2-I],exp(I*x))+exp(x)*sin(x)/(1- cos(x))
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(100\) vs. \(2(41)=82\).
Time = 0.60 (sec) , antiderivative size = 100, normalized size of antiderivative = 2.44 \[ \int \frac {e^x (1+\sin (x))}{1-\cos (x)} \, dx=\frac {2 e^x \sin \left (\frac {x}{2}\right ) \left (\cos \left (\frac {x}{2}\right )+2 i \operatorname {Hypergeometric2F1}\left (-i,1,1-i,e^{i x}\right ) \sin \left (\frac {x}{2}\right )+(1+i) e^{i x} \operatorname {Hypergeometric2F1}\left (1,1-i,2-i,e^{i x}\right ) \sin \left (\frac {x}{2}\right )\right ) (1+\sin (x))}{(-1+\cos (x)) \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right )^2} \] Input:
Integrate[(E^x*(1 + Sin[x]))/(1 - Cos[x]),x]
Output:
(2*E^x*Sin[x/2]*(Cos[x/2] + (2*I)*Hypergeometric2F1[-I, 1, 1 - I, E^(I*x)] *Sin[x/2] + (1 + I)*E^(I*x)*Hypergeometric2F1[1, 1 - I, 2 - I, E^(I*x)]*Si n[x/2])*(1 + Sin[x]))/((-1 + Cos[x])*(Cos[x/2] + Sin[x/2])^2)
Time = 0.37 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.12, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.312, Rules used = {4966, 2726, 4964, 4943, 2009}
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 \frac {e^x (\sin (x)+1)}{1-\cos (x)} \, dx\) |
\(\Big \downarrow \) 4966 |
\(\displaystyle \int \frac {e^x (1-\sin (x))}{1-\cos (x)}dx+2 \int \frac {e^x \sin (x)}{1-\cos (x)}dx\) |
\(\Big \downarrow \) 2726 |
\(\displaystyle 2 \int \frac {e^x \sin (x)}{1-\cos (x)}dx-\frac {e^x \sin (x)}{1-\cos (x)}\) |
\(\Big \downarrow \) 4964 |
\(\displaystyle 2 \int e^x \cot \left (\frac {x}{2}\right )dx-\frac {e^x \sin (x)}{1-\cos (x)}\) |
\(\Big \downarrow \) 4943 |
\(\displaystyle -\frac {e^x \sin (x)}{1-\cos (x)}-2 i \int \left (\frac {2 e^x}{1-e^{i x}}-e^x\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {e^x \sin (x)}{1-\cos (x)}-2 i \left (-e^x+2 e^x \operatorname {Hypergeometric2F1}\left (-i,1,1-i,e^{i x}\right )\right )\) |
Input:
Int[(E^x*(1 + Sin[x]))/(1 - Cos[x]),x]
Output:
(-2*I)*(-E^x + 2*E^x*Hypergeometric2F1[-I, 1, 1 - I, E^(I*x)]) - (E^x*Sin[ x])/(1 - Cos[x])
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]
Int[Cot[(d_.) + (e_.)*(x_)]^(n_.)*(F_)^((c_.)*((a_.) + (b_.)*(x_))), x_Symb ol] :> Simp[(-I)^n Int[ExpandIntegrand[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]
Int[(Cos[(d_.) + (e_.)*(x_)]*(g_.) + (f_))^(n_.)*(F_)^((c_.)*((a_.) + (b_.) *(x_)))*Sin[(d_.) + (e_.)*(x_)]^(m_.), x_Symbol] :> Simp[f^n Int[F^(c*(a + b*x))*Cot[d/2 + e*(x/2)]^m, x], x] /; FreeQ[{F, a, b, c, d, e, f, g}, x] && EqQ[f + g, 0] && IntegersQ[m, n] && EqQ[m + n, 0]
Int[((F_)^((c_.)*((a_.) + (b_.)*(x_)))*((h_) + (i_.)*Sin[(d_.) + (e_.)*(x_) ]))/(Cos[(d_.) + (e_.)*(x_)]*(g_.) + (f_)), x_Symbol] :> Simp[2*i Int[F^( c*(a + b*x))*(Sin[d + e*x]/(f + g*Cos[d + e*x])), x], x] + Int[F^(c*(a + b* x))*((h - i*Sin[d + e*x])/(f + g*Cos[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]
\[\int \frac {{\mathrm e}^{x} \left (\sin \left (x \right )+1\right )}{1-\cos \left (x \right )}d x\]
Input:
int(exp(x)*(sin(x)+1)/(1-cos(x)),x)
Output:
int(exp(x)*(sin(x)+1)/(1-cos(x)),x)
\[ \int \frac {e^x (1+\sin (x))}{1-\cos (x)} \, dx=\int { -\frac {{\left (\sin \left (x\right ) + 1\right )} e^{x}}{\cos \left (x\right ) - 1} \,d x } \] Input:
integrate(exp(x)*(1+sin(x))/(1-cos(x)),x, algorithm="fricas")
Output:
integral(-(e^x*sin(x) + e^x)/(cos(x) - 1), x)
\[ \int \frac {e^x (1+\sin (x))}{1-\cos (x)} \, dx=- \int \frac {e^{x}}{\cos {\left (x \right )} - 1}\, dx - \int \frac {e^{x} \sin {\left (x \right )}}{\cos {\left (x \right )} - 1}\, dx \] Input:
integrate(exp(x)*(1+sin(x))/(1-cos(x)),x)
Output:
-Integral(exp(x)/(cos(x) - 1), x) - Integral(exp(x)*sin(x)/(cos(x) - 1), x )
\[ \int \frac {e^x (1+\sin (x))}{1-\cos (x)} \, dx=\int { -\frac {{\left (\sin \left (x\right ) + 1\right )} e^{x}}{\cos \left (x\right ) - 1} \,d x } \] Input:
integrate(exp(x)*(1+sin(x))/(1-cos(x)),x, algorithm="maxima")
Output:
2*(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*sin(x))/(cos(x)^2 + sin(x)^2 - 2*cos(x ) + 1)
\[ \int \frac {e^x (1+\sin (x))}{1-\cos (x)} \, dx=\int { -\frac {{\left (\sin \left (x\right ) + 1\right )} e^{x}}{\cos \left (x\right ) - 1} \,d x } \] Input:
integrate(exp(x)*(1+sin(x))/(1-cos(x)),x, algorithm="giac")
Output:
integrate(-(sin(x) + 1)*e^x/(cos(x) - 1), x)
Timed out. \[ \int \frac {e^x (1+\sin (x))}{1-\cos (x)} \, dx=\int -\frac {{\mathrm {e}}^x\,\left (\sin \left (x\right )+1\right )}{\cos \left (x\right )-1} \,d x \] Input:
int(-(exp(x)*(sin(x) + 1))/(cos(x) - 1),x)
Output:
int(-(exp(x)*(sin(x) + 1))/(cos(x) - 1), x)
\[ \int \frac {e^x (1+\sin (x))}{1-\cos (x)} \, dx=\frac {-e^{x}+2 \left (\int \frac {e^{x}}{\tan \left (\frac {x}{2}\right )}d x \right ) \tan \left (\frac {x}{2}\right )}{\tan \left (\frac {x}{2}\right )} \] Input:
int(exp(x)*(1+sin(x))/(1-cos(x)),x)
Output:
( - e**x + 2*int(e**x/tan(x/2),x)*tan(x/2))/tan(x/2)