3.93.95 \(\int \frac {-6+x+x^2+e (3+x)+x \log (\frac {e^{-x}}{x^3})}{4 x+e^2 x-4 x^2+x^3+e (-4 x+2 x^2)} \, dx\) [9295]

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

[Out]

ln(exp(-x)/x^3)/(2-x-exp(1))

________________________________________________________________________________________

Rubi [A]
time = 0.30, antiderivative size = 21, normalized size of antiderivative = 1.00, number of steps used = 9, number of rules used = 5, integrand size = 54, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.093, Rules used = {6, 6820, 6874, 78, 2631} \begin {gather*} \frac {\log \left (\frac {e^{-x}}{x^3}\right )}{-x-e+2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, x]

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 2631

Int[Log[u_]*((a_.) + (b_.)*(x_))^(m_.), x_Symbol] :> Simp[(a + b*x)^(m + 1)*(Log[u]/(b*(m + 1))), x] - Dist[1/
(b*(m + 1)), Int[SimplifyIntegrand[(a + b*x)^(m + 1)*(D[u, x]/u), x], x], x] /; FreeQ[{a, b, m}, x] && Inverse
FunctionFreeQ[u, x] && NeQ[m, -1]

Rule 6820

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

Rule 6874

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.07, size = 22, normalized size = 1.05 \begin {gather*} -\frac {-2+e+x+\log \left (\frac {e^{-x}}{x^3}\right )}{-2+e+x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 4 vs. order 3.
time = 1.96, size = 285, normalized size = 13.57

method result size
norman \(-\frac {\ln \left (\frac {{\mathrm e}^{-x}}{x^{3}}\right )}{{\mathrm e}-2+x}\) \(19\)
risch \(-\frac {\ln \left ({\mathrm e}^{-x}\right )}{{\mathrm e}-2+x}+\frac {-i \pi \mathrm {csgn}\left (i x^{3}\right )^{3}+i \pi \mathrm {csgn}\left (i x^{3}\right )^{2} \mathrm {csgn}\left (i x \right )+i \pi \mathrm {csgn}\left (i x^{3}\right )^{2} \mathrm {csgn}\left (i x^{2}\right )-i \pi \,\mathrm {csgn}\left (i x^{3}\right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )-i \pi \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )+2 i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}-i \pi \mathrm {csgn}\left (i x^{2}\right )^{3}+i \pi \,\mathrm {csgn}\left (\frac {i}{x^{3}}\right ) \mathrm {csgn}\left (i {\mathrm e}^{-x}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{-x}}{x^{3}}\right )-i \pi \,\mathrm {csgn}\left (\frac {i}{x^{3}}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{-x}}{x^{3}}\right )^{2}-i \pi \,\mathrm {csgn}\left (i {\mathrm e}^{-x}\right ) \mathrm {csgn}\left (\frac {i {\mathrm e}^{-x}}{x^{3}}\right )^{2}+i \pi \mathrm {csgn}\left (\frac {i {\mathrm e}^{-x}}{x^{3}}\right )^{3}+6 \ln \left (x \right )}{2 \,{\mathrm e}-4+2 x}\) \(249\)
default \(-\frac {{\mathrm e}}{{\mathrm e}-2+x}+\frac {2}{{\mathrm e}-2+x}-\frac {\ln \left (\frac {{\mathrm e}^{-x}}{x^{3}}\right )+x +3 \ln \left (x \right )}{{\mathrm e}-2+x}-\ln \left ({\mathrm e}-2+x \right )-\frac {3 \ln \left (x \right ) \left (\ln \left (\frac {{\mathrm e}-2-\sqrt {\left ({\mathrm e}\right )^{2}-{\mathrm e}^{2}}+x}{{\mathrm e}-2-\sqrt {\left ({\mathrm e}\right )^{2}-{\mathrm e}^{2}}}\right )-\ln \left (\frac {{\mathrm e}-2+\sqrt {\left ({\mathrm e}\right )^{2}-{\mathrm e}^{2}}+x}{{\mathrm e}-2+\sqrt {\left ({\mathrm e}\right )^{2}-{\mathrm e}^{2}}}\right )\right )}{2 \sqrt {\left ({\mathrm e}\right )^{2}-{\mathrm e}^{2}}}-\frac {3 \dilog \left (\frac {{\mathrm e}-2-\sqrt {\left ({\mathrm e}\right )^{2}-{\mathrm e}^{2}}+x}{{\mathrm e}-2-\sqrt {\left ({\mathrm e}\right )^{2}-{\mathrm e}^{2}}}\right )}{2 \sqrt {\left ({\mathrm e}\right )^{2}-{\mathrm e}^{2}}}+\frac {3 \dilog \left (\frac {{\mathrm e}-2+\sqrt {\left ({\mathrm e}\right )^{2}-{\mathrm e}^{2}}+x}{{\mathrm e}-2+\sqrt {\left ({\mathrm e}\right )^{2}-{\mathrm e}^{2}}}\right )}{2 \sqrt {\left ({\mathrm e}\right )^{2}-{\mathrm e}^{2}}}-\frac {5 \ln \left ({\mathrm e}-2+x \right )}{{\mathrm e}-2}+\frac {\ln \left ({\mathrm e}-2+x \right ) {\mathrm e}}{{\mathrm e}-2}+\frac {3 \ln \left (x \right )}{{\mathrm e}-2}\) \(285\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x*ln(exp(-x)/x^3)+(3+x)*exp(1)+x^2+x-6)/(x*exp(1)^2+(2*x^2-4*x)*exp(1)+x^3-4*x^2+4*x),x,method=_RETURNVER
BOSE)

