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

   Optimal result
   Rubi [F]
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 74, antiderivative size = 20 \[ \int \frac {6 x-2 e^x x+\left (e (1-x)+e^x (1-x)-3 x+3 x^2\right ) \log \left (e+e^x-3 x\right )}{\left (e^{2 x}+e^x (e-3 x)\right ) \log ^3\left (e+e^x-3 x\right )} \, dx=1+\frac {e^{-x} x}{\log ^2\left (e+e^x-3 x\right )} \]

[Out]

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

Rubi [F]

\[ \int \frac {6 x-2 e^x x+\left (e (1-x)+e^x (1-x)-3 x+3 x^2\right ) \log \left (e+e^x-3 x\right )}{\left (e^{2 x}+e^x (e-3 x)\right ) \log ^3\left (e+e^x-3 x\right )} \, dx=\int \frac {6 x-2 e^x x+\left (e (1-x)+e^x (1-x)-3 x+3 x^2\right ) \log \left (e+e^x-3 x\right )}{\left (e^{2 x}+e^x (e-3 x)\right ) \log ^3\left (e+e^x-3 x\right )} \, dx \]

[In]

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

[Out]

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {e^{-x} \left (-\frac {2 \left (-3+e^x\right ) x}{e+e^x-3 x}-(-1+x) \log \left (e+e^x-3 x\right )\right )}{\log ^3\left (e+e^x-3 x\right )} \, dx \\ & = \int \left (\frac {2 e^{-x} (3+e-3 x) x}{\left (e+e^x-3 x\right ) \log ^3\left (e+e^x-3 x\right )}+\frac {e^{-x} \left (-2 x+\log \left (e+e^x-3 x\right )-x \log \left (e+e^x-3 x\right )\right )}{\log ^3\left (e+e^x-3 x\right )}\right ) \, dx \\ & = 2 \int \frac {e^{-x} (3+e-3 x) x}{\left (e+e^x-3 x\right ) \log ^3\left (e+e^x-3 x\right )} \, dx+\int \frac {e^{-x} \left (-2 x+\log \left (e+e^x-3 x\right )-x \log \left (e+e^x-3 x\right )\right )}{\log ^3\left (e+e^x-3 x\right )} \, dx \\ & = 2 \int \left (\frac {e^{-x} (3+e) x}{\left (e+e^x-3 x\right ) \log ^3\left (e+e^x-3 x\right )}-\frac {3 e^{-x} x^2}{\left (e+e^x-3 x\right ) \log ^3\left (e+e^x-3 x\right )}\right ) \, dx+\int \frac {e^{-x} \left (-2 x-(-1+x) \log \left (e+e^x-3 x\right )\right )}{\log ^3\left (e+e^x-3 x\right )} \, dx \\ & = -\left (6 \int \frac {e^{-x} x^2}{\left (e+e^x-3 x\right ) \log ^3\left (e+e^x-3 x\right )} \, dx\right )+(2 (3+e)) \int \frac {e^{-x} x}{\left (e+e^x-3 x\right ) \log ^3\left (e+e^x-3 x\right )} \, dx+\int \left (-\frac {2 e^{-x} x}{\log ^3\left (e+e^x-3 x\right )}+\frac {e^{-x} (1-x)}{\log ^2\left (e+e^x-3 x\right )}\right ) \, dx \\ & = -\left (2 \int \frac {e^{-x} x}{\log ^3\left (e+e^x-3 x\right )} \, dx\right )-6 \int \frac {e^{-x} x^2}{\left (e+e^x-3 x\right ) \log ^3\left (e+e^x-3 x\right )} \, dx+(2 (3+e)) \int \frac {e^{-x} x}{\left (e+e^x-3 x\right ) \log ^3\left (e+e^x-3 x\right )} \, dx+\int \frac {e^{-x} (1-x)}{\log ^2\left (e+e^x-3 x\right )} \, dx \\ & = -\left (2 \int \frac {e^{-x} x}{\log ^3\left (e+e^x-3 x\right )} \, dx\right )-6 \int \frac {e^{-x} x^2}{\left (e+e^x-3 x\right ) \log ^3\left (e+e^x-3 x\right )} \, dx+(2 (3+e)) \int \frac {e^{-x} x}{\left (e+e^x-3 x\right ) \log ^3\left (e+e^x-3 x\right )} \, dx+\int \left (\frac {e^{-x}}{\log ^2\left (e+e^x-3 x\right )}-\frac {e^{-x} x}{\log ^2\left (e+e^x-3 x\right )}\right ) \, dx \\ & = -\left (2 \int \frac {e^{-x} x}{\log ^3\left (e+e^x-3 x\right )} \, dx\right )-6 \int \frac {e^{-x} x^2}{\left (e+e^x-3 x\right ) \log ^3\left (e+e^x-3 x\right )} \, dx+(2 (3+e)) \int \frac {e^{-x} x}{\left (e+e^x-3 x\right ) \log ^3\left (e+e^x-3 x\right )} \, dx+\int \frac {e^{-x}}{\log ^2\left (e+e^x-3 x\right )} \, dx-\int \frac {e^{-x} x}{\log ^2\left (e+e^x-3 x\right )} \, dx \\ \end{align*}

