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

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

________________________________________________________________________________________

Rubi [F]  time = 0.42, antiderivative size = 0, normalized size of antiderivative = 0.00, number of steps used = 0, number of rules used = 0, integrand size = 0, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.000, Rules used = {} \begin {gather*} \int \frac {2+e^{-5+x} \left (-4+4 x-x^2\right )+\left (8 x-8 x^2+2 x^3+e^x \left (8-8 x+2 x^2\right )\right ) \log (x)+\left (8 x-8 x^2+2 x^3+e^x \left (4-3 x^2+x^3\right )\right ) \log ^2(x)}{4-4 x+x^2} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

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

[Out]

-E^(-5 + x) + 2/(2 - x) - 2*ExpIntegralEi[x] + 2*E^x*Log[x] + x^2*Log[x]^2 + Defer[Int][E^x*Log[x]^2, x] + Def
er[Int][E^x*x*Log[x]^2, x]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.12, size = 26, normalized size = 0.96 \begin {gather*} -e^{-5+x}-\frac {2}{-2+x}+x \left (e^x+x\right ) \log ^2(x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.53, size = 50, normalized size = 1.85 \begin {gather*} \frac {{\left ({\left ({\left (x^{3} - 2 \, x^{2}\right )} e^{5} + {\left (x^{2} - 2 \, x\right )} e^{\left (x + 5\right )}\right )} \log \relax (x)^{2} - {\left (x - 2\right )} e^{x} - 2 \, e^{5}\right )} e^{\left (-5\right )}}{x - 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.34, size = 70, normalized size = 2.59 \begin {gather*} \frac {x^{3} e^{5} \log \relax (x)^{2} - 2 \, x^{2} e^{5} \log \relax (x)^{2} + x^{2} e^{\left (x + 5\right )} \log \relax (x)^{2} - 2 \, x e^{\left (x + 5\right )} \log \relax (x)^{2} - x e^{x} - 2 \, e^{5} + 2 \, e^{x}}{x e^{5} - 2 \, e^{5}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.44, size = 31, normalized size = 1.15




method result size



default \(x \,{\mathrm e}^{x} \ln \relax (x )^{2}-\frac {2}{x -2}+x^{2} \ln \relax (x )^{2}-{\mathrm e}^{x -5}\) \(31\)
risch \(\left ({\mathrm e}^{x} x +x^{2}\right ) \ln \relax (x )^{2}-\frac {x \,{\mathrm e}^{x -5}-2 \,{\mathrm e}^{x -5}+2}{x -2}\) \(36\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} x^{2} \log \relax (x)^{2} + x e^{x} \log \relax (x)^{2} + \frac {4 \, e^{\left (-3\right )} E_{2}\left (-x + 2\right )}{x - 2} - \frac {2}{x - 2} - \int \frac {{\left (x^{2} - 4 \, x\right )} e^{x}}{x^{2} e^{5} - 4 \, x e^{5} + 4 \, e^{5}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2*log(x)^2 + x*e^x*log(x)^2 + 4*e^(-3)*exp_integral_e(2, -x + 2)/(x - 2) - 2/(x - 2) - integrate((x^2 - 4*x)
*e^x/(x^2*e^5 - 4*x*e^5 + 4*e^5), x)

________________________________________________________________________________________

mupad [B]  time = 1.65, size = 27, normalized size = 1.00 \begin {gather*} {\ln \relax (x)}^2\,\left (x\,{\mathrm {e}}^x+x^2\right )-\frac {2}{x-2}-{\mathrm {e}}^{x-5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.51, size = 31, normalized size = 1.15 \begin {gather*} x^{2} \log {\relax (x )}^{2} + \frac {\left (x e^{5} \log {\relax (x )}^{2} - 1\right ) e^{x}}{e^{5}} - \frac {2}{x - 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________