\(\int \frac {(-3+x) \log (3-x)+\frac {e^{e^{e^5}+\frac {e^{e^{e^5}} (e^3+x)}{\log (3-x)}} (-e^3 x-x^2+(-3 x+x^2) \log (3-x))}{\log (3-x)}}{(-3 x+x^2) \log (3-x)} \, dx\) [6772]

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

Optimal result

Integrand size = 93, antiderivative size = 27 \[ \int \frac {(-3+x) \log (3-x)+\frac {e^{e^{e^5}+\frac {e^{e^{e^5}} \left (e^3+x\right )}{\log (3-x)}} \left (-e^3 x-x^2+\left (-3 x+x^2\right ) \log (3-x)\right )}{\log (3-x)}}{\left (-3 x+x^2\right ) \log (3-x)} \, dx=2+e^{\frac {e^{e^{e^5}} \left (e^3+x\right )}{\log (3-x)}}+\log (x) \]

[Out]

2+exp((exp(3)+x)*exp(-ln(ln(-x+3))+exp(exp(5))))+ln(x)

Rubi [F]

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

[In]

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

[Out]

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

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

Mathematica [A] (verified)

Time = 1.91 (sec) , antiderivative size = 26, normalized size of antiderivative = 0.96 \[ \int \frac {(-3+x) \log (3-x)+\frac {e^{e^{e^5}+\frac {e^{e^{e^5}} \left (e^3+x\right )}{\log (3-x)}} \left (-e^3 x-x^2+\left (-3 x+x^2\right ) \log (3-x)\right )}{\log (3-x)}}{\left (-3 x+x^2\right ) \log (3-x)} \, dx=e^{\frac {e^{e^{e^5}} \left (e^3+x\right )}{\log (3-x)}}+\log (x) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 23.72 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.81

method result size
default \(\ln \left (x \right )+{\mathrm e}^{\frac {\left ({\mathrm e}^{3}+x \right ) {\mathrm e}^{{\mathrm e}^{{\mathrm e}^{5}}}}{\ln \left (-x +3\right )}}\) \(22\)
norman \(\ln \left (x \right )+{\mathrm e}^{\frac {\left ({\mathrm e}^{3}+x \right ) {\mathrm e}^{{\mathrm e}^{{\mathrm e}^{5}}}}{\ln \left (-x +3\right )}}\) \(22\)
risch \(\ln \left (x \right )+{\mathrm e}^{\frac {\left ({\mathrm e}^{3}+x \right ) {\mathrm e}^{{\mathrm e}^{{\mathrm e}^{5}}}}{\ln \left (-x +3\right )}}\) \(22\)
parts \(\ln \left (x \right )+{\mathrm e}^{\frac {\left ({\mathrm e}^{3}+x \right ) {\mathrm e}^{{\mathrm e}^{{\mathrm e}^{5}}}}{\ln \left (-x +3\right )}}\) \(22\)
parallelrisch \(\ln \left (x \right )+{\mathrm e}^{\left ({\mathrm e}^{3}+x \right ) {\mathrm e}^{-\ln \left (\ln \left (-x +3\right )\right )+{\mathrm e}^{{\mathrm e}^{5}}}}\) \(24\)

[In]

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

[Out]

ln(x)+exp((exp(3)+x)/ln(-x+3)*exp(exp(exp(5))))

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 67 vs. \(2 (24) = 48\).

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

[In]

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

[Out]

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

Sympy [F(-2)]

Exception generated. \[ \int \frac {(-3+x) \log (3-x)+\frac {e^{e^{e^5}+\frac {e^{e^{e^5}} \left (e^3+x\right )}{\log (3-x)}} \left (-e^3 x-x^2+\left (-3 x+x^2\right ) \log (3-x)\right )}{\log (3-x)}}{\left (-3 x+x^2\right ) \log (3-x)} \, dx=\text {Exception raised: TypeError} \]

[In]

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

[Out]

Exception raised: TypeError >> '>' not supported between instances of 'Poly' and 'int'

Maxima [F(-2)]

Exception generated. \[ \int \frac {(-3+x) \log (3-x)+\frac {e^{e^{e^5}+\frac {e^{e^{e^5}} \left (e^3+x\right )}{\log (3-x)}} \left (-e^3 x-x^2+\left (-3 x+x^2\right ) \log (3-x)\right )}{\log (3-x)}}{\left (-3 x+x^2\right ) \log (3-x)} \, dx=\text {Exception raised: RuntimeError} \]

[In]

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

[Out]

Exception raised: RuntimeError >> ECL says: In function CAR, the value of the first argument is  0which is not
 of the expected type LIST

Giac [F]

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

[In]

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

[Out]

integrate(-((x^2 + x*e^3 - (x^2 - 3*x)*log(-x + 3))*e^((x + e^3)*e^(e^(e^5) - log(log(-x + 3))) + e^(e^5) - lo
g(log(-x + 3))) - (x - 3)*log(-x + 3))/((x^2 - 3*x)*log(-x + 3)), x)

Mupad [B] (verification not implemented)

Time = 13.74 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.30 \[ \int \frac {(-3+x) \log (3-x)+\frac {e^{e^{e^5}+\frac {e^{e^{e^5}} \left (e^3+x\right )}{\log (3-x)}} \left (-e^3 x-x^2+\left (-3 x+x^2\right ) \log (3-x)\right )}{\log (3-x)}}{\left (-3 x+x^2\right ) \log (3-x)} \, dx=\ln \left (x\right )+{\mathrm {e}}^{\frac {{\mathrm {e}}^{{\mathrm {e}}^{{\mathrm {e}}^5}}\,{\mathrm {e}}^3}{\ln \left (3-x\right )}}\,{\mathrm {e}}^{\frac {x\,{\mathrm {e}}^{{\mathrm {e}}^{{\mathrm {e}}^5}}}{\ln \left (3-x\right )}} \]

[In]

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

[Out]

log(x) + exp((exp(exp(exp(5)))*exp(3))/log(3 - x))*exp((x*exp(exp(exp(5))))/log(3 - x))