Optimal. Leaf size=24 \[ -\frac {1}{2} \csc ^2(x)-\frac {1}{2} \tanh ^{-1}(\cos (x))+\frac {1}{2} \cot (x) \csc (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.06, antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, integrand size = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.857, Rules used = {4397, 2706, 2606, 30, 2611, 3770} \[ -\frac {1}{2} \csc ^2(x)-\frac {1}{2} \tanh ^{-1}(\cos (x))+\frac {1}{2} \cot (x) \csc (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 30
Rule 2606
Rule 2611
Rule 2706
Rule 3770
Rule 4397
Rubi steps
\begin {align*} \int \frac {1}{\sin (x)+\tan (x)} \, dx &=\int \frac {\cot (x)}{1+\cos (x)} \, dx\\ &=-\int \cot ^2(x) \csc (x) \, dx+\int \cot (x) \csc ^2(x) \, dx\\ &=\frac {1}{2} \cot (x) \csc (x)+\frac {1}{2} \int \csc (x) \, dx-\operatorname {Subst}(\int x \, dx,x,\csc (x))\\ &=-\frac {1}{2} \tanh ^{-1}(\cos (x))+\frac {1}{2} \cot (x) \csc (x)-\frac {\csc ^2(x)}{2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.01, size = 35, normalized size = 1.46 \[ -\frac {1}{4} \sec ^2\left (\frac {x}{2}\right )+\frac {1}{2} \log \left (\sin \left (\frac {x}{2}\right )\right )-\frac {1}{2} \log \left (\cos \left (\frac {x}{2}\right )\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 1.90, size = 35, normalized size = 1.46 \[ -\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 ) + 2}{4 \, {\left (\cos \relax (x) + 1\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.14, size = 28, normalized size = 1.17 \[ \frac {\cos \relax (x) - 1}{4 \, {\left (\cos \relax (x) + 1\right )}} + \frac {1}{4} \, \log \left (-\frac {\cos \relax (x) - 1}{\cos \relax (x) + 1}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.11, size = 24, normalized size = 1.00 \[ \frac {\ln \left (-1+\cos \relax (x )\right )}{4}-\frac {1}{2 \left (1+\cos \relax (x )\right )}-\frac {\ln \left (1+\cos \relax (x )\right )}{4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.31, size = 25, normalized size = 1.04 \[ -\frac {\sin \relax (x)^{2}}{4 \, {\left (\cos \relax (x) + 1\right )}^{2}} + \frac {1}{2} \, \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 = 2.47, size = 16, normalized size = 0.67 \[ \frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )}{2}-\frac {{\mathrm {tan}\left (\frac {x}{2}\right )}^2}{4} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {1}{\sin {\relax (x )} + \tan {\relax (x )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________