Mathematica [A] (verified)

Time = 2.30 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.90 \[ \int \frac {6 x-2 e^x x+\left (e (1-x)+e^x (1-x)-3 x+3 x^2\right ) \log \left (e+e^x-3 x\right )}{\left (e^{2 x}+e^x (e-3 x)\right ) \log ^3\left (e+e^x-3 x\right )} \, dx=\frac {e^{-x} x}{\log ^2\left (e+e^x-3 x\right )} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.30 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.90

method result size
risch \(\frac {x \,{\mathrm e}^{-x}}{\ln \left ({\mathrm e}^{x}+{\mathrm e}-3 x \right )^{2}}\) \(18\)
parallelrisch \(\frac {x \,{\mathrm e}^{-x}}{\ln \left ({\mathrm e}^{x}+{\mathrm e}-3 x \right )^{2}}\) \(18\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.85 \[ \int \frac {6 x-2 e^x x+\left (e (1-x)+e^x (1-x)-3 x+3 x^2\right ) \log \left (e+e^x-3 x\right )}{\left (e^{2 x}+e^x (e-3 x)\right ) \log ^3\left (e+e^x-3 x\right )} \, dx=\frac {x e^{\left (-x\right )}}{\log \left (-3 \, x + e + e^{x}\right )^{2}} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.85 \[ \int \frac {6 x-2 e^x x+\left (e (1-x)+e^x (1-x)-3 x+3 x^2\right ) \log \left (e+e^x-3 x\right )}{\left (e^{2 x}+e^x (e-3 x)\right ) \log ^3\left (e+e^x-3 x\right )} \, dx=\frac {x e^{- x}}{\log {\left (- 3 x + e^{x} + e \right )}^{2}} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.85 \[ \int \frac {6 x-2 e^x x+\left (e (1-x)+e^x (1-x)-3 x+3 x^2\right ) \log \left (e+e^x-3 x\right )}{\left (e^{2 x}+e^x (e-3 x)\right ) \log ^3\left (e+e^x-3 x\right )} \, dx=\frac {x e^{\left (-x\right )}}{\log \left (-3 \, x + e + e^{x}\right )^{2}} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.85 \[ \int \frac {6 x-2 e^x x+\left (e (1-x)+e^x (1-x)-3 x+3 x^2\right ) \log \left (e+e^x-3 x\right )}{\left (e^{2 x}+e^x (e-3 x)\right ) \log ^3\left (e+e^x-3 x\right )} \, dx=\frac {x e^{\left (-x\right )}}{\log \left (-3 \, x + e + e^{x}\right )^{2}} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 9.12 (sec) , antiderivative size = 377, normalized size of antiderivative = 18.85 \[ \int \frac {6 x-2 e^x x+\left (e (1-x)+e^x (1-x)-3 x+3 x^2\right ) \log \left (e+e^x-3 x\right )}{\left (e^{2 x}+e^x (e-3 x)\right ) \log ^3\left (e+e^x-3 x\right )} \, dx=\frac {\frac {\mathrm {e}}{6}+\frac {{\mathrm {e}}^2}{9}-\frac {5\,x\,\mathrm {e}}{6}-\frac {x\,{\mathrm {e}}^2}{18}+\frac {x^2\,\mathrm {e}}{3}+\frac {3\,x^2}{2}-\frac {x^3}{2}-1}{{\mathrm {e}}^x-3}+\frac {x\,{\mathrm {e}}^{-x}+\frac {{\mathrm {e}}^{-x}\,\ln \left (\mathrm {e}-3\,x+{\mathrm {e}}^x\right )\,\left (x-1\right )\,\left (\mathrm {e}-3\,x+{\mathrm {e}}^x\right )}{2\,\left ({\mathrm {e}}^x-3\right )}}{{\ln \left (\mathrm {e}-3\,x+{\mathrm {e}}^x\right )}^2}-\frac {\frac {{\mathrm {e}}^{-x}\,\left (x-1\right )\,\left (\mathrm {e}-3\,x+{\mathrm {e}}^x\right )}{2\,\left ({\mathrm {e}}^x-3\right )}+\frac {{\mathrm {e}}^{-x}\,\ln \left (\mathrm {e}-3\,x+{\mathrm {e}}^x\right )\,\left (\mathrm {e}-3\,x+{\mathrm {e}}^x\right )\,\left (6\,\mathrm {e}-2\,{\mathrm {e}}^{2\,x}-3\,{\mathrm {e}}^{x+1}-27\,x+x\,{\mathrm {e}}^{2\,x}+2\,x\,{\mathrm {e}}^{x+1}-6\,x^2\,{\mathrm {e}}^x-3\,x\,\mathrm {e}+12\,x\,{\mathrm {e}}^x+9\,x^2+9\right )}{2\,{\left ({\mathrm {e}}^x-3\right )}^3}}{\ln \left (\mathrm {e}-3\,x+{\mathrm {e}}^x\right )}-{\mathrm {e}}^{-x}\,\left (-\frac {x^3}{2}+\left (\frac {\mathrm {e}}{3}+\frac {3}{2}\right )\,x^2+\left (-\frac {5\,\mathrm {e}}{6}-\frac {{\mathrm {e}}^2}{18}-\frac {1}{2}\right )\,x+\frac {\mathrm {e}}{6}+\frac {{\mathrm {e}}^2}{9}\right )+\frac {3\,\mathrm {e}-\frac {27\,x}{2}+\frac {{\mathrm {e}}^2}{2}-6\,x\,\mathrm {e}-\frac {x\,{\mathrm {e}}^2}{2}+3\,x^2\,\mathrm {e}+\frac {27\,x^2}{2}-\frac {9\,x^3}{2}+\frac {9}{2}}{9\,{\mathrm {e}}^{2\,x}-{\mathrm {e}}^{3\,x}-27\,{\mathrm {e}}^x+27}-\frac {3\,\mathrm {e}-\frac {27\,x}{2}+\frac {{\mathrm {e}}^2}{3}-4\,x\,\mathrm {e}-\frac {x\,{\mathrm {e}}^2}{6}+x^2\,\mathrm {e}+9\,x^2-\frac {3\,x^3}{2}+6}{{\mathrm {e}}^{2\,x}-6\,{\mathrm {e}}^x+9} \]

[In]

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

[Out]

(exp(1)/6 + exp(2)/9 - (5*x*exp(1))/6 - (x*exp(2))/18 + (x^2*exp(1))/3 + (3*x^2)/2 - x^3/2 - 1)/(exp(x) - 3) +
 (x*exp(-x) + (exp(-x)*log(exp(1) - 3*x + exp(x))*(x - 1)*(exp(1) - 3*x + exp(x)))/(2*(exp(x) - 3)))/log(exp(1
) - 3*x + exp(x))^2 - ((exp(-x)*(x - 1)*(exp(1) - 3*x + exp(x)))/(2*(exp(x) - 3)) + (exp(-x)*log(exp(1) - 3*x
+ exp(x))*(exp(1) - 3*x + exp(x))*(6*exp(1) - 2*exp(2*x) - 3*exp(x + 1) - 27*x + x*exp(2*x) + 2*x*exp(x + 1) -
 6*x^2*exp(x) - 3*x*exp(1) + 12*x*exp(x) + 9*x^2 + 9))/(2*(exp(x) - 3)^3))/log(exp(1) - 3*x + exp(x)) - exp(-x
)*(exp(1)/6 + exp(2)/9 + x^2*(exp(1)/3 + 3/2) - x*((5*exp(1))/6 + exp(2)/18 + 1/2) - x^3/2) + (3*exp(1) - (27*
x)/2 + exp(2)/2 - 6*x*exp(1) - (x*exp(2))/2 + 3*x^2*exp(1) + (27*x^2)/2 - (9*x^3)/2 + 9/2)/(9*exp(2*x) - exp(3
*x) - 27*exp(x) + 27) - (3*exp(1) - (27*x)/2 + exp(2)/3 - 4*x*exp(1) - (x*exp(2))/6 + x^2*exp(1) + 9*x^2 - (3*
x^3)/2 + 6)/(exp(2*x) - 6*exp(x) + 9)