Optimal. Leaf size=43 \[ x-2 \tan ^{-1}\left (\frac {\sin (x)}{3+\cos (x)}\right )-2 \tan ^{-1}\left (\frac {3 \sin (x)+7 \cos (x) \sin (x)}{1+2 \cos (x)+5 \cos ^2(x)}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [F]
time = 0.52, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps
used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {}
\begin {gather*} \int \frac {-1+4 \cos (x)+5 \cos ^2(x)}{-1-4 \cos (x)-3 \cos ^2(x)+4 \cos ^3(x)} \, dx \end {gather*}
Verification is not applicable to the result.
[In]
[Out]
Rubi steps
\begin {align*} \int \frac {-1+4 \cos (x)+5 \cos ^2(x)}{-1-4 \cos (x)-3 \cos ^2(x)+4 \cos ^3(x)} \, dx &=\int \left (\frac {1}{1+4 \cos (x)+3 \cos ^2(x)-4 \cos ^3(x)}+\frac {4 \cos (x)}{-1-4 \cos (x)-3 \cos ^2(x)+4 \cos ^3(x)}+\frac {5 \cos ^2(x)}{-1-4 \cos (x)-3 \cos ^2(x)+4 \cos ^3(x)}\right ) \, dx\\ &=4 \int \frac {\cos (x)}{-1-4 \cos (x)-3 \cos ^2(x)+4 \cos ^3(x)} \, dx+5 \int \frac {\cos ^2(x)}{-1-4 \cos (x)-3 \cos ^2(x)+4 \cos ^3(x)} \, dx+\int \frac {1}{1+4 \cos (x)+3 \cos ^2(x)-4 \cos ^3(x)} \, dx\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 61, normalized size = 1.42 \begin {gather*} \tan ^{-1}\left (\frac {1}{4} \sec ^3\left (\frac {x}{2}\right ) \left (\sin \left (\frac {x}{2}\right )-3 \sin \left (\frac {3 x}{2}\right )\right )\right )-\tan ^{-1}\left (\frac {1}{4} \sec ^3\left (\frac {x}{2}\right ) \left (-\sin \left (\frac {x}{2}\right )+3 \sin \left (\frac {3 x}{2}\right )\right )\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [F(-1)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.09, size = 17, normalized size = 0.40
method | result | size |
default | \(2 \arctan \left (\tan ^{3}\left (\frac {x}{2}\right )-2 \tan \left (\frac {x}{2}\right )\right )\) | \(17\) |
risch | \(-i \ln \left ({\mathrm e}^{3 i x}-2 \,{\mathrm e}^{2 i x}-{\mathrm e}^{i x}-2\right )+i \ln \left ({\mathrm e}^{3 i x}+\frac {{\mathrm e}^{2 i x}}{2}+{\mathrm e}^{i x}-\frac {1}{2}\right )\) | \(50\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 1.76, size = 63, normalized size = 1.47 \begin {gather*} -\arctan \left (\sin \left (3 \, x\right ) + \frac {1}{2} \, \sin \left (2 \, x\right ) + \sin \left (x\right ), \cos \left (3 \, x\right ) + \frac {1}{2} \, \cos \left (2 \, x\right ) + \cos \left (x\right ) - \frac {1}{2}\right ) + \arctan \left (\sin \left (3 \, x\right ) - 2 \, \sin \left (2 \, x\right ) - \sin \left (x\right ), \cos \left (3 \, x\right ) - 2 \, \cos \left (2 \, x\right ) - \cos \left (x\right ) - 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.33, size = 31, normalized size = 0.72 \begin {gather*} \arctan \left (\frac {5 \, \cos \left (x\right )^{3} - \cos \left (x\right )}{{\left (3 \, \cos \left (x\right )^{2} + 4 \, \cos \left (x\right ) + 1\right )} \sin \left (x\right )}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.01, size = 20, normalized size = 0.47 \begin {gather*} -2 \arctan \left (-\tan ^{3}\left (\frac {x}{2}\right )+2 \tan \left (\frac {x}{2}\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.30, size = 27, normalized size = 0.63 \begin {gather*} x-2\,\mathrm {atan}\left (2\,\mathrm {tan}\left (\frac {x}{2}\right )-{\mathrm {tan}\left (\frac {x}{2}\right )}^3\right )-2\,\mathrm {atan}\left (\mathrm {tan}\left (\frac {x}{2}\right )\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________