Optimal. Leaf size=43 \[ \frac{e^x \cos (x)}{\sin (x)+1}-(2+2 i) e^{(1+i) x} \, _2F_1\left (1-i,2;2-i;i e^{i x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.127377, antiderivative size = 47, normalized size of antiderivative = 1.09, number of steps used = 7, number of rules used = 6, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.429, 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)}{\sin (x)+1} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 4462
Rule 4459
Rule 4442
Rule 2194
Rule 2251
Rule 2288
Rubi steps
\begin{align*} \int \frac{e^x (1+\cos (x))}{1+\sin (x)} \, dx &=2 \int \frac{e^x \cos (x)}{1+\sin (x)} \, dx+\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.186466, size = 73, normalized size = 1.7 \[ \frac{1}{2} (\cos (x)+1) \sec ^2\left (\frac{x}{2}\right ) \left (\frac{e^x \left ((1+2 i) \tan \left (\frac{x}{2}\right )-(1-2 i)\right )}{\tan \left (\frac{x}{2}\right )+1}-4 i (\sinh (x)+\cosh (x)) \, _2F_1(-i,1;1-i;i \cos (x)-\sin (x))\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.069, size = 0, normalized size = 0. \begin{align*} \int{\frac{{{\rm e}^{x}} \left ( \cos \left ( x \right ) +1 \right ) }{1+\sin \left ( x \right ) }}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} -\frac{2 \,{\left (\cos \left (x\right ) e^{x} - 2 \,{\left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \sin \left (x\right ) + 1\right )} \int \frac{\cos \left (x\right ) e^{x}}{\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \sin \left (x\right ) + 1}\,{d x}\right )}}{\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \sin \left (x\right ) + 1} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F] time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{{\left (\cos \left (x\right ) + 1\right )} e^{x}}{\sin \left (x\right ) + 1}, x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\left (\cos{\left (x \right )} + 1\right ) e^{x}}{\sin{\left (x \right )} + 1}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{{\left (\cos \left (x\right ) + 1\right )} e^{x}}{\sin \left (x\right ) + 1}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]