3.437 \(\int \frac{4+x}{4 x+x^3} \, dx\)

Optimal. Leaf size=23 \[ -\frac{1}{2} \log \left (x^2+4\right )+\log (x)+\frac{1}{2} \tan ^{-1}\left (\frac{x}{2}\right ) \]

[Out]

ArcTan[x/2]/2 + Log[x] - Log[4 + x^2]/2

_______________________________________________________________________________________

Rubi [A]  time = 0.0480656, antiderivative size = 23, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 5, integrand size = 13, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.385 \[ -\frac{1}{2} \log \left (x^2+4\right )+\log (x)+\frac{1}{2} \tan ^{-1}\left (\frac{x}{2}\right ) \]

Antiderivative was successfully verified.

[In]  Int[(4 + x)/(4*x + x^3),x]

[Out]

ArcTan[x/2]/2 + Log[x] - Log[4 + x^2]/2

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 6.97383, size = 17, normalized size = 0.74 \[ \log{\left (x \right )} - \frac{\log{\left (x^{2} + 4 \right )}}{2} + \frac{\operatorname{atan}{\left (\frac{x}{2} \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((4+x)/(x**3+4*x),x)

[Out]

log(x) - log(x**2 + 4)/2 + atan(x/2)/2

_______________________________________________________________________________________

Mathematica [A]  time = 0.00664285, size = 23, normalized size = 1. \[ -\frac{1}{2} \log \left (x^2+4\right )+\log (x)+\frac{1}{2} \tan ^{-1}\left (\frac{x}{2}\right ) \]

Antiderivative was successfully verified.

[In]  Integrate[(4 + x)/(4*x + x^3),x]

[Out]

ArcTan[x/2]/2 + Log[x] - Log[4 + x^2]/2

_______________________________________________________________________________________

Maple [A]  time = 0.007, size = 18, normalized size = 0.8 \[{\frac{1}{2}\arctan \left ({\frac{x}{2}} \right ) }+\ln \left ( x \right ) -{\frac{\ln \left ({x}^{2}+4 \right ) }{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((4+x)/(x^3+4*x),x)

[Out]

1/2*arctan(1/2*x)+ln(x)-1/2*ln(x^2+4)

_______________________________________________________________________________________

Maxima [A]  time = 0.872465, size = 23, normalized size = 1. \[ \frac{1}{2} \, \arctan \left (\frac{1}{2} \, x\right ) - \frac{1}{2} \, \log \left (x^{2} + 4\right ) + \log \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x + 4)/(x^3 + 4*x),x, algorithm="maxima")

[Out]

1/2*arctan(1/2*x) - 1/2*log(x^2 + 4) + log(x)

_______________________________________________________________________________________

Fricas [A]  time = 0.263439, size = 23, normalized size = 1. \[ \frac{1}{2} \, \arctan \left (\frac{1}{2} \, x\right ) - \frac{1}{2} \, \log \left (x^{2} + 4\right ) + \log \left (x\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x + 4)/(x^3 + 4*x),x, algorithm="fricas")

[Out]

1/2*arctan(1/2*x) - 1/2*log(x^2 + 4) + log(x)

_______________________________________________________________________________________

Sympy [A]  time = 0.272453, size = 17, normalized size = 0.74 \[ \log{\left (x \right )} - \frac{\log{\left (x^{2} + 4 \right )}}{2} + \frac{\operatorname{atan}{\left (\frac{x}{2} \right )}}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((4+x)/(x**3+4*x),x)

[Out]

log(x) - log(x**2 + 4)/2 + atan(x/2)/2

_______________________________________________________________________________________

GIAC/XCAS [A]  time = 0.260941, size = 24, normalized size = 1.04 \[ \frac{1}{2} \, \arctan \left (\frac{1}{2} \, x\right ) - \frac{1}{2} \,{\rm ln}\left (x^{2} + 4\right ) +{\rm ln}\left ({\left | x \right |}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((x + 4)/(x^3 + 4*x),x, algorithm="giac")

[Out]

1/2*arctan(1/2*x) - 1/2*ln(x^2 + 4) + ln(abs(x))