Optimal. Leaf size=21 \[ \frac{x^2}{2}+\frac{1}{2} \log \left (x^2+1\right )-3 x \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0145165, antiderivative size = 21, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {1810, 260} \[ \frac{x^2}{2}+\frac{1}{2} \log \left (x^2+1\right )-3 x \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 1810
Rule 260
Rubi steps
\begin{align*} \int \frac{-3+2 x-3 x^2+x^3}{1+x^2} \, dx &=\int \left (-3+x+\frac{x}{1+x^2}\right ) \, dx\\ &=-3 x+\frac{x^2}{2}+\int \frac{x}{1+x^2} \, dx\\ &=-3 x+\frac{x^2}{2}+\frac{1}{2} \log \left (1+x^2\right )\\ \end{align*}
Mathematica [A] time = 0.0044459, size = 21, normalized size = 1. \[ \frac{x^2}{2}+\frac{1}{2} \log \left (x^2+1\right )-3 x \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.001, size = 18, normalized size = 0.9 \begin{align*} -3\,x+{\frac{{x}^{2}}{2}}+{\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.47398, size = 23, normalized size = 1.1 \begin{align*} \frac{1}{2} \, x^{2} - 3 \, x + \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.43708, size = 46, normalized size = 2.19 \begin{align*} \frac{1}{2} \, x^{2} - 3 \, x + \frac{1}{2} \, \log \left (x^{2} + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.076529, size = 15, normalized size = 0.71 \begin{align*} \frac{x^{2}}{2} - 3 x + \frac{\log{\left (x^{2} + 1 \right )}}{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.09907, size = 23, normalized size = 1.1 \begin{align*} \frac{1}{2} \, x^{2} - 3 \, x + \frac{1}{2} \, \log \left (x^{2} + 1\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]