[Out]

-1/(exp(1)-2+x)*exp(1)+2/(exp(1)-2+x)-1/(exp(1)-2+x)*(ln(exp(-x)/x^3)+x+3*ln(x))-ln(exp(1)-2+x)-3/2*ln(x)*(ln(
(exp(1)-2-(exp(1)^2-exp(2))^(1/2)+x)/(exp(1)-2-(exp(1)^2-exp(2))^(1/2)))-ln((exp(1)-2+(exp(1)^2-exp(2))^(1/2)+
x)/(exp(1)-2+(exp(1)^2-exp(2))^(1/2))))/(exp(1)^2-exp(2))^(1/2)-3/2/(exp(1)^2-exp(2))^(1/2)*dilog((exp(1)-2-(e
xp(1)^2-exp(2))^(1/2)+x)/(exp(1)-2-(exp(1)^2-exp(2))^(1/2)))+3/2/(exp(1)^2-exp(2))^(1/2)*dilog((exp(1)-2+(exp(
1)^2-exp(2))^(1/2)+x)/(exp(1)-2+(exp(1)^2-exp(2))^(1/2)))-5/(exp(1)-2)*ln(exp(1)-2+x)+1/(exp(1)-2)*ln(exp(1)-2
+x)*exp(1)+3/(exp(1)-2)*ln(x)

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 189 vs. \(2 (18) = 36\).
time = 0.28, size = 189, normalized size = 9.00 \begin {gather*} -3 \, {\left (\frac {\log \left (x + e - 2\right )}{e^{2} - 4 \, e + 4} - \frac {\log \left (x\right )}{e^{2} - 4 \, e + 4} - \frac {1}{x {\left (e - 2\right )} + e^{2} - 4 \, e + 4}\right )} e - \frac {{\left (e - 5\right )} \log \left (x + e - 2\right )}{e - 2} + \frac {e - 2}{x + e - 2} - \frac {e}{x + e - 2} + \frac {6 \, \log \left (x + e - 2\right )}{e^{2} - 4 \, e + 4} - \frac {6 \, \log \left (x\right )}{e^{2} - 4 \, e + 4} - \frac {3 \, \log \left (x\right )}{e - 2} - \frac {\log \left (\frac {e^{\left (-x\right )}}{x^{3}}\right )}{x + e - 2} - \frac {6}{x {\left (e - 2\right )} + e^{2} - 4 \, e + 4} - \frac {1}{x + e - 2} + \log \left (x + e - 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 18, normalized size = 0.86 \begin {gather*} -\frac {\log \left (\frac {e^{\left (-x\right )}}{x^{3}}\right )}{x + e - 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.12, size = 17, normalized size = 0.81 \begin {gather*} - \frac {\log {\left (\frac {e^{- x}}{x^{3}} \right )}}{x - 2 + e} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-log(exp(-x)/x**3)/(x - 2 + E)

________________________________________________________________________________________

Giac [A]
time = 0.41, size = 17, normalized size = 0.81 \begin {gather*} -\frac {e - 3 \, \log \left (x\right ) - 2}{x + e - 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 6.32, size = 16, normalized size = 0.76 \begin {gather*} \frac {x-\ln \left (\frac {1}{x^3}\right )}{x+\mathrm {e}-2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________