Optimal. Leaf size=22 \[ \frac{x}{x^2+1}+\frac{1}{2} \log \left (x^2+1\right )+\tan ^{-1}(x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0145003, antiderivative size = 22, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.263, Rules used = {28, 1814, 635, 203, 260} \[ \frac{x}{x^2+1}+\frac{1}{2} \log \left (x^2+1\right )+\tan ^{-1}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 28
Rule 1814
Rule 635
Rule 203
Rule 260
Rubi steps
\begin{align*} \int \frac{2+x+x^3}{1+2 x^2+x^4} \, dx &=\int \frac{2+x+x^3}{\left (1+x^2\right )^2} \, dx\\ &=\frac{x}{1+x^2}-\frac{1}{2} \int \frac{-2-2 x}{1+x^2} \, dx\\ &=\frac{x}{1+x^2}+\int \frac{1}{1+x^2} \, dx+\int \frac{x}{1+x^2} \, dx\\ &=\frac{x}{1+x^2}+\tan ^{-1}(x)+\frac{1}{2} \log \left (1+x^2\right )\\ \end{align*}
Mathematica [A] time = 0.0081954, size = 22, normalized size = 1. \[ \frac{x}{x^2+1}+\frac{1}{2} \log \left (x^2+1\right )+\tan ^{-1}(x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.003, size = 21, normalized size = 1. \begin{align*}{\frac{x}{{x}^{2}+1}}+\arctan \left ( x \right ) +{\frac{\ln \left ({x}^{2}+1 \right ) }{2}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.46341, size = 27, normalized size = 1.23 \begin{align*} \frac{x}{x^{2} + 1} + \arctan \left (x\right ) + \frac{1}{2} \, \log \left (x^{2} + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.51564, size = 95, normalized size = 4.32 \begin{align*} \frac{2 \,{\left (x^{2} + 1\right )} \arctan \left (x\right ) +{\left (x^{2} + 1\right )} \log \left (x^{2} + 1\right ) + 2 \, x}{2 \,{\left (x^{2} + 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.103382, size = 17, normalized size = 0.77 \begin{align*} \frac{x}{x^{2} + 1} + \frac{\log{\left (x^{2} + 1 \right )}}{2} + \operatorname{atan}{\left (x \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.20552, size = 27, normalized size = 1.23 \begin{align*} \frac{x}{x^{2} + 1} + \arctan \left (x\right ) + \frac{1}{2} \, \log \left (x^{2} + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]