Integrand size = 93, antiderivative size = 27 \[ \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=-e^{-5+x}-\frac {x}{-2+x}+x \left (e^x+x\right ) \log ^2(x) \] Output:
x*ln(x)^2*(exp(x)+x)-x/(-2+x)-exp(-5+x)
Time = 0.11 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.96 \[ \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=-e^{-5+x}-\frac {2}{-2+x}+x \left (e^x+x\right ) \log ^2(x) \] Input:
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))*Lo g[x]^2)/(4 - 4*x + x^2),x]
Output:
-E^(-5 + x) - 2/(-2 + x) + x*(E^x + x)*Log[x]^2
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {e^{x-5} \left (-x^2+4 x-4\right )+\left (2 x^3-8 x^2+e^x \left (x^3-3 x^2+4\right )+8 x\right ) \log ^2(x)+\left (2 x^3-8 x^2+e^x \left (2 x^2-8 x+8\right )+8 x\right ) \log (x)+2}{x^2-4 x+4} \, dx\) |
\(\Big \downarrow \) 7239 |
\(\displaystyle \int \left (-e^{x-5}+\frac {2}{(x-2)^2}+\left (2 x+e^x (x+1)\right ) \log ^2(x)+2 \left (x+e^x\right ) \log (x)\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \int e^x \log ^2(x)dx+\int e^x x \log ^2(x)dx-2 \operatorname {ExpIntegralEi}(x)+x^2 \log ^2(x)-e^{x-5}+\frac {2}{2-x}+2 e^x \log (x)\) |
Input:
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]
Output:
$Aborted
Time = 0.03 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.15
\[{\mathrm e}^{x} \ln \left (x \right )^{2} x -\frac {2}{-2+x}+x^{2} \ln \left (x \right )^{2}-{\mathrm e}^{-5+x}\]
Input:
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(-5+x)+2)/(x^2-4*x+4),x)
Output:
exp(x)*ln(x)^2*x-2/(-2+x)+x^2*ln(x)^2-exp(-5+x)
Time = 0.07 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.85 \[ \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=\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 \left (x\right )^{2} - {\left (x - 2\right )} e^{x} - 2 \, e^{5}\right )} e^{\left (-5\right )}}{x - 2} \] Input:
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(-5+x)+2)/(x^2-4*x+4),x, al gorithm="fricas")
Output:
(((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)
Time = 0.26 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.15 \[ \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=x^{2} \log {\left (x \right )}^{2} + \frac {\left (x e^{5} \log {\left (x \right )}^{2} - 1\right ) e^{x}}{e^{5}} - \frac {2}{x - 2} \] Input:
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(-5+x)+2)/(x**2-4*x+ 4),x)
Output:
x**2*log(x)**2 + (x*exp(5)*log(x)**2 - 1)*exp(-5)*exp(x) - 2/(x - 2)
\[ \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=\int { \frac {{\left (2 \, x^{3} - 8 \, x^{2} + {\left (x^{3} - 3 \, x^{2} + 4\right )} e^{x} + 8 \, x\right )} \log \left (x\right )^{2} - {\left (x^{2} - 4 \, x + 4\right )} e^{\left (x - 5\right )} + 2 \, {\left (x^{3} - 4 \, x^{2} + {\left (x^{2} - 4 \, x + 4\right )} e^{x} + 4 \, x\right )} \log \left (x\right ) + 2}{x^{2} - 4 \, x + 4} \,d x } \] Input:
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(-5+x)+2)/(x^2-4*x+4),x, al gorithm="maxima")
Output:
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)
Leaf count of result is larger than twice the leaf count of optimal. 70 vs. \(2 (25) = 50\).
Time = 0.12 (sec) , antiderivative size = 70, normalized size of antiderivative = 2.59 \[ \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=\frac {x^{3} e^{5} \log \left (x\right )^{2} - 2 \, x^{2} e^{5} \log \left (x\right )^{2} + x^{2} e^{\left (x + 5\right )} \log \left (x\right )^{2} - 2 \, x e^{\left (x + 5\right )} \log \left (x\right )^{2} - x e^{x} - 2 \, e^{5} + 2 \, e^{x}}{x e^{5} - 2 \, e^{5}} \] Input:
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(-5+x)+2)/(x^2-4*x+4),x, al gorithm="giac")
Output:
(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)
Time = 2.15 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00 \[ \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={\ln \left (x\right )}^2\,\left (x\,{\mathrm {e}}^x+x^2\right )-\frac {2}{x-2}-{\mathrm {e}}^{x-5} \] Input:
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 + exp(x)*(x^3 - 3*x^2 + 4) - 8*x^2 + 2*x^3 ) + 2)/(x^2 - 4*x + 4),x)
Output:
log(x)^2*(x*exp(x) + x^2) - 2/(x - 2) - exp(x - 5)
Time = 0.20 (sec) , antiderivative size = 77, normalized size of antiderivative = 2.85 \[ \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=\frac {e^{x} \mathrm {log}\left (x \right )^{2} e^{5} x^{2}-2 e^{x} \mathrm {log}\left (x \right )^{2} e^{5} x -e^{x} x +2 e^{x}+\mathrm {log}\left (x \right )^{2} e^{5} x^{3}-2 \mathrm {log}\left (x \right )^{2} e^{5} x^{2}-e^{5} x}{e^{5} \left (x -2\right )} \] Input:
int((((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(-5+x)+2)/(x^2-4*x+4),x)
Output:
(e**x*log(x)**2*e**5*x**2 - 2*e**x*log(x)**2*e**5*x - e**x*x + 2*e**x + lo g(x)**2*e**5*x**3 - 2*log(x)**2*e**5*x**2 - e**5*x)/(e**5*(x - 2))