Optimal. Leaf size=28 \[ -\frac {1}{1-\cos (x)}-\frac {3 \sin (x)}{1-\cos (x)}-\tanh ^{-1}(\cos (x)) \]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 28, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 5, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {4401, 2648, 2667, 44, 207} \[ -\frac {1}{1-\cos (x)}-\frac {3 \sin (x)}{1-\cos (x)}-\tanh ^{-1}(\cos (x)) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 44
Rule 207
Rule 2648
Rule 2667
Rule 4401
Rubi steps
\begin {align*} \int \frac {\csc (x) (2+3 \sin (x))}{1-\cos (x)} \, dx &=\int \left (-\frac {3}{-1+\cos (x)}-\frac {2 \csc (x)}{-1+\cos (x)}\right ) \, dx\\ &=-\left (2 \int \frac {\csc (x)}{-1+\cos (x)} \, dx\right )-3 \int \frac {1}{-1+\cos (x)} \, dx\\ &=-\frac {3 \sin (x)}{1-\cos (x)}+2 \operatorname {Subst}\left (\int \frac {1}{(-1-x) (-1+x)^2} \, dx,x,\cos (x)\right )\\ &=-\frac {3 \sin (x)}{1-\cos (x)}+2 \operatorname {Subst}\left (\int \left (-\frac {1}{2 (-1+x)^2}+\frac {1}{2 \left (-1+x^2\right )}\right ) \, dx,x,\cos (x)\right )\\ &=-\frac {1}{1-\cos (x)}-\frac {3 \sin (x)}{1-\cos (x)}+\operatorname {Subst}\left (\int \frac {1}{-1+x^2} \, dx,x,\cos (x)\right )\\ &=-\tanh ^{-1}(\cos (x))-\frac {1}{1-\cos (x)}-\frac {3 \sin (x)}{1-\cos (x)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.06, size = 54, normalized size = 1.93 \[ \frac {1}{2} \csc ^2\left (\frac {x}{2}\right ) \left (-3 \sin (x)+\log \left (\sin \left (\frac {x}{2}\right )\right )-\log \left (\cos \left (\frac {x}{2}\right )\right )+\cos (x) \left (\log \left (\cos \left (\frac {x}{2}\right )\right )-\log \left (\sin \left (\frac {x}{2}\right )\right )\right )-1\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
IntegrateAlgebraic [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\csc (x) (2+3 \sin (x))}{1-\cos (x)} \, dx \]
Verification is Not applicable to the result.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.93, size = 39, normalized size = 1.39 \[ -\frac {{\left (\cos \relax (x) - 1\right )} \log \left (\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) - {\left (\cos \relax (x) - 1\right )} \log \left (-\frac {1}{2} \, \cos \relax (x) + \frac {1}{2}\right ) - 6 \, \sin \relax (x) - 2}{2 \, {\left (\cos \relax (x) - 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.06, size = 31, normalized size = 1.11 \[ -\frac {3 \, \tan \left (\frac {1}{2} \, x\right )^{2} + 6 \, \tan \left (\frac {1}{2} \, x\right ) + 1}{2 \, \tan \left (\frac {1}{2} \, x\right )^{2}} + \log \left ({\left | \tan \left (\frac {1}{2} \, x\right ) \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.14, size = 23, normalized size = 0.82
method | result | size |
default | \(\ln \left (\tan \left (\frac {x}{2}\right )\right )-\frac {3}{\tan \left (\frac {x}{2}\right )}-\frac {1}{2 \tan \left (\frac {x}{2}\right )^{2}}\) | \(23\) |
risch | \(\frac {\left (\frac {1}{5}-\frac {3 i}{5}\right ) \left (10 \,{\mathrm e}^{i x}-9+3 i\right )}{\left ({\mathrm e}^{i x}-1\right )^{2}}-\ln \left ({\mathrm e}^{i x}+1\right )+\ln \left ({\mathrm e}^{i x}-1\right )\) | \(44\) |
norman | \(\frac {-\frac {1}{2}-\frac {\left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{2}-3 \left (\tan ^{3}\left (\frac {x}{2}\right )\right )-3 \tan \left (\frac {x}{2}\right )}{\left (1+\tan ^{2}\left (\frac {x}{2}\right )\right ) \tan \left (\frac {x}{2}\right )^{2}}+\ln \left (\tan \left (\frac {x}{2}\right )\right )\) | \(48\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.45, size = 33, normalized size = 1.18 \[ -\frac {{\left (\cos \relax (x) + 1\right )}^{2}}{2 \, \sin \relax (x)^{2}} - \frac {3 \, {\left (\cos \relax (x) + 1\right )}}{\sin \relax (x)} + \log \left (\frac {\sin \relax (x)}{\cos \relax (x) + 1}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 0.28, size = 22, normalized size = 0.79 \[ \ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )-\frac {3\,\mathrm {tan}\left (\frac {x}{2}\right )+\frac {1}{2}}{{\mathrm {tan}\left (\frac {x}{2}\right )}^2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 0.82, size = 22, normalized size = 0.79 \[ \log {\left (\tan {\left (\frac {x}{2} \right )} \right )} - \frac {3}{\tan {\left (\frac {x}{2} \right )}} - \frac {1}{2 \tan ^{2}{\left (\frac {x}{2} \right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________