Optimal. Leaf size=8 \[ -\text {arctanh}(\cos (x))+\cos (x) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.01, antiderivative size = 8, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 3, integrand size = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.600, Rules used = {2672, 327, 212}
\begin {gather*} \cos (x)-\text {arctanh}(\cos (x)) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 327
Rule 2672
Rubi steps
\begin {gather*} \begin {aligned} \text {Integral} &=-\text {Subst}\left (\int \frac {x^2}{1-x^2} \, dx,x,\cos (x)\right )\\ &=\cos (x)-\text {Subst}\left (\int \frac {1}{1-x^2} \, dx,x,\cos (x)\right )\\ &=-\text {arctanh}(\cos (x))+\cos (x)\\ \end {aligned} \end {gather*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(19\) vs. \(2(8)=16\).
time = 0.00, size = 19, normalized size = 2.38 \begin {gather*} \cos (x)-\log \left (\cos \left (\frac {x}{2}\right )\right )+\log \left (\sin \left (\frac {x}{2}\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.07, size = 12, normalized size = 1.50
method | result | size |
default | \(\cos \left (x \right )+\ln \left (-\cot \left (x \right )+\csc \left (x \right )\right )\) | \(12\) |
risch | \(\frac {{\mathrm e}^{i x}}{2}+\frac {{\mathrm e}^{-i x}}{2}-\ln \left ({\mathrm e}^{i x}+1\right )+\ln \left ({\mathrm e}^{i x}-1\right )\) | \(34\) |
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. 17 vs.
\(2 (8) = 16\).
time = 0.37, size = 17, normalized size = 2.12 \begin {gather*} \cos \left (x\right ) - \frac {1}{2} \, \log \left (\cos \left (x\right ) + 1\right ) + \frac {1}{2} \, \log \left (\cos \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. 21 vs.
\(2 (8) = 16\).
time = 0.62, size = 21, normalized size = 2.62 \begin {gather*} \cos \left (x\right ) - \frac {1}{2} \, \log \left (\frac {1}{2} \, \cos \left (x\right ) + \frac {1}{2}\right ) + \frac {1}{2} \, \log \left (-\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. 19 vs.
\(2 (7) = 14\).
time = 0.03, size = 19, normalized size = 2.38 \begin {gather*} \frac {\log {\left (\cos {\left (x \right )} - 1 \right )}}{2} - \frac {\log {\left (\cos {\left (x \right )} + 1 \right )}}{2} + \cos {\left (x \right )} \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. 19 vs.
\(2 (8) = 16\).
time = 0.50, size = 19, normalized size = 2.38 \begin {gather*} \cos \left (x\right ) - \frac {1}{2} \, \log \left (\cos \left (x\right ) + 1\right ) + \frac {1}{2} \, \log \left (-\cos \left (x\right ) + 1\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.23, size = 18, normalized size = 2.25 \begin {gather*} \ln \left (\mathrm {tan}\left (\frac {x}{2}\right )\right )+\frac {2}{{\mathrm {tan}\left (\frac {x}{2}\right )}^2+1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Chatgpt [F] Failed to verify
time = 1.00, size = 10, normalized size = 1.25 \begin {gather*} \ln \left (\sin \left (x \right )\right )-\frac {\left (\sin ^{2}\left (x \right )\right )}{2} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________