\(\int \frac {e^{\frac {1}{2} (-6-x)} (-2-x)}{e^{\frac {1}{2} (-6-x)} x-x^2} \, dx\) [3177]

   Optimal result
   Rubi [F]
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 38, antiderivative size = 25 \[ \int \frac {e^{\frac {1}{2} (-6-x)} (-2-x)}{e^{\frac {1}{2} (-6-x)} x-x^2} \, dx=\log \left (\frac {9 \left (-e^{\frac {1}{2} (-6+x)-x}+x\right )^2}{x^2}\right ) \]

[Out]

ln(9*(x-exp(-1/2*x-3))^2/x^2)

Rubi [F]

\[ \int \frac {e^{\frac {1}{2} (-6-x)} (-2-x)}{e^{\frac {1}{2} (-6-x)} x-x^2} \, dx=\int \frac {e^{\frac {1}{2} (-6-x)} (-2-x)}{e^{\frac {1}{2} (-6-x)} x-x^2} \, dx \]

[In]

Int[(E^((-6 - x)/2)*(-2 - x))/(E^((-6 - x)/2)*x - x^2),x]

[Out]

Defer[Int][(-1 + E^(3 + x/2)*x)^(-1), x] + 2*Defer[Int][1/(x*(-1 + E^(3 + x/2)*x)), x]

Rubi steps \begin{align*} \text {integral}& = \int \frac {-2-x}{x \left (1-e^{3+\frac {x}{2}} x\right )} \, dx \\ & = \int \left (\frac {1}{-1+e^{3+\frac {x}{2}} x}+\frac {2}{x \left (-1+e^{3+\frac {x}{2}} x\right )}\right ) \, dx \\ & = 2 \int \frac {1}{x \left (-1+e^{3+\frac {x}{2}} x\right )} \, dx+\int \frac {1}{-1+e^{3+\frac {x}{2}} x} \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 0.13 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.68 \[ \int \frac {e^{\frac {1}{2} (-6-x)} (-2-x)}{e^{\frac {1}{2} (-6-x)} x-x^2} \, dx=4 \text {arctanh}\left (1-2 e^{3+\frac {x}{2}} x\right ) \]

[In]

Integrate[(E^((-6 - x)/2)*(-2 - x))/(E^((-6 - x)/2)*x - x^2),x]

[Out]

4*ArcTanh[1 - 2*E^(3 + x/2)*x]

Maple [A] (verified)

Time = 1.70 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.76

method result size
norman \(-2 \ln \left (x \right )+2 \ln \left (x -{\mathrm e}^{-\frac {x}{2}-3}\right )\) \(19\)
parallelrisch \(-2 \ln \left (x \right )+2 \ln \left (x -{\mathrm e}^{-\frac {x}{2}-3}\right )\) \(19\)
risch \(-2 \ln \left (x \right )+6+2 \ln \left ({\mathrm e}^{-\frac {x}{2}-3}-x \right )\) \(20\)

[In]

int((-2-x)*exp(-1/2*x-3)/(x*exp(-1/2*x-3)-x^2),x,method=_RETURNVERBOSE)

[Out]

-2*ln(x)+2*ln(x-exp(-1/2*x-3))

Fricas [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.72 \[ \int \frac {e^{\frac {1}{2} (-6-x)} (-2-x)}{e^{\frac {1}{2} (-6-x)} x-x^2} \, dx=-2 \, \log \left (x\right ) + 2 \, \log \left (-x + e^{\left (-\frac {1}{2} \, x - 3\right )}\right ) \]

[In]

integrate((-2-x)*exp(-1/2*x-3)/(x*exp(-1/2*x-3)-x^2),x, algorithm="fricas")

[Out]

-2*log(x) + 2*log(-x + e^(-1/2*x - 3))

Sympy [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.68 \[ \int \frac {e^{\frac {1}{2} (-6-x)} (-2-x)}{e^{\frac {1}{2} (-6-x)} x-x^2} \, dx=- 2 \log {\left (x \right )} + 2 \log {\left (- x + e^{- \frac {x}{2} - 3} \right )} \]

[In]

integrate((-2-x)*exp(-1/2*x-3)/(x*exp(-1/2*x-3)-x**2),x)

[Out]

-2*log(x) + 2*log(-x + exp(-x/2 - 3))

Maxima [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.92 \[ \int \frac {e^{\frac {1}{2} (-6-x)} (-2-x)}{e^{\frac {1}{2} (-6-x)} x-x^2} \, dx=-x + 2 \, \log \left (\frac {{\left (x e^{\left (\frac {1}{2} \, x + 3\right )} - 1\right )} e^{\left (-3\right )}}{x}\right ) \]

[In]

integrate((-2-x)*exp(-1/2*x-3)/(x*exp(-1/2*x-3)-x^2),x, algorithm="maxima")

[Out]

-x + 2*log((x*e^(1/2*x + 3) - 1)*e^(-3)/x)

Giac [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.80 \[ \int \frac {e^{\frac {1}{2} (-6-x)} (-2-x)}{e^{\frac {1}{2} (-6-x)} x-x^2} \, dx=-2 \, \log \left (-\frac {1}{2} \, x\right ) + 2 \, \log \left (x - e^{\left (-\frac {1}{2} \, x - 3\right )}\right ) \]

[In]

integrate((-2-x)*exp(-1/2*x-3)/(x*exp(-1/2*x-3)-x^2),x, algorithm="giac")

[Out]

-2*log(-1/2*x) + 2*log(x - e^(-1/2*x - 3))

Mupad [B] (verification not implemented)

Time = 9.39 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.72 \[ \int \frac {e^{\frac {1}{2} (-6-x)} (-2-x)}{e^{\frac {1}{2} (-6-x)} x-x^2} \, dx=2\,\ln \left (x-\frac {{\mathrm {e}}^{-3}}{\sqrt {{\mathrm {e}}^x}}\right )-2\,\ln \left (x\right ) \]

[In]

int(-(exp(- x/2 - 3)*(x + 2))/(x*exp(- x/2 - 3) - x^2),x)

[Out]

2*log(x - exp(-3)/exp(x)^(1/2)) - 2*log(x)