3.30.26 \(\int \frac {-2+10 x-5 x^2}{-10 x+5 x^2} \, dx\)

Optimal. Leaf size=17 \[ -x+\frac {1}{5} \log \left (\frac {100 x}{-2+x}\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 20, normalized size of antiderivative = 1.18, number of steps used = 3, number of rules used = 2, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {1593, 893} \begin {gather*} -x-\frac {1}{5} \log (2-x)+\frac {\log (x)}{5} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-2 + 10*x - 5*x^2)/(-10*x + 5*x^2),x]

[Out]

-x - Log[2 - x]/5 + Log[x]/5

Rule 893

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && I
ntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-2+10 x-5 x^2}{x (-10+5 x)} \, dx\\ &=\int \left (-1-\frac {1}{5 (-2+x)}+\frac {1}{5 x}\right ) \, dx\\ &=-x-\frac {1}{5} \log (2-x)+\frac {\log (x)}{5}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 20, normalized size = 1.18 \begin {gather*} -x-\frac {1}{5} \log (2-x)+\frac {\log (x)}{5} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-2 + 10*x - 5*x^2)/(-10*x + 5*x^2),x]

[Out]

-x - Log[2 - x]/5 + Log[x]/5

________________________________________________________________________________________

fricas [A]  time = 0.69, size = 14, normalized size = 0.82 \begin {gather*} -x - \frac {1}{5} \, \log \left (x - 2\right ) + \frac {1}{5} \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-5*x^2+10*x-2)/(5*x^2-10*x),x, algorithm="fricas")

[Out]

-x - 1/5*log(x - 2) + 1/5*log(x)

________________________________________________________________________________________

giac [A]  time = 0.21, size = 16, normalized size = 0.94 \begin {gather*} -x - \frac {1}{5} \, \log \left ({\left | x - 2 \right |}\right ) + \frac {1}{5} \, \log \left ({\left | x \right |}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-5*x^2+10*x-2)/(5*x^2-10*x),x, algorithm="giac")

[Out]

-x - 1/5*log(abs(x - 2)) + 1/5*log(abs(x))

________________________________________________________________________________________

maple [A]  time = 0.46, size = 15, normalized size = 0.88




method result size



default \(-x +\frac {\ln \relax (x )}{5}-\frac {\ln \left (x -2\right )}{5}\) \(15\)
norman \(-x +\frac {\ln \relax (x )}{5}-\frac {\ln \left (x -2\right )}{5}\) \(15\)
risch \(-x +\frac {\ln \relax (x )}{5}-\frac {\ln \left (x -2\right )}{5}\) \(15\)
meijerg \(\frac {\ln \relax (x )}{5}-\frac {\ln \relax (2)}{5}+\frac {i \pi }{5}-\frac {\ln \left (1-\frac {x}{2}\right )}{5}-x\) \(25\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-5*x^2+10*x-2)/(5*x^2-10*x),x,method=_RETURNVERBOSE)

[Out]

-x+1/5*ln(x)-1/5*ln(x-2)

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 14, normalized size = 0.82 \begin {gather*} -x - \frac {1}{5} \, \log \left (x - 2\right ) + \frac {1}{5} \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-5*x^2+10*x-2)/(5*x^2-10*x),x, algorithm="maxima")

[Out]

-x - 1/5*log(x - 2) + 1/5*log(x)

________________________________________________________________________________________

mupad [B]  time = 1.73, size = 10, normalized size = 0.59 \begin {gather*} \frac {2\,\mathrm {atanh}\left (x-1\right )}{5}-x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((5*x^2 - 10*x + 2)/(10*x - 5*x^2),x)

[Out]

(2*atanh(x - 1))/5 - x

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 12, normalized size = 0.71 \begin {gather*} - x + \frac {\log {\relax (x )}}{5} - \frac {\log {\left (x - 2 \right )}}{5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-5*x**2+10*x-2)/(5*x**2-10*x),x)

[Out]

-x + log(x)/5 - log(x - 2)/5

________________________________________________________________________________________