Optimal. Leaf size=8 \[ \frac {2}{-1+\cot (x)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 13, normalized size of antiderivative = 1.62, number of steps
used = 2, number of rules used = 2, integrand size = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {12, 3154}
\begin {gather*} \frac {2 \sin (x)}{\cos (x)-\sin (x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 3154
Rubi steps
\begin {gather*} \begin {aligned} \text {Integral} &=2 \int \frac {1}{(\cos (x)-\sin (x))^2} \, dx\\ &=\frac {2 \sin (x)}{\cos (x)-\sin (x)}\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 13, normalized size = 1.62 \begin {gather*} \frac {2 \sin (x)}{\cos (x)-\sin (x)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.10, size = 9, normalized size = 1.12
method | result | size |
default | \(-\frac {2}{\tan \left (x \right )-1}\) | \(9\) |
risch | \(\frac {2}{{\mathrm e}^{2 i x}-i}\) | \(13\) |
parallelrisch | \(\frac {2 \sin \left (x \right )}{\cos \left (x \right )-\sin \left (x \right )}\) | \(14\) |
norman | \(-\frac {4 \tan \left (\frac {x}{2}\right )}{\tan ^{2}\left (\frac {x}{2}\right )+2 \tan \left (\frac {x}{2}\right )-1}\) | \(23\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.40, size = 8, normalized size = 1.00 \begin {gather*} -\frac {2}{\tan \left (x\right ) - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.57, size = 15, normalized size = 1.88 \begin {gather*} \frac {\cos \left (x\right ) + \sin \left (x\right )}{\cos \left (x\right ) - \sin \left (x\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. 22 vs.
\(2 (5) = 10\).
time = 0.48, size = 22, normalized size = 2.75 \begin {gather*} - \frac {4 \tan {\left (\frac {x}{2} \right )}}{\tan ^{2}{\left (\frac {x}{2} \right )} + 2 \tan {\left (\frac {x}{2} \right )} - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.52, size = 8, normalized size = 1.00 \begin {gather*} -\frac {2}{\tan \left (x\right ) - 1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.20, size = 13, normalized size = 1.62 \begin {gather*} \frac {2\,\sin \left (x\right )}{\cos \left (x\right )-\sin \left (x\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Chatgpt [F] Failed to verify
time = 1.00, size = 7, normalized size = 0.88 \begin {gather*} -2 \arctan \left (\cos \left (x \right )-1\right ) \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________