3.47.85 \(\int \frac {4-5 x-2 x^2+2 x^3+e^5 (-2+3 x-x^2)+e^2 (-x+x^2)+(-x+x^2) \log (\frac {1}{x^2})}{-x+x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.32, antiderivative size = 44, normalized size of antiderivative = 1.57, number of steps used = 6, number of rules used = 4, integrand size = 62, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {1593, 6742, 1620, 2295} \begin {gather*} x^2+x \log \left (\frac {1}{x^2}\right )+e^2 \left (1-e^3\right ) x+2 x-\log (1-x)-2 \left (2-e^5\right ) \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(4 - 5*x - 2*x^2 + 2*x^3 + E^5*(-2 + 3*x - x^2) + E^2*(-x + x^2) + (-x + x^2)*Log[x^(-2)])/(-x + x^2),x]

[Out]

2*x + E^2*(1 - E^3)*x + x^2 - Log[1 - x] + x*Log[x^(-2)] - 2*(2 - E^5)*Log[x]

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]

Rule 1620

Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[Px*(a + b*x)
^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, m, n}, x] && PolyQ[Px, x] && (IntegersQ[m, n] || IGtQ[m, -2]) &&
GtQ[Expon[Px, x], 2]

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 43, normalized size = 1.54 \begin {gather*} 2 x+e^2 x-e^5 x+x^2-\log (1-x)+x \log \left (\frac {1}{x^2}\right )-4 \log (x)+2 e^5 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(4 - 5*x - 2*x^2 + 2*x^3 + E^5*(-2 + 3*x - x^2) + E^2*(-x + x^2) + (-x + x^2)*Log[x^(-2)])/(-x + x^2
),x]

[Out]

2*x + E^2*x - E^5*x + x^2 - Log[1 - x] + x*Log[x^(-2)] - 4*Log[x] + 2*E^5*Log[x]

________________________________________________________________________________________

fricas [A]  time = 0.54, size = 36, normalized size = 1.29 \begin {gather*} x^{2} - x e^{5} + x e^{2} + 2 \, {\left (e^{5} - 2\right )} \log \relax (x) + x \log \left (\frac {1}{x^{2}}\right ) + 2 \, x - \log \left (x - 1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2-x)*log(1/x^2)+(-x^2+3*x-2)*exp(5)+(x^2-x)*exp(2)+2*x^3-2*x^2-5*x+4)/(x^2-x),x, algorithm="fric
as")

[Out]

x^2 - x*e^5 + x*e^2 + 2*(e^5 - 2)*log(x) + x*log(x^(-2)) + 2*x - log(x - 1)

________________________________________________________________________________________

giac [A]  time = 0.13, size = 39, normalized size = 1.39 \begin {gather*} x^{2} - x e^{5} + x e^{2} - x \log \left (x^{2}\right ) + 2 \, e^{5} \log \relax (x) + 2 \, x - \log \left (x - 1\right ) - 4 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2 - x*e^5 + x*e^2 - x*log(x^2) + 2*e^5*log(x) + 2*x - log(x - 1) - 4*log(x)

________________________________________________________________________________________

maple [A]  time = 0.24, size = 38, normalized size = 1.36




method result size



norman \(x^{2}+x \ln \left (\frac {1}{x^{2}}\right )+\left (2-{\mathrm e}^{5}\right ) \ln \left (\frac {1}{x^{2}}\right )+\left (2-{\mathrm e}^{5}+{\mathrm e}^{2}\right ) x -\ln \left (x -1\right )\) \(38\)
risch \(x \ln \left (\frac {1}{x^{2}}\right )+2 \ln \left (-x \right ) {\mathrm e}^{5}-x \,{\mathrm e}^{5}+{\mathrm e}^{2} x +x^{2}-4 \ln \left (-x \right )-\ln \left (x -1\right )+2 x\) \(43\)
derivativedivides \(x \ln \left (\frac {1}{x^{2}}\right )+2 x -\ln \left (\frac {1}{x}-1\right )-x \,{\mathrm e}^{5}+{\mathrm e}^{2} x -2 \ln \left (\frac {1}{x}\right ) {\mathrm e}^{5}+5 \ln \left (\frac {1}{x}\right )+x^{2}\) \(45\)
default \(x \ln \left (\frac {1}{x^{2}}\right )+2 x -\ln \left (\frac {1}{x}-1\right )-x \,{\mathrm e}^{5}+{\mathrm e}^{2} x -2 \ln \left (\frac {1}{x}\right ) {\mathrm e}^{5}+5 \ln \left (\frac {1}{x}\right )+x^{2}\) \(45\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.43, size = 72, normalized size = 2.57 \begin {gather*} x^{2} - x {\left (e^{5} - e^{2} - 2\right )} - 2 \, {\left (\log \left (x - 1\right ) - \log \relax (x)\right )} e^{5} - {\left (e^{5} - e^{2}\right )} \log \left (x - 1\right ) + 3 \, e^{5} \log \left (x - 1\right ) - e^{2} \log \left (x - 1\right ) - 2 \, x \log \relax (x) - \log \left (x - 1\right ) - 4 \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2-x)*log(1/x^2)+(-x^2+3*x-2)*exp(5)+(x^2-x)*exp(2)+2*x^3-2*x^2-5*x+4)/(x^2-x),x, algorithm="maxi
ma")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.18, size = 48, normalized size = 1.71 \begin {gather*} \frac {x^3\,\ln \left (\frac {1}{x^2}\right )+x^3\,\left ({\mathrm {e}}^2-{\mathrm {e}}^5+2\right )+x^4-x^2\,\ln \left (\frac {1}{x^2}\right )\,\left ({\mathrm {e}}^5-2\right )}{x^2}-\ln \left (x-1\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((5*x + log(1/x^2)*(x - x^2) + exp(2)*(x - x^2) + exp(5)*(x^2 - 3*x + 2) + 2*x^2 - 2*x^3 - 4)/(x - x^2),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.47, size = 48, normalized size = 1.71 \begin {gather*} x^{2} + x \log {\left (\frac {1}{x^{2}} \right )} + x \left (- e^{5} + 2 + e^{2}\right ) + \left (-4 + 2 e^{5}\right ) \log {\relax (x )} - \log {\left (x + \frac {3 - 2 e^{5}}{-3 + 2 e^{5}} \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x**2-x)*ln(1/x**2)+(-x**2+3*x-2)*exp(5)+(x**2-x)*exp(2)+2*x**3-2*x**2-5*x+4)/(x**2-x),x)

[Out]

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

________________________________________________________________________________________