3.97.85 \(\int \frac {e^{-\frac {2}{\log (4-x)}} (40 x^2+40 x^3+10 x^4+e^{\frac {8}{2+x}+\frac {2}{\log (4-x)}} (-32+8 x) \log ^2(4-x)+(-160 x-120 x^2+10 x^4) \log ^2(4-x))}{(-16-12 x+x^3) \log ^2(4-x)} \, dx\) [9685]

Optimal. Leaf size=29 \[ -e^{\frac {8}{2+x}}+5 e^{-\frac {2}{\log (4-x)}} x^2 \]

[Out]

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

________________________________________________________________________________________

Rubi [F]
time = 3.30, 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 {e^{-\frac {2}{\log (4-x)}} \left (40 x^2+40 x^3+10 x^4+e^{\frac {8}{2+x}+\frac {2}{\log (4-x)}} (-32+8 x) \log ^2(4-x)+\left (-160 x-120 x^2+10 x^4\right ) \log ^2(4-x)\right )}{\left (-16-12 x+x^3\right ) \log ^2(4-x)} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

Int[(40*x^2 + 40*x^3 + 10*x^4 + E^(8/(2 + x) + 2/Log[4 - x])*(-32 + 8*x)*Log[4 - x]^2 + (-160*x - 120*x^2 + 10
*x^4)*Log[4 - x]^2)/(E^(2/Log[4 - x])*(-16 - 12*x + x^3)*Log[4 - x]^2),x]

[Out]

