Optimal. Leaf size=16 \[ \frac {x}{2}-\frac {1}{2} \log (\cos (x)+\sin (x)) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 16, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {3176, 3212}
\begin {gather*} \frac {x}{2}-\frac {1}{2} \log (\sin (x)+\cos (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3176
Rule 3212
Rubi steps
\begin {align*} \int \frac {\sin (x)}{\cos (x)+\sin (x)} \, dx &=\frac {x}{2}-\frac {1}{2} \int \frac {\cos (x)-\sin (x)}{\cos (x)+\sin (x)} \, dx\\ &=\frac {x}{2}-\frac {1}{2} \log (\cos (x)+\sin (x))\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 16, normalized size = 1.00 \begin {gather*} \frac {x}{2}-\frac {1}{2} \log (\cos (x)+\sin (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.05, size = 23, normalized size = 1.44
method | result | size |
risch | \(\frac {x}{2}+\frac {i x}{2}-\frac {\ln \left ({\mathrm e}^{2 i x}+i\right )}{2}\) | \(20\) |
default | \(-\frac {\ln \left (\tan \left (x \right )+1\right )}{2}+\frac {\ln \left (1+\tan ^{2}\left (x \right )\right )}{4}+\frac {\arctan \left (\tan \left (x \right )\right )}{2}\) | \(23\) |
norman | \(\frac {\frac {x}{2}+\frac {x \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{2}}{1+\tan ^{2}\left (\frac {x}{2}\right )}+\frac {\ln \left (1+\tan ^{2}\left (\frac {x}{2}\right )\right )}{2}-\frac {\ln \left (\tan ^{2}\left (\frac {x}{2}\right )-2 \tan \left (\frac {x}{2}\right )-1\right )}{2}\) | \(54\) |
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. 53 vs.
\(2 (12) = 24\).
time = 1.30, size = 53, normalized size = 3.31 \begin {gather*} \arctan \left (\frac {\sin \left (x\right )}{\cos \left (x\right ) + 1}\right ) - \frac {1}{2} \, \log \left (-\frac {2 \, \sin \left (x\right )}{\cos \left (x\right ) + 1} + \frac {\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} - 1\right ) + \frac {1}{2} \, \log \left (\frac {\sin \left (x\right )^{2}}{{\left (\cos \left (x\right ) + 1\right )}^{2}} + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.92, size = 15, normalized size = 0.94 \begin {gather*} \frac {1}{2} \, x - \frac {1}{4} \, \log \left (2 \, \cos \left (x\right ) \sin \left (x\right ) + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.05, size = 12, normalized size = 0.75 \begin {gather*} \frac {x}{2} - \frac {\log {\left (\sin {\left (x \right )} + \cos {\left (x \right )} \right )}}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.46, size = 21, normalized size = 1.31 \begin {gather*} \frac {1}{2} \, x + \frac {1}{4} \, \log \left (\tan \left (x\right )^{2} + 1\right ) - \frac {1}{2} \, \log \left ({\left | \tan \left (x\right ) + 1 \right |}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.03, size = 13, normalized size = 0.81 \begin {gather*} \frac {x}{2}-\frac {\ln \left (\cos \left (x-\frac {\pi }{4}\right )\right )}{2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________