Optimal. Leaf size=46 \[ \frac{1}{2} \log \left (x^2+2 x+3\right )-\sqrt{5} \tan ^{-1}\left (\frac{x}{\sqrt{5}}\right )+\frac{5 \tan ^{-1}\left (\frac{x+1}{\sqrt{2}}\right )}{\sqrt{2}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.125426, antiderivative size = 46, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.207, Rules used = {6725, 203, 634, 618, 204, 628} \[ \frac{1}{2} \log \left (x^2+2 x+3\right )-\sqrt{5} \tan ^{-1}\left (\frac{x}{\sqrt{5}}\right )+\frac{5 \tan ^{-1}\left (\frac{x+1}{\sqrt{2}}\right )}{\sqrt{2}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 6725
Rule 203
Rule 634
Rule 618
Rule 204
Rule 628
Rubi steps
\begin{align*} \int \frac{15-5 x+x^2+x^3}{\left (5+x^2\right ) \left (3+2 x+x^2\right )} \, dx &=\int \left (-\frac{5}{5+x^2}+\frac{6+x}{3+2 x+x^2}\right ) \, dx\\ &=-\left (5 \int \frac{1}{5+x^2} \, dx\right )+\int \frac{6+x}{3+2 x+x^2} \, dx\\ &=-\sqrt{5} \tan ^{-1}\left (\frac{x}{\sqrt{5}}\right )+\frac{1}{2} \int \frac{2+2 x}{3+2 x+x^2} \, dx+5 \int \frac{1}{3+2 x+x^2} \, dx\\ &=-\sqrt{5} \tan ^{-1}\left (\frac{x}{\sqrt{5}}\right )+\frac{1}{2} \log \left (3+2 x+x^2\right )-10 \operatorname{Subst}\left (\int \frac{1}{-8-x^2} \, dx,x,2+2 x\right )\\ &=-\sqrt{5} \tan ^{-1}\left (\frac{x}{\sqrt{5}}\right )+\frac{5 \tan ^{-1}\left (\frac{1+x}{\sqrt{2}}\right )}{\sqrt{2}}+\frac{1}{2} \log \left (3+2 x+x^2\right )\\ \end{align*}
Mathematica [A] time = 0.0167781, size = 46, normalized size = 1. \[ \frac{1}{2} \log \left (x^2+2 x+3\right )-\sqrt{5} \tan ^{-1}\left (\frac{x}{\sqrt{5}}\right )+\frac{5 \tan ^{-1}\left (\frac{x+1}{\sqrt{2}}\right )}{\sqrt{2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0., size = 41, normalized size = 0.9 \begin{align*}{\frac{\ln \left ({x}^{2}+2\,x+3 \right ) }{2}}+{\frac{5\,\sqrt{2}}{2}\arctan \left ({\frac{ \left ( 2+2\,x \right ) \sqrt{2}}{4}} \right ) }-\arctan \left ({\frac{x\sqrt{5}}{5}} \right ) \sqrt{5} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.67868, size = 51, normalized size = 1.11 \begin{align*} \frac{5}{2} \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2}{\left (x + 1\right )}\right ) - \sqrt{5} \arctan \left (\frac{1}{5} \, \sqrt{5} x\right ) + \frac{1}{2} \, \log \left (x^{2} + 2 \, x + 3\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.22307, size = 132, normalized size = 2.87 \begin{align*} \frac{5}{2} \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2}{\left (x + 1\right )}\right ) - \sqrt{5} \arctan \left (\frac{1}{5} \, \sqrt{5} x\right ) + \frac{1}{2} \, \log \left (x^{2} + 2 \, x + 3\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.181882, size = 51, normalized size = 1.11 \begin{align*} \frac{\log{\left (x^{2} + 2 x + 3 \right )}}{2} - \sqrt{5} \operatorname{atan}{\left (\frac{\sqrt{5} x}{5} \right )} + \frac{5 \sqrt{2} \operatorname{atan}{\left (\frac{\sqrt{2} x}{2} + \frac{\sqrt{2}}{2} \right )}}{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.08551, size = 51, normalized size = 1.11 \begin{align*} \frac{5}{2} \, \sqrt{2} \arctan \left (\frac{1}{2} \, \sqrt{2}{\left (x + 1\right )}\right ) - \sqrt{5} \arctan \left (\frac{1}{5} \, \sqrt{5} x\right ) + \frac{1}{2} \, \log \left (x^{2} + 2 \, x + 3\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]