-E^(8/(2 + x)) + 80/E^(2/Log[4 - x]) + 10*Defer[Int][x/E^(2/Log[4 - x]), x] - 80*Defer[Subst][Defer[Int][1/(E^
(2/Log[x])*Log[x]^2), x], x, 4 - x] + 10*Defer[Subst][Defer[Int][x/(E^(2/Log[x])*Log[x]^2), x], x, 4 - x]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int 2 e^{-\frac {2}{\log (4-x)}} \left (\frac {4 e^{\frac {8}{2+x}+\frac {2}{\log (4-x)}}+5 x (2+x)^2}{(2+x)^2}+\frac {5 x^2}{(-4+x) \log ^2(4-x)}\right ) \, dx\\ &=2 \int e^{-\frac {2}{\log (4-x)}} \left (\frac {4 e^{\frac {8}{2+x}+\frac {2}{\log (4-x)}}+5 x (2+x)^2}{(2+x)^2}+\frac {5 x^2}{(-4+x) \log ^2(4-x)}\right ) \, dx\\ &=2 \int \left (\frac {e^{-\frac {2}{\log (4-x)}} \left (4 e^{\frac {8}{2+x}+\frac {2}{\log (4-x)}}+20 x+20 x^2+5 x^3\right )}{(2+x)^2}+\frac {5 e^{-\frac {2}{\log (4-x)}} x^2}{(-4+x) \log ^2(4-x)}\right ) \, dx\\ &=2 \int \frac {e^{-\frac {2}{\log (4-x)}} \left (4 e^{\frac {8}{2+x}+\frac {2}{\log (4-x)}}+20 x+20 x^2+5 x^3\right )}{(2+x)^2} \, dx+10 \int \frac {e^{-\frac {2}{\log (4-x)}} x^2}{(-4+x) \log ^2(4-x)} \, dx\\ &=2 \int \left (5 e^{-\frac {2}{\log (4-x)}} x+\frac {4 e^{\frac {8}{2+x}}}{(2+x)^2}\right ) \, dx+10 \int \left (\frac {4 e^{-\frac {2}{\log (4-x)}}}{\log ^2(4-x)}+\frac {16 e^{-\frac {2}{\log (4-x)}}}{(-4+x) \log ^2(4-x)}+\frac {e^{-\frac {2}{\log (4-x)}} x}{\log ^2(4-x)}\right ) \, dx\\ &=8 \int \frac {e^{\frac {8}{2+x}}}{(2+x)^2} \, dx+10 \int e^{-\frac {2}{\log (4-x)}} x \, dx+10 \int \frac {e^{-\frac {2}{\log (4-x)}} x}{\log ^2(4-x)} \, dx+40 \int \frac {e^{-\frac {2}{\log (4-x)}}}{\log ^2(4-x)} \, dx+160 \int \frac {e^{-\frac {2}{\log (4-x)}}}{(-4+x) \log ^2(4-x)} \, dx\\ &=-e^{\frac {8}{2+x}}+80 e^{-\frac {2}{\log (4-x)}}+10 \int e^{-\frac {2}{\log (4-x)}} x \, dx+10 \int \left (\frac {4 e^{-\frac {2}{\log (4-x)}}}{\log ^2(4-x)}-\frac {e^{-\frac {2}{\log (4-x)}} (4-x)}{\log ^2(4-x)}\right ) \, dx-40 \text {Subst}\left (\int \frac {e^{-\frac {2}{\log (x)}}}{\log ^2(x)} \, dx,x,4-x\right )\\ &=-e^{\frac {8}{2+x}}+80 e^{-\frac {2}{\log (4-x)}}+10 \int e^{-\frac {2}{\log (4-x)}} x \, dx-10 \int \frac {e^{-\frac {2}{\log (4-x)}} (4-x)}{\log ^2(4-x)} \, dx+40 \int \frac {e^{-\frac {2}{\log (4-x)}}}{\log ^2(4-x)} \, dx-40 \text {Subst}\left (\int \frac {e^{-\frac {2}{\log (x)}}}{\log ^2(x)} \, dx,x,4-x\right )\\ &=-e^{\frac {8}{2+x}}+80 e^{-\frac {2}{\log (4-x)}}+10 \int e^{-\frac {2}{\log (4-x)}} x \, dx+10 \text {Subst}\left (\int \frac {e^{-\frac {2}{\log (x)}} x}{\log ^2(x)} \, dx,x,4-x\right )-2 \left (40 \text {Subst}\left (\int \frac {e^{-\frac {2}{\log (x)}}}{\log ^2(x)} \, dx,x,4-x\right )\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

Integrate[(40*x^2 + 40*x^3 + 10*x^4 + E^(8/(2 + x) + 2/Log[4 - x])*(-32 + 8*x)*Log[4 - x]^2 + (-160*x - 120*x^
2 + 10*x^4)*Log[4 - x]^2)/(E^(2/Log[4 - x])*(-16 - 12*x + x^3)*Log[4 - x]^2),x]

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.06, size = 32, normalized size = 1.10

method result size
risch \(5 x^{2} {\mathrm e}^{-\frac {2}{\ln \left (-x +4\right )}}-{\mathrm e}^{\frac {8}{2+x}}\) \(28\)
default \(5 x^{2} {\mathrm e}^{-\frac {2}{\ln \left (-x +4\right )}}-{\mathrm e}^{\frac {8}{2+x}}\) \(32\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((8*x-32)*exp(4/(2+x))^2*ln(-x+4)^2*exp(2/ln(-x+4))+(10*x^4-120*x^2-160*x)*ln(-x+4)^2+10*x^4+40*x^3+40*x^2
)/(x^3-12*x-16)/ln(-x+4)^2/exp(2/ln(-x+4)),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((8*x-32)*exp(4/(2+x))^2*log(-x+4)^2*exp(2/log(-x+4))+(10*x^4-120*x^2-160*x)*log(-x+4)^2+10*x^4+40*x
^3+40*x^2)/(x^3-12*x-16)/log(-x+4)^2/exp(2/log(-x+4)),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 57 vs. \(2 (27) = 54\).
time = 0.38, size = 57, normalized size = 1.97 \begin {gather*} 5 \, x^{2} e^{\left (-\frac {2}{\log \left (-x + 4\right )}\right )} - e^{\left (\frac {2 \, {\left (x + 4 \, \log \left (-x + 4\right ) + 2\right )}}{{\left (x + 2\right )} \log \left (-x + 4\right )} - \frac {2}{\log \left (-x + 4\right )}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((8*x-32)*exp(4/(2+x))^2*log(-x+4)^2*exp(2/log(-x+4))+(10*x^4-120*x^2-160*x)*log(-x+4)^2+10*x^4+40*x
^3+40*x^2)/(x^3-12*x-16)/log(-x+4)^2/exp(2/log(-x+4)),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 1.15, size = 19, normalized size = 0.66 \begin {gather*} 5 x^{2} e^{- \frac {2}{\log {\left (4 - x \right )}}} - e^{\frac {8}{x + 2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((8*x-32)*exp(4/(2+x))**2*ln(-x+4)**2*exp(2/ln(-x+4))+(10*x**4-120*x**2-160*x)*ln(-x+4)**2+10*x**4+4
0*x**3+40*x**2)/(x**3-12*x-16)/ln(-x+4)**2/exp(2/ln(-x+4)),x)

[Out]

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

________________________________________________________________________________________

Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((8*x-32)*exp(4/(2+x))^2*log(-x+4)^2*exp(2/log(-x+4))+(10*x^4-120*x^2-160*x)*log(-x+4)^2+10*x^4+40*x
^3+40*x^2)/(x^3-12*x-16)/log(-x+4)^2/exp(2/log(-x+4)),x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:Unable to divide, perhaps due to rounding error%%%{8,[0,19]%%%}+%%%{64,[0,18]%%%}+%%%{-288,[0,17]%%%}+%%%{-
4224,[0,16]

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.03 \begin {gather*} \int -\frac {{\mathrm {e}}^{-\frac {2}{\ln \left (4-x\right )}}\,\left (40\,x^2-{\ln \left (4-x\right )}^2\,\left (-10\,x^4+120\,x^2+160\,x\right )+40\,x^3+10\,x^4+{\mathrm {e}}^{\frac {2}{\ln \left (4-x\right )}}\,{\mathrm {e}}^{\frac {8}{x+2}}\,{\ln \left (4-x\right )}^2\,\left (8\,x-32\right )\right )}{{\ln \left (4-x\right )}^2\,\left (-x^3+12\,x+16\right )} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(exp(-2/log(4 - x))*(40*x^2 - log(4 - x)^2*(160*x + 120*x^2 - 10*x^4) + 40*x^3 + 10*x^4 + exp(2/log(4 - x
))*exp(8/(x + 2))*log(4 - x)^2*(8*x - 32)))/(log(4 - x)^2*(12*x - x^3 + 16)),x)

[Out]

int(-(exp(-2/log(4 - x))*(40*x^2 - log(4 - x)^2*(160*x + 120*x^2 - 10*x^4) + 40*x^3 + 10*x^4 + exp(2/log(4 - x
))*exp(8/(x + 2))*log(4 - x)^2*(8*x - 32)))/(log(4 - x)^2*(12*x - x^3 + 16)), x)

________________________________________________________________________________________