Optimal. Leaf size=15 \[ \log (x+4)-\frac{1}{2} \tanh ^{-1}\left (\frac{x}{2}\right ) \]
[Out]
_______________________________________________________________________________________
Rubi [A] time = 0.0849651, antiderivative size = 15, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167 \[ \log (x+4)-\frac{1}{2} \tanh ^{-1}\left (\frac{x}{2}\right ) \]
Antiderivative was successfully verified.
[In] Int[(x + x^2)/((4 + x)*(-4 + x^2)),x]
[Out]
_______________________________________________________________________________________
Rubi in Sympy [A] time = 34.0988, size = 10, normalized size = 0.67 \[ \log{\left (x + 4 \right )} - \frac{\operatorname{atanh}{\left (\frac{x}{2} \right )}}{2} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] rubi_integrate((x**2+x)/(4+x)/(x**2-4),x)
[Out]
_______________________________________________________________________________________
Mathematica [A] time = 0.00925871, size = 23, normalized size = 1.53 \[ \frac{1}{4} \log (2-x)-\frac{1}{4} \log (x+2)+\log (x+4) \]
Antiderivative was successfully verified.
[In] Integrate[(x + x^2)/((4 + x)*(-4 + x^2)),x]
[Out]
_______________________________________________________________________________________
Maple [A] time = 0.012, size = 18, normalized size = 1.2 \[ -{\frac{\ln \left ( 2+x \right ) }{4}}+\ln \left ( 4+x \right ) +{\frac{\ln \left ( x-2 \right ) }{4}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] int((x^2+x)/(4+x)/(x^2-4),x)
[Out]
_______________________________________________________________________________________
Maxima [A] time = 0.879987, size = 23, normalized size = 1.53 \[ \log \left (x + 4\right ) - \frac{1}{4} \, \log \left (x + 2\right ) + \frac{1}{4} \, \log \left (x - 2\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((x^2 + x)/((x^2 - 4)*(x + 4)),x, algorithm="maxima")
[Out]
_______________________________________________________________________________________
Fricas [A] time = 0.275746, size = 23, normalized size = 1.53 \[ \log \left (x + 4\right ) - \frac{1}{4} \, \log \left (x + 2\right ) + \frac{1}{4} \, \log \left (x - 2\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((x^2 + x)/((x^2 - 4)*(x + 4)),x, algorithm="fricas")
[Out]
_______________________________________________________________________________________
Sympy [A] time = 0.291078, size = 17, normalized size = 1.13 \[ \frac{\log{\left (x - 2 \right )}}{4} - \frac{\log{\left (x + 2 \right )}}{4} + \log{\left (x + 4 \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((x**2+x)/(4+x)/(x**2-4),x)
[Out]
_______________________________________________________________________________________
GIAC/XCAS [A] time = 0.261533, size = 27, normalized size = 1.8 \[{\rm ln}\left ({\left | x + 4 \right |}\right ) - \frac{1}{4} \,{\rm ln}\left ({\left | x + 2 \right |}\right ) + \frac{1}{4} \,{\rm ln}\left ({\left | x - 2 \right |}\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In] integrate((x^2 + x)/((x^2 - 4)*(x + 4)),x, algorithm="giac")
[Out]