Optimal. Leaf size=11 \[ \log \left (2-3 \sin (x)+\sin ^2(x)\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps
used = 2, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {4419, 642}
\begin {gather*} \log \left (\sin ^2(x)-3 \sin (x)+2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 642
Rule 4419
Rubi steps
\begin {align*} \int \frac {\cos (x) (-3+2 \sin (x))}{2-3 \sin (x)+\sin ^2(x)} \, dx &=\text {Subst}\left (\int \frac {-3+2 x}{2-3 x+x^2} \, dx,x,\sin (x)\right )\\ &=\log \left (2-3 \sin (x)+\sin ^2(x)\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(26\) vs. \(2(11)=22\).
time = 0.06, size = 26, normalized size = 2.36 \begin {gather*} 2 \log \left (\cos \left (\frac {x}{2}\right )-\sin \left (\frac {x}{2}\right )\right )+\log (2-\sin (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 12, normalized size = 1.09
method | result | size |
derivativedivides | \(\ln \left (2-3 \sin \left (x \right )+\sin ^{2}\left (x \right )\right )\) | \(12\) |
default | \(\ln \left (2-3 \sin \left (x \right )+\sin ^{2}\left (x \right )\right )\) | \(12\) |
risch | \(-2 i x +2 \ln \left ({\mathrm e}^{i x}-i\right )+\ln \left (-4 i {\mathrm e}^{i x}+{\mathrm e}^{2 i x}-1\right )\) | \(33\) |
norman | \(2 \ln \left (\tan \left (\frac {x}{2}\right )-1\right )-2 \ln \left (1+\tan ^{2}\left (\frac {x}{2}\right )\right )+\ln \left (\tan ^{2}\left (\frac {x}{2}\right )-\tan \left (\frac {x}{2}\right )+1\right )\) | \(37\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 3.30, size = 11, normalized size = 1.00 \begin {gather*} \log \left (\sin \left (x\right )^{2} - 3 \, \sin \left (x\right ) + 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.70, size = 15, normalized size = 1.36 \begin {gather*} \log \left (-\frac {1}{2} \, \sin \left (x\right ) + 1\right ) + \log \left (-\sin \left (x\right ) + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.07, size = 12, normalized size = 1.09 \begin {gather*} \log {\left (\sin {\left (x \right )} - 2 \right )} + \log {\left (\sin {\left (x \right )} - 1 \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 15, normalized size = 1.36 \begin {gather*} \log \left (-\sin \left (x\right ) + 2\right ) + \log \left (-\sin \left (x\right ) + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.09, size = 11, normalized size = 1.00 \begin {gather*} \ln \left ({\sin \left (x\right )}^2-3\,\sin \left (x\right )+2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________