Optimal. Leaf size=23 \[ -\frac {3}{2} \tan ^{-1}\left (\frac {x}{2}\right )+\tan ^{-1}(x)+\frac {1}{2} \log \left (4+x^2\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps
used = 7, number of rules used = 6, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {1687, 1180,
209, 1261, 640, 31} \begin {gather*} \frac {1}{2} \log \left (x^2+4\right )-\frac {3}{2} \tan ^{-1}\left (\frac {x}{2}\right )+\tan ^{-1}(x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 209
Rule 640
Rule 1180
Rule 1261
Rule 1687
Rubi steps
\begin {align*} \int \frac {1+x-2 x^2+x^3}{4+5 x^2+x^4} \, dx &=\int \frac {1-2 x^2}{4+5 x^2+x^4} \, dx+\int \frac {x \left (1+x^2\right )}{4+5 x^2+x^4} \, dx\\ &=\frac {1}{2} \text {Subst}\left (\int \frac {1+x}{4+5 x+x^2} \, dx,x,x^2\right )-3 \int \frac {1}{4+x^2} \, dx+\int \frac {1}{1+x^2} \, dx\\ &=-\frac {3}{2} \tan ^{-1}\left (\frac {x}{2}\right )+\tan ^{-1}(x)+\frac {1}{2} \text {Subst}\left (\int \frac {1}{4+x} \, dx,x,x^2\right )\\ &=-\frac {3}{2} \tan ^{-1}\left (\frac {x}{2}\right )+\tan ^{-1}(x)+\frac {1}{2} \log \left (4+x^2\right )\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.01, size = 23, normalized size = 1.00 \begin {gather*} -\frac {3}{2} \tan ^{-1}\left (\frac {x}{2}\right )+\tan ^{-1}(x)+\frac {1}{2} \log \left (4+x^2\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Mathics [A]
time = 1.79, size = 17, normalized size = 0.74 \begin {gather*} \text {ArcTan}\left [x\right ]-\frac {3 \text {ArcTan}\left [\frac {x}{2}\right ]}{2}+\frac {\text {Log}\left [4+x^2\right ]}{2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.02, size = 18, normalized size = 0.78
method | result | size |
default | \(-\frac {3 \arctan \left (\frac {x}{2}\right )}{2}+\arctan \left (x \right )+\frac {\ln \left (x^{2}+4\right )}{2}\) | \(18\) |
risch | \(-\frac {3 \arctan \left (\frac {x}{2}\right )}{2}+\arctan \left (x \right )+\frac {\ln \left (x^{2}+4\right )}{2}\) | \(18\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.35, size = 17, normalized size = 0.74 \begin {gather*} -\frac {3}{2} \, \arctan \left (\frac {1}{2} \, x\right ) + \arctan \left (x\right ) + \frac {1}{2} \, \log \left (x^{2} + 4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.36, size = 17, normalized size = 0.74 \begin {gather*} -\frac {3}{2} \, \arctan \left (\frac {1}{2} \, x\right ) + \arctan \left (x\right ) + \frac {1}{2} \, \log \left (x^{2} + 4\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.09, size = 19, normalized size = 0.83 \begin {gather*} \frac {\log {\left (x^{2} + 4 \right )}}{2} - \frac {3 \operatorname {atan}{\left (\frac {x}{2} \right )}}{2} + \operatorname {atan}{\left (x \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.00, size = 21, normalized size = 0.91 \begin {gather*} \arctan x+\frac {\ln \left (x^{2}+4\right )}{2}-\frac {3}{2} \arctan \left (\frac {x}{2}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 0.19, size = 33, normalized size = 1.43 \begin {gather*} -\mathrm {atan}\left (\frac {1305}{4\,\left (144\,x-162\right )}+\frac {9}{8}\right )+\ln \left (x-2{}\mathrm {i}\right )\,\left (\frac {1}{2}+\frac {3}{4}{}\mathrm {i}\right )+\ln \left (x+2{}\mathrm {i}\right )\,\left (\frac {1}{2}-\frac {3}{4}{}\mathrm {i}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________