Optimal. Leaf size=15 \[ -\frac {1}{2} \tanh ^{-1}(\cos (x))+\frac {1}{2} \tanh ^{-1}(\sin (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 15, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 4, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {4486, 4372,
3855, 4373} \begin {gather*} \frac {1}{2} \tanh ^{-1}(\sin (x))-\frac {1}{2} \tanh ^{-1}(\cos (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3855
Rule 4372
Rule 4373
Rule 4486
Rubi steps
\begin {align*} \int \csc (2 x) (\cos (x)+\sin (x)) \, dx &=\int (\cos (x) \csc (2 x)+\csc (2 x) \sin (x)) \, dx\\ &=\int \cos (x) \csc (2 x) \, dx+\int \csc (2 x) \sin (x) \, dx\\ &=\frac {1}{2} \int \csc (x) \, dx+\frac {1}{2} \int \sec (x) \, dx\\ &=-\frac {1}{2} \tanh ^{-1}(\cos (x))+\frac {1}{2} \tanh ^{-1}(\sin (x))\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(61\) vs. \(2(15)=30\).
time = 0.01, size = 61, normalized size = 4.07 \begin {gather*} -\frac {1}{2} \log \left (\cos \left (\frac {x}{2}\right )\right )-\frac {1}{2} \log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )+\frac {1}{2} \log \left (\sin \left (\frac {x}{2}\right )\right )+\frac {1}{2} \log \left (\cos \left (\frac {x}{2}\right )+\sin \left (\frac {x}{2}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [B] Leaf count is larger than twice the leaf count of optimal. \(37\) vs. \(2(15)=30\).
time = 2.70, size = 29, normalized size = 1.93 \begin {gather*} -\frac {\text {Log}\left [-1+\text {Sin}\left [x\right ]\right ]}{4}-\frac {\text {Log}\left [1+\text {Cos}\left [x\right ]\right ]}{4}+\frac {\text {Log}\left [-1+\text {Cos}\left [x\right ]\right ]}{4}+\frac {\text {Log}\left [1+\text {Sin}\left [x\right ]\right ]}{4} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 20, normalized size = 1.33
method | result | size |
default | \(\frac {\ln \left (\sec \left (x \right )+\tan \left (x \right )\right )}{2}+\frac {\ln \left (\csc \left (x \right )-\cot \left (x \right )\right )}{2}\) | \(20\) |
risch | \(-\frac {\ln \left ({\mathrm e}^{2 i x}+\left (1-i\right ) {\mathrm e}^{i x}-i\right )}{2}+\frac {\ln \left ({\mathrm e}^{2 i x}+\left (-1+i\right ) {\mathrm e}^{i x}-i\right )}{2}\) | \(42\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 69 vs.
\(2 (11) = 22\).
time = 0.36, size = 69, normalized size = 4.60 \begin {gather*} -\frac {1}{4} \, \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \cos \left (x\right ) + 1\right ) + \frac {1}{4} \, \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1\right ) + \frac {1}{4} \, \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} + 2 \, \sin \left (x\right ) + 1\right ) - \frac {1}{4} \, \log \left (\cos \left (x\right )^{2} + \sin \left (x\right )^{2} - 2 \, \sin \left (x\right ) + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 35 vs.
\(2 (11) = 22\).
time = 0.35, size = 35, normalized size = 2.33 \begin {gather*} -\frac {1}{4} \, \log \left (-\frac {1}{2} \, {\left (\cos \left (x\right ) + 1\right )} \sin \left (x\right ) + \frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) + \frac {1}{4} \, \log \left (-\frac {1}{2} \, {\left (\cos \left (x\right ) - 1\right )} \sin \left (x\right ) - \frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 32 vs.
\(2 (12) = 24\)
time = 0.74, size = 32, normalized size = 2.13 \begin {gather*} - \frac {\log {\left (\sin {\left (x \right )} - 1 \right )}}{4} + \frac {\log {\left (\sin {\left (x \right )} + 1 \right )}}{4} + \frac {\log {\left (\cos {\left (x \right )} - 1 \right )}}{4} - \frac {\log {\left (\cos {\left (x \right )} + 1 \right )}}{4} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 29 vs.
\(2 (11) = 22\).
time = 0.00, size = 38, normalized size = 2.53 \begin {gather*} 2 \left (\frac {\ln \left |\tan \left (\frac {x}{2}\right )\right |}{4}-\frac {\ln \left |\tan \left (\frac {x}{2}\right )-1\right |}{4}+\frac {\ln \left |\tan \left (\frac {x}{2}\right )+1\right |}{4}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.40, size = 24, normalized size = 1.60 \begin {gather*} \frac {\ln \left ({\mathrm {tan}\left (\frac {x}{2}\right )}^2+\mathrm {tan}\left (\frac {x}{2}\right )\right )}{2}-\frac {\ln \left (\mathrm {tan}\left (\frac {x}{2}\right )-1\right )}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________