\(\int \frac {1728 x^2+864 e x^2-864 x^3+e^{2 x} (12 x^2+12 x^3-6 x^4+e (6 x^2+6 x^3))+e^x (288 x^2+72 x^3-72 x^4+e (144 x^2+72 x^3))+(e^x (216 x+72 e x-72 x^2)+e^{2 x} (18 x+6 e x-6 x^2)) \log ^2(3+e-x)+(-432 x-144 e x+144 x^2+e^x (-36 x-12 e x+12 x^2)) \log (x)+(-144 x-72 e x+72 x^2+e^x (-12 x-12 x^2+6 x^3+e (-6 x-6 x^2))) \log ^2(x)+(36+12 e-12 x) \log ^3(x)+\log (3+e-x) (1728 x+864 e x-864 x^2+e^{2 x} (12 x+30 x^2-12 x^3+e (6 x+12 x^2))+e^x (288 x+288 x^2-144 x^3+e (144 x+144 x^2))+(-432-144 e+144 x+e^x (-36-12 e+12 x)) \log (x)+e^x (-18 x-6 e x+6 x^2) \log ^2(x))}{3 x+e x-x^2} \, dx\) [362]

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

Optimal result

Integrand size = 365, antiderivative size = 25 \[ \int \frac {1728 x^2+864 e x^2-864 x^3+e^{2 x} \left (12 x^2+12 x^3-6 x^4+e \left (6 x^2+6 x^3\right )\right )+e^x \left (288 x^2+72 x^3-72 x^4+e \left (144 x^2+72 x^3\right )\right )+\left (e^x \left (216 x+72 e x-72 x^2\right )+e^{2 x} \left (18 x+6 e x-6 x^2\right )\right ) \log ^2(3+e-x)+\left (-432 x-144 e x+144 x^2+e^x \left (-36 x-12 e x+12 x^2\right )\right ) \log (x)+\left (-144 x-72 e x+72 x^2+e^x \left (-12 x-12 x^2+6 x^3+e \left (-6 x-6 x^2\right )\right )\right ) \log ^2(x)+(36+12 e-12 x) \log ^3(x)+\log (3+e-x) \left (1728 x+864 e x-864 x^2+e^{2 x} \left (12 x+30 x^2-12 x^3+e \left (6 x+12 x^2\right )\right )+e^x \left (288 x+288 x^2-144 x^3+e \left (144 x+144 x^2\right )\right )+\left (-432-144 e+144 x+e^x (-36-12 e+12 x)\right ) \log (x)+e^x \left (-18 x-6 e x+6 x^2\right ) \log ^2(x)\right )}{3 x+e x-x^2} \, dx=3 \left (-\left (\left (12+e^x\right ) (x+\log (3+e-x))\right )+\log ^2(x)\right )^2 \] Output:

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

Mathematica [A] (verified)

Time = 0.14 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.24 \[ \int \frac {1728 x^2+864 e x^2-864 x^3+e^{2 x} \left (12 x^2+12 x^3-6 x^4+e \left (6 x^2+6 x^3\right )\right )+e^x \left (288 x^2+72 x^3-72 x^4+e \left (144 x^2+72 x^3\right )\right )+\left (e^x \left (216 x+72 e x-72 x^2\right )+e^{2 x} \left (18 x+6 e x-6 x^2\right )\right ) \log ^2(3+e-x)+\left (-432 x-144 e x+144 x^2+e^x \left (-36 x-12 e x+12 x^2\right )\right ) \log (x)+\left (-144 x-72 e x+72 x^2+e^x \left (-12 x-12 x^2+6 x^3+e \left (-6 x-6 x^2\right )\right )\right ) \log ^2(x)+(36+12 e-12 x) \log ^3(x)+\log (3+e-x) \left (1728 x+864 e x-864 x^2+e^{2 x} \left (12 x+30 x^2-12 x^3+e \left (6 x+12 x^2\right )\right )+e^x \left (288 x+288 x^2-144 x^3+e \left (144 x+144 x^2\right )\right )+\left (-432-144 e+144 x+e^x (-36-12 e+12 x)\right ) \log (x)+e^x \left (-18 x-6 e x+6 x^2\right ) \log ^2(x)\right )}{3 x+e x-x^2} \, dx=3 \left (\left (12+e^x\right ) x+\left (12+e^x\right ) \log (3+e-x)-\log ^2(x)\right )^2 \] Input:

Integrate[(1728*x^2 + 864*E*x^2 - 864*x^3 + E^(2*x)*(12*x^2 + 12*x^3 - 6*x 
^4 + E*(6*x^2 + 6*x^3)) + E^x*(288*x^2 + 72*x^3 - 72*x^4 + E*(144*x^2 + 72 
*x^3)) + (E^x*(216*x + 72*E*x - 72*x^2) + E^(2*x)*(18*x + 6*E*x - 6*x^2))* 
Log[3 + E - x]^2 + (-432*x - 144*E*x + 144*x^2 + E^x*(-36*x - 12*E*x + 12* 
x^2))*Log[x] + (-144*x - 72*E*x + 72*x^2 + E^x*(-12*x - 12*x^2 + 6*x^3 + E 
*(-6*x - 6*x^2)))*Log[x]^2 + (36 + 12*E - 12*x)*Log[x]^3 + Log[3 + E - x]* 
(1728*x + 864*E*x - 864*x^2 + E^(2*x)*(12*x + 30*x^2 - 12*x^3 + E*(6*x + 1 
2*x^2)) + E^x*(288*x + 288*x^2 - 144*x^3 + E*(144*x + 144*x^2)) + (-432 - 
144*E + 144*x + E^x*(-36 - 12*E + 12*x))*Log[x] + E^x*(-18*x - 6*E*x + 6*x 
^2)*Log[x]^2))/(3*x + E*x - x^2),x]
 

Output:

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

Rubi [F]

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 {-864 x^3+864 e x^2+1728 x^2+\left (e^x \left (-72 x^2+72 e x+216 x\right )+e^{2 x} \left (-6 x^2+6 e x+18 x\right )\right ) \log ^2(-x+e+3)+\left (144 x^2+e^x \left (12 x^2-12 e x-36 x\right )-144 e x-432 x\right ) \log (x)+\left (72 x^2+e^x \left (6 x^3-12 x^2+e \left (-6 x^2-6 x\right )-12 x\right )-72 e x-144 x\right ) \log ^2(x)+\log (-x+e+3) \left (-864 x^2+e^x \left (6 x^2-6 e x-18 x\right ) \log ^2(x)+e^{2 x} \left (-12 x^3+30 x^2+e \left (12 x^2+6 x\right )+12 x\right )+e^x \left (-144 x^3+288 x^2+e \left (144 x^2+144 x\right )+288 x\right )+864 e x+1728 x+\left (144 x+e^x (12 x-12 e-36)-144 e-432\right ) \log (x)\right )+e^{2 x} \left (-6 x^4+12 x^3+12 x^2+e \left (6 x^3+6 x^2\right )\right )+e^x \left (-72 x^4+72 x^3+288 x^2+e \left (72 x^3+144 x^2\right )\right )+(-12 x+12 e+36) \log ^3(x)}{-x^2+e x+3 x} \, dx\)

\(\Big \downarrow \) 6

\(\displaystyle \int \frac {-864 x^3+864 e x^2+1728 x^2+\left (e^x \left (-72 x^2+72 e x+216 x\right )+e^{2 x} \left (-6 x^2+6 e x+18 x\right )\right ) \log ^2(-x+e+3)+\left (144 x^2+e^x \left (12 x^2-12 e x-36 x\right )-144 e x-432 x\right ) \log (x)+\left (72 x^2+e^x \left (6 x^3-12 x^2+e \left (-6 x^2-6 x\right )-12 x\right )-72 e x-144 x\right ) \log ^2(x)+\log (-x+e+3) \left (-864 x^2+e^x \left (6 x^2-6 e x-18 x\right ) \log ^2(x)+e^{2 x} \left (-12 x^3+30 x^2+e \left (12 x^2+6 x\right )+12 x\right )+e^x \left (-144 x^3+288 x^2+e \left (144 x^2+144 x\right )+288 x\right )+864 e x+1728 x+\left (144 x+e^x (12 x-12 e-36)-144 e-432\right ) \log (x)\right )+e^{2 x} \left (-6 x^4+12 x^3+12 x^2+e \left (6 x^3+6 x^2\right )\right )+e^x \left (-72 x^4+72 x^3+288 x^2+e \left (72 x^3+144 x^2\right )\right )+(-12 x+12 e+36) \log ^3(x)}{(3+e) x-x^2}dx\)

\(\Big \downarrow \) 6

\(\displaystyle \int \frac {-864 x^3+(1728+864 e) x^2+\left (e^x \left (-72 x^2+72 e x+216 x\right )+e^{2 x} \left (-6 x^2+6 e x+18 x\right )\right ) \log ^2(-x+e+3)+\left (144 x^2+e^x \left (12 x^2-12 e x-36 x\right )-144 e x-432 x\right ) \log (x)+\left (72 x^2+e^x \left (6 x^3-12 x^2+e \left (-6 x^2-6 x\right )-12 x\right )-72 e x-144 x\right ) \log ^2(x)+\log (-x+e+3) \left (-864 x^2+e^x \left (6 x^2-6 e x-18 x\right ) \log ^2(x)+e^{2 x} \left (-12 x^3+30 x^2+e \left (12 x^2+6 x\right )+12 x\right )+e^x \left (-144 x^3+288 x^2+e \left (144 x^2+144 x\right )+288 x\right )+864 e x+1728 x+\left (144 x+e^x (12 x-12 e-36)-144 e-432\right ) \log (x)\right )+e^{2 x} \left (-6 x^4+12 x^3+12 x^2+e \left (6 x^3+6 x^2\right )\right )+e^x \left (-72 x^4+72 x^3+288 x^2+e \left (72 x^3+144 x^2\right )\right )+(-12 x+12 e+36) \log ^3(x)}{(3+e) x-x^2}dx\)

\(\Big \downarrow \) 2026

\(\displaystyle \int \frac {-864 x^3+(1728+864 e) x^2+\left (e^x \left (-72 x^2+72 e x+216 x\right )+e^{2 x} \left (-6 x^2+6 e x+18 x\right )\right ) \log ^2(-x+e+3)+\left (144 x^2+e^x \left (12 x^2-12 e x-36 x\right )-144 e x-432 x\right ) \log (x)+\left (72 x^2+e^x \left (6 x^3-12 x^2+e \left (-6 x^2-6 x\right )-12 x\right )-72 e x-144 x\right ) \log ^2(x)+\log (-x+e+3) \left (-864 x^2+e^x \left (6 x^2-6 e x-18 x\right ) \log ^2(x)+e^{2 x} \left (-12 x^3+30 x^2+e \left (12 x^2+6 x\right )+12 x\right )+e^x \left (-144 x^3+288 x^2+e \left (144 x^2+144 x\right )+288 x\right )+864 e x+1728 x+\left (144 x+e^x (12 x-12 e-36)-144 e-432\right ) \log (x)\right )+e^{2 x} \left (-6 x^4+12 x^3+12 x^2+e \left (6 x^3+6 x^2\right )\right )+e^x \left (-72 x^4+72 x^3+288 x^2+e \left (72 x^3+144 x^2\right )\right )+(-12 x+12 e+36) \log ^3(x)}{(-x+e+3) x}dx\)

\(\Big \downarrow \) 7239

\(\displaystyle \int \frac {6 \left (x \left (e^x \left (x^2-2 x-2\right )+12 (x-2)-e^{x+1} (x+1)-12 e\right )+e^x x (x-e-3) \log (-x+e+3)+2 (-x+e+3) \log (x)\right ) \left (-\left (e^x+12\right ) x+\log ^2(x)-\left (e^x+12\right ) \log (-x+e+3)\right )}{(-x+e+3) x}dx\)

\(\Big \downarrow \) 27

\(\displaystyle 6 \int \frac {\left (x \left (12 (2-x)+e^{x+1} (x+1)+e^x \left (-x^2+2 x+2\right )+12 e\right )+e^x (-x+e+3) x \log (-x+e+3)-2 (-x+e+3) \log (x)\right ) \left (-\log ^2(x)+\left (12+e^x\right ) x+\left (12+e^x\right ) \log (-x+e+3)\right )}{(-x+e+3) x}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle 6 \int \left (\frac {2 \log ^3(x)}{x}+\frac {12 (x-2) \log ^2(x)}{-x+e+3}-\frac {12 e \log ^2(x)}{-x+e+3}-\frac {24 \log (-x+e+3) \log (x)}{x}-24 \log (x)-\frac {144 (x-2) x}{-x+e+3}+\frac {144 e x}{-x+e+3}-\frac {144 (x-2) \log (-x+e+3)}{-x+e+3}+\frac {144 e \log (-x+e+3)}{-x+e+3}+\frac {e^{2 x} (x+\log (-x+e+3)) \left (-x^2-\log (-x+e+3) x+2 \left (1+\frac {e}{2}\right ) x+3 \left (1+\frac {e}{3}\right ) \log (-x+e+3)+2 \left (1+\frac {e}{2}\right )\right )}{-x+e+3}+\frac {e^x \left (-12 x^4+\log ^2(x) x^3-24 \log (-x+e+3) x^3+12 (1+e) x^3-12 \log ^2(-x+e+3) x^2+\log (-x+e+3) \log ^2(x) x^2-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x^2+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x^2+2 \log (x) x^2+48 \left (1+\frac {e}{2}\right ) x^2+36 \left (1+\frac {e}{3}\right ) \log ^2(-x+e+3) x-3 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log ^2(x) x-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x+2 \log (-x+e+3) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log (x)\right )}{(-x+e+3) x}\right )dx\)

\(\Big \downarrow \) 7239

\(\displaystyle 6 \int \frac {\left (x \left (12 (x-2)-e^{x+1} (x+1)+e^x \left (x^2-2 x-2\right )-12 e\right )+e^x x (x-e-3) \log (-x+e+3)+2 (-x+e+3) \log (x)\right ) \left (\log ^2(x)-\left (12+e^x\right ) x-\left (12+e^x\right ) \log (-x+e+3)\right )}{(-x+e+3) x}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle 6 \int \left (\frac {2 \log ^3(x)}{x}+\frac {12 (x-2) \log ^2(x)}{-x+e+3}-\frac {12 e \log ^2(x)}{-x+e+3}-\frac {24 \log (-x+e+3) \log (x)}{x}-24 \log (x)-\frac {144 (x-2) x}{-x+e+3}+\frac {144 e x}{-x+e+3}-\frac {144 (x-2) \log (-x+e+3)}{-x+e+3}+\frac {144 e \log (-x+e+3)}{-x+e+3}+\frac {e^{2 x} (x+\log (-x+e+3)) \left (-x^2-\log (-x+e+3) x+2 \left (1+\frac {e}{2}\right ) x+3 \left (1+\frac {e}{3}\right ) \log (-x+e+3)+2 \left (1+\frac {e}{2}\right )\right )}{-x+e+3}+\frac {e^x \left (-12 x^4+\log ^2(x) x^3-24 \log (-x+e+3) x^3+12 (1+e) x^3-12 \log ^2(-x+e+3) x^2+\log (-x+e+3) \log ^2(x) x^2-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x^2+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x^2+2 \log (x) x^2+48 \left (1+\frac {e}{2}\right ) x^2+36 \left (1+\frac {e}{3}\right ) \log ^2(-x+e+3) x-3 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log ^2(x) x-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x+2 \log (-x+e+3) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log (x)\right )}{(-x+e+3) x}\right )dx\)

\(\Big \downarrow \) 7239

\(\displaystyle 6 \int \frac {\left (x \left (12 (x-2)-e^{x+1} (x+1)+e^x \left (x^2-2 x-2\right )-12 e\right )+e^x x (x-e-3) \log (-x+e+3)+2 (-x+e+3) \log (x)\right ) \left (\log ^2(x)-\left (12+e^x\right ) x-\left (12+e^x\right ) \log (-x+e+3)\right )}{(-x+e+3) x}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle 6 \int \left (\frac {2 \log ^3(x)}{x}+\frac {12 (x-2) \log ^2(x)}{-x+e+3}-\frac {12 e \log ^2(x)}{-x+e+3}-\frac {24 \log (-x+e+3) \log (x)}{x}-24 \log (x)-\frac {144 (x-2) x}{-x+e+3}+\frac {144 e x}{-x+e+3}-\frac {144 (x-2) \log (-x+e+3)}{-x+e+3}+\frac {144 e \log (-x+e+3)}{-x+e+3}+\frac {e^{2 x} (x+\log (-x+e+3)) \left (-x^2-\log (-x+e+3) x+2 \left (1+\frac {e}{2}\right ) x+3 \left (1+\frac {e}{3}\right ) \log (-x+e+3)+2 \left (1+\frac {e}{2}\right )\right )}{-x+e+3}+\frac {e^x \left (-12 x^4+\log ^2(x) x^3-24 \log (-x+e+3) x^3+12 (1+e) x^3-12 \log ^2(-x+e+3) x^2+\log (-x+e+3) \log ^2(x) x^2-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x^2+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x^2+2 \log (x) x^2+48 \left (1+\frac {e}{2}\right ) x^2+36 \left (1+\frac {e}{3}\right ) \log ^2(-x+e+3) x-3 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log ^2(x) x-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x+2 \log (-x+e+3) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log (x)\right )}{(-x+e+3) x}\right )dx\)

\(\Big \downarrow \) 7239

\(\displaystyle 6 \int \frac {\left (x \left (12 (x-2)-e^{x+1} (x+1)+e^x \left (x^2-2 x-2\right )-12 e\right )+e^x x (x-e-3) \log (-x+e+3)+2 (-x+e+3) \log (x)\right ) \left (\log ^2(x)-\left (12+e^x\right ) x-\left (12+e^x\right ) \log (-x+e+3)\right )}{(-x+e+3) x}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle 6 \int \left (\frac {2 \log ^3(x)}{x}+\frac {12 (x-2) \log ^2(x)}{-x+e+3}-\frac {12 e \log ^2(x)}{-x+e+3}-\frac {24 \log (-x+e+3) \log (x)}{x}-24 \log (x)-\frac {144 (x-2) x}{-x+e+3}+\frac {144 e x}{-x+e+3}-\frac {144 (x-2) \log (-x+e+3)}{-x+e+3}+\frac {144 e \log (-x+e+3)}{-x+e+3}+\frac {e^{2 x} (x+\log (-x+e+3)) \left (-x^2-\log (-x+e+3) x+2 \left (1+\frac {e}{2}\right ) x+3 \left (1+\frac {e}{3}\right ) \log (-x+e+3)+2 \left (1+\frac {e}{2}\right )\right )}{-x+e+3}+\frac {e^x \left (-12 x^4+\log ^2(x) x^3-24 \log (-x+e+3) x^3+12 (1+e) x^3-12 \log ^2(-x+e+3) x^2+\log (-x+e+3) \log ^2(x) x^2-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x^2+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x^2+2 \log (x) x^2+48 \left (1+\frac {e}{2}\right ) x^2+36 \left (1+\frac {e}{3}\right ) \log ^2(-x+e+3) x-3 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log ^2(x) x-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x+2 \log (-x+e+3) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log (x)\right )}{(-x+e+3) x}\right )dx\)

\(\Big \downarrow \) 7239

\(\displaystyle 6 \int \frac {\left (x \left (12 (x-2)-e^{x+1} (x+1)+e^x \left (x^2-2 x-2\right )-12 e\right )+e^x x (x-e-3) \log (-x+e+3)+2 (-x+e+3) \log (x)\right ) \left (\log ^2(x)-\left (12+e^x\right ) x-\left (12+e^x\right ) \log (-x+e+3)\right )}{(-x+e+3) x}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle 6 \int \left (\frac {2 \log ^3(x)}{x}+\frac {12 (x-2) \log ^2(x)}{-x+e+3}-\frac {12 e \log ^2(x)}{-x+e+3}-\frac {24 \log (-x+e+3) \log (x)}{x}-24 \log (x)-\frac {144 (x-2) x}{-x+e+3}+\frac {144 e x}{-x+e+3}-\frac {144 (x-2) \log (-x+e+3)}{-x+e+3}+\frac {144 e \log (-x+e+3)}{-x+e+3}+\frac {e^{2 x} (x+\log (-x+e+3)) \left (-x^2-\log (-x+e+3) x+2 \left (1+\frac {e}{2}\right ) x+3 \left (1+\frac {e}{3}\right ) \log (-x+e+3)+2 \left (1+\frac {e}{2}\right )\right )}{-x+e+3}+\frac {e^x \left (-12 x^4+\log ^2(x) x^3-24 \log (-x+e+3) x^3+12 (1+e) x^3-12 \log ^2(-x+e+3) x^2+\log (-x+e+3) \log ^2(x) x^2-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x^2+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x^2+2 \log (x) x^2+48 \left (1+\frac {e}{2}\right ) x^2+36 \left (1+\frac {e}{3}\right ) \log ^2(-x+e+3) x-3 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log ^2(x) x-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x+2 \log (-x+e+3) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log (x)\right )}{(-x+e+3) x}\right )dx\)

\(\Big \downarrow \) 7239

\(\displaystyle 6 \int \frac {\left (x \left (12 (x-2)-e^{x+1} (x+1)+e^x \left (x^2-2 x-2\right )-12 e\right )+e^x x (x-e-3) \log (-x+e+3)+2 (-x+e+3) \log (x)\right ) \left (\log ^2(x)-\left (12+e^x\right ) x-\left (12+e^x\right ) \log (-x+e+3)\right )}{(-x+e+3) x}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle 6 \int \left (\frac {2 \log ^3(x)}{x}+\frac {12 (x-2) \log ^2(x)}{-x+e+3}-\frac {12 e \log ^2(x)}{-x+e+3}-\frac {24 \log (-x+e+3) \log (x)}{x}-24 \log (x)-\frac {144 (x-2) x}{-x+e+3}+\frac {144 e x}{-x+e+3}-\frac {144 (x-2) \log (-x+e+3)}{-x+e+3}+\frac {144 e \log (-x+e+3)}{-x+e+3}+\frac {e^{2 x} (x+\log (-x+e+3)) \left (-x^2-\log (-x+e+3) x+2 \left (1+\frac {e}{2}\right ) x+3 \left (1+\frac {e}{3}\right ) \log (-x+e+3)+2 \left (1+\frac {e}{2}\right )\right )}{-x+e+3}+\frac {e^x \left (-12 x^4+\log ^2(x) x^3-24 \log (-x+e+3) x^3+12 (1+e) x^3-12 \log ^2(-x+e+3) x^2+\log (-x+e+3) \log ^2(x) x^2-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x^2+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x^2+2 \log (x) x^2+48 \left (1+\frac {e}{2}\right ) x^2+36 \left (1+\frac {e}{3}\right ) \log ^2(-x+e+3) x-3 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log ^2(x) x-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x+2 \log (-x+e+3) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log (x)\right )}{(-x+e+3) x}\right )dx\)

\(\Big \downarrow \) 7239

\(\displaystyle 6 \int \frac {\left (x \left (12 (x-2)-e^{x+1} (x+1)+e^x \left (x^2-2 x-2\right )-12 e\right )+e^x x (x-e-3) \log (-x+e+3)+2 (-x+e+3) \log (x)\right ) \left (\log ^2(x)-\left (12+e^x\right ) x-\left (12+e^x\right ) \log (-x+e+3)\right )}{(-x+e+3) x}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle 6 \int \left (\frac {2 \log ^3(x)}{x}+\frac {12 (x-2) \log ^2(x)}{-x+e+3}-\frac {12 e \log ^2(x)}{-x+e+3}-\frac {24 \log (-x+e+3) \log (x)}{x}-24 \log (x)-\frac {144 (x-2) x}{-x+e+3}+\frac {144 e x}{-x+e+3}-\frac {144 (x-2) \log (-x+e+3)}{-x+e+3}+\frac {144 e \log (-x+e+3)}{-x+e+3}+\frac {e^{2 x} (x+\log (-x+e+3)) \left (-x^2-\log (-x+e+3) x+2 \left (1+\frac {e}{2}\right ) x+3 \left (1+\frac {e}{3}\right ) \log (-x+e+3)+2 \left (1+\frac {e}{2}\right )\right )}{-x+e+3}+\frac {e^x \left (-12 x^4+\log ^2(x) x^3-24 \log (-x+e+3) x^3+12 (1+e) x^3-12 \log ^2(-x+e+3) x^2+\log (-x+e+3) \log ^2(x) x^2-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x^2+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x^2+2 \log (x) x^2+48 \left (1+\frac {e}{2}\right ) x^2+36 \left (1+\frac {e}{3}\right ) \log ^2(-x+e+3) x-3 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log ^2(x) x-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x+2 \log (-x+e+3) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log (x)\right )}{(-x+e+3) x}\right )dx\)

\(\Big \downarrow \) 7239

\(\displaystyle 6 \int \frac {\left (x \left (12 (x-2)-e^{x+1} (x+1)+e^x \left (x^2-2 x-2\right )-12 e\right )+e^x x (x-e-3) \log (-x+e+3)+2 (-x+e+3) \log (x)\right ) \left (\log ^2(x)-\left (12+e^x\right ) x-\left (12+e^x\right ) \log (-x+e+3)\right )}{(-x+e+3) x}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle 6 \int \left (\frac {2 \log ^3(x)}{x}+\frac {12 (x-2) \log ^2(x)}{-x+e+3}-\frac {12 e \log ^2(x)}{-x+e+3}-\frac {24 \log (-x+e+3) \log (x)}{x}-24 \log (x)-\frac {144 (x-2) x}{-x+e+3}+\frac {144 e x}{-x+e+3}-\frac {144 (x-2) \log (-x+e+3)}{-x+e+3}+\frac {144 e \log (-x+e+3)}{-x+e+3}+\frac {e^{2 x} (x+\log (-x+e+3)) \left (-x^2-\log (-x+e+3) x+2 \left (1+\frac {e}{2}\right ) x+3 \left (1+\frac {e}{3}\right ) \log (-x+e+3)+2 \left (1+\frac {e}{2}\right )\right )}{-x+e+3}+\frac {e^x \left (-12 x^4+\log ^2(x) x^3-24 \log (-x+e+3) x^3+12 (1+e) x^3-12 \log ^2(-x+e+3) x^2+\log (-x+e+3) \log ^2(x) x^2-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x^2+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x^2+2 \log (x) x^2+48 \left (1+\frac {e}{2}\right ) x^2+36 \left (1+\frac {e}{3}\right ) \log ^2(-x+e+3) x-3 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log ^2(x) x-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x+2 \log (-x+e+3) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log (x)\right )}{(-x+e+3) x}\right )dx\)

\(\Big \downarrow \) 7239

\(\displaystyle 6 \int \frac {\left (x \left (12 (x-2)-e^{x+1} (x+1)+e^x \left (x^2-2 x-2\right )-12 e\right )+e^x x (x-e-3) \log (-x+e+3)+2 (-x+e+3) \log (x)\right ) \left (\log ^2(x)-\left (12+e^x\right ) x-\left (12+e^x\right ) \log (-x+e+3)\right )}{(-x+e+3) x}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle 6 \int \left (\frac {2 \log ^3(x)}{x}+\frac {12 (x-2) \log ^2(x)}{-x+e+3}-\frac {12 e \log ^2(x)}{-x+e+3}-\frac {24 \log (-x+e+3) \log (x)}{x}-24 \log (x)-\frac {144 (x-2) x}{-x+e+3}+\frac {144 e x}{-x+e+3}-\frac {144 (x-2) \log (-x+e+3)}{-x+e+3}+\frac {144 e \log (-x+e+3)}{-x+e+3}+\frac {e^{2 x} (x+\log (-x+e+3)) \left (-x^2-\log (-x+e+3) x+2 \left (1+\frac {e}{2}\right ) x+3 \left (1+\frac {e}{3}\right ) \log (-x+e+3)+2 \left (1+\frac {e}{2}\right )\right )}{-x+e+3}+\frac {e^x \left (-12 x^4+\log ^2(x) x^3-24 \log (-x+e+3) x^3+12 (1+e) x^3-12 \log ^2(-x+e+3) x^2+\log (-x+e+3) \log ^2(x) x^2-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x^2+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x^2+2 \log (x) x^2+48 \left (1+\frac {e}{2}\right ) x^2+36 \left (1+\frac {e}{3}\right ) \log ^2(-x+e+3) x-3 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log ^2(x) x-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x+2 \log (-x+e+3) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log (x)\right )}{(-x+e+3) x}\right )dx\)

\(\Big \downarrow \) 7239

\(\displaystyle 6 \int \frac {\left (x \left (12 (x-2)-e^{x+1} (x+1)+e^x \left (x^2-2 x-2\right )-12 e\right )+e^x x (x-e-3) \log (-x+e+3)+2 (-x+e+3) \log (x)\right ) \left (\log ^2(x)-\left (12+e^x\right ) x-\left (12+e^x\right ) \log (-x+e+3)\right )}{(-x+e+3) x}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle 6 \int \left (\frac {2 \log ^3(x)}{x}+\frac {12 (x-2) \log ^2(x)}{-x+e+3}-\frac {12 e \log ^2(x)}{-x+e+3}-\frac {24 \log (-x+e+3) \log (x)}{x}-24 \log (x)-\frac {144 (x-2) x}{-x+e+3}+\frac {144 e x}{-x+e+3}-\frac {144 (x-2) \log (-x+e+3)}{-x+e+3}+\frac {144 e \log (-x+e+3)}{-x+e+3}+\frac {e^{2 x} (x+\log (-x+e+3)) \left (-x^2-\log (-x+e+3) x+2 \left (1+\frac {e}{2}\right ) x+3 \left (1+\frac {e}{3}\right ) \log (-x+e+3)+2 \left (1+\frac {e}{2}\right )\right )}{-x+e+3}+\frac {e^x \left (-12 x^4+\log ^2(x) x^3-24 \log (-x+e+3) x^3+12 (1+e) x^3-12 \log ^2(-x+e+3) x^2+\log (-x+e+3) \log ^2(x) x^2-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x^2+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x^2+2 \log (x) x^2+48 \left (1+\frac {e}{2}\right ) x^2+36 \left (1+\frac {e}{3}\right ) \log ^2(-x+e+3) x-3 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log ^2(x) x-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x+2 \log (-x+e+3) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log (x)\right )}{(-x+e+3) x}\right )dx\)

\(\Big \downarrow \) 7239

\(\displaystyle 6 \int \frac {\left (x \left (12 (x-2)-e^{x+1} (x+1)+e^x \left (x^2-2 x-2\right )-12 e\right )+e^x x (x-e-3) \log (-x+e+3)+2 (-x+e+3) \log (x)\right ) \left (\log ^2(x)-\left (12+e^x\right ) x-\left (12+e^x\right ) \log (-x+e+3)\right )}{(-x+e+3) x}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle 6 \int \left (\frac {2 \log ^3(x)}{x}+\frac {12 (x-2) \log ^2(x)}{-x+e+3}-\frac {12 e \log ^2(x)}{-x+e+3}-\frac {24 \log (-x+e+3) \log (x)}{x}-24 \log (x)-\frac {144 (x-2) x}{-x+e+3}+\frac {144 e x}{-x+e+3}-\frac {144 (x-2) \log (-x+e+3)}{-x+e+3}+\frac {144 e \log (-x+e+3)}{-x+e+3}+\frac {e^{2 x} (x+\log (-x+e+3)) \left (-x^2-\log (-x+e+3) x+2 \left (1+\frac {e}{2}\right ) x+3 \left (1+\frac {e}{3}\right ) \log (-x+e+3)+2 \left (1+\frac {e}{2}\right )\right )}{-x+e+3}+\frac {e^x \left (-12 x^4+\log ^2(x) x^3-24 \log (-x+e+3) x^3+12 (1+e) x^3-12 \log ^2(-x+e+3) x^2+\log (-x+e+3) \log ^2(x) x^2-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x^2+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x^2+2 \log (x) x^2+48 \left (1+\frac {e}{2}\right ) x^2+36 \left (1+\frac {e}{3}\right ) \log ^2(-x+e+3) x-3 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log ^2(x) x-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x+2 \log (-x+e+3) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log (x)\right )}{(-x+e+3) x}\right )dx\)

\(\Big \downarrow \) 7239

\(\displaystyle 6 \int \frac {\left (x \left (12 (x-2)-e^{x+1} (x+1)+e^x \left (x^2-2 x-2\right )-12 e\right )+e^x x (x-e-3) \log (-x+e+3)+2 (-x+e+3) \log (x)\right ) \left (\log ^2(x)-\left (12+e^x\right ) x-\left (12+e^x\right ) \log (-x+e+3)\right )}{(-x+e+3) x}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle 6 \int \left (\frac {2 \log ^3(x)}{x}+\frac {12 (x-2) \log ^2(x)}{-x+e+3}-\frac {12 e \log ^2(x)}{-x+e+3}-\frac {24 \log (-x+e+3) \log (x)}{x}-24 \log (x)-\frac {144 (x-2) x}{-x+e+3}+\frac {144 e x}{-x+e+3}-\frac {144 (x-2) \log (-x+e+3)}{-x+e+3}+\frac {144 e \log (-x+e+3)}{-x+e+3}+\frac {e^{2 x} (x+\log (-x+e+3)) \left (-x^2-\log (-x+e+3) x+2 \left (1+\frac {e}{2}\right ) x+3 \left (1+\frac {e}{3}\right ) \log (-x+e+3)+2 \left (1+\frac {e}{2}\right )\right )}{-x+e+3}+\frac {e^x \left (-12 x^4+\log ^2(x) x^3-24 \log (-x+e+3) x^3+12 (1+e) x^3-12 \log ^2(-x+e+3) x^2+\log (-x+e+3) \log ^2(x) x^2-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x^2+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x^2+2 \log (x) x^2+48 \left (1+\frac {e}{2}\right ) x^2+36 \left (1+\frac {e}{3}\right ) \log ^2(-x+e+3) x-3 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log ^2(x) x-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x+2 \log (-x+e+3) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log (x)\right )}{(-x+e+3) x}\right )dx\)

\(\Big \downarrow \) 7239

\(\displaystyle 6 \int \frac {\left (x \left (12 (x-2)-e^{x+1} (x+1)+e^x \left (x^2-2 x-2\right )-12 e\right )+e^x x (x-e-3) \log (-x+e+3)+2 (-x+e+3) \log (x)\right ) \left (\log ^2(x)-\left (12+e^x\right ) x-\left (12+e^x\right ) \log (-x+e+3)\right )}{(-x+e+3) x}dx\)

\(\Big \downarrow \) 7293

\(\displaystyle 6 \int \left (\frac {2 \log ^3(x)}{x}+\frac {12 (x-2) \log ^2(x)}{-x+e+3}-\frac {12 e \log ^2(x)}{-x+e+3}-\frac {24 \log (-x+e+3) \log (x)}{x}-24 \log (x)-\frac {144 (x-2) x}{-x+e+3}+\frac {144 e x}{-x+e+3}-\frac {144 (x-2) \log (-x+e+3)}{-x+e+3}+\frac {144 e \log (-x+e+3)}{-x+e+3}+\frac {e^{2 x} (x+\log (-x+e+3)) \left (-x^2-\log (-x+e+3) x+2 \left (1+\frac {e}{2}\right ) x+3 \left (1+\frac {e}{3}\right ) \log (-x+e+3)+2 \left (1+\frac {e}{2}\right )\right )}{-x+e+3}+\frac {e^x \left (-12 x^4+\log ^2(x) x^3-24 \log (-x+e+3) x^3+12 (1+e) x^3-12 \log ^2(-x+e+3) x^2+\log (-x+e+3) \log ^2(x) x^2-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x^2+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x^2+2 \log (x) x^2+48 \left (1+\frac {e}{2}\right ) x^2+36 \left (1+\frac {e}{3}\right ) \log ^2(-x+e+3) x-3 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log ^2(x) x-2 \left (1+\frac {e}{2}\right ) \log ^2(x) x+48 \left (1+\frac {e}{2}\right ) \log (-x+e+3) x+2 \log (-x+e+3) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (x) x-6 \left (1+\frac {e}{3}\right ) \log (-x+e+3) \log (x)\right )}{(-x+e+3) x}\right )dx\)

Input:

Int[(1728*x^2 + 864*E*x^2 - 864*x^3 + E^(2*x)*(12*x^2 + 12*x^3 - 6*x^4 + E 
*(6*x^2 + 6*x^3)) + E^x*(288*x^2 + 72*x^3 - 72*x^4 + E*(144*x^2 + 72*x^3)) 
 + (E^x*(216*x + 72*E*x - 72*x^2) + E^(2*x)*(18*x + 6*E*x - 6*x^2))*Log[3 
+ E - x]^2 + (-432*x - 144*E*x + 144*x^2 + E^x*(-36*x - 12*E*x + 12*x^2))* 
Log[x] + (-144*x - 72*E*x + 72*x^2 + E^x*(-12*x - 12*x^2 + 6*x^3 + E*(-6*x 
 - 6*x^2)))*Log[x]^2 + (36 + 12*E - 12*x)*Log[x]^3 + Log[3 + E - x]*(1728* 
x + 864*E*x - 864*x^2 + E^(2*x)*(12*x + 30*x^2 - 12*x^3 + E*(6*x + 12*x^2) 
) + E^x*(288*x + 288*x^2 - 144*x^3 + E*(144*x + 144*x^2)) + (-432 - 144*E 
+ 144*x + E^x*(-36 - 12*E + 12*x))*Log[x] + E^x*(-18*x - 6*E*x + 6*x^2)*Lo 
g[x]^2))/(3*x + E*x - x^2),x]
 

Output:

$Aborted
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(106\) vs. \(2(25)=50\).

Time = 0.15 (sec) , antiderivative size = 107, normalized size of antiderivative = 4.28

\[\left (3 \,{\mathrm e}^{2 x}+72 \,{\mathrm e}^{x}+432\right ) \ln \left (3-x +{\mathrm e}\right )^{2}+\left (6 x \,{\mathrm e}^{2 x}-6 \,{\mathrm e}^{x} \ln \left (x \right )^{2}+144 \,{\mathrm e}^{x} x -72 \ln \left (x \right )^{2}+864 x \right ) \ln \left (3-x +{\mathrm e}\right )+3 \,{\mathrm e}^{2 x} x^{2}-6 x \,{\mathrm e}^{x} \ln \left (x \right )^{2}+3 \ln \left (x \right )^{4}+72 \,{\mathrm e}^{x} x^{2}-72 x \ln \left (x \right )^{2}+432 x^{2}\]

Input:

int((((6*x*exp(1)-6*x^2+18*x)*exp(x)^2+(72*x*exp(1)-72*x^2+216*x)*exp(x))* 
ln(3-x+exp(1))^2+((-6*x*exp(1)+6*x^2-18*x)*exp(x)*ln(x)^2+((-12*exp(1)+12* 
x-36)*exp(x)-144*exp(1)+144*x-432)*ln(x)+((12*x^2+6*x)*exp(1)-12*x^3+30*x^ 
2+12*x)*exp(x)^2+((144*x^2+144*x)*exp(1)-144*x^3+288*x^2+288*x)*exp(x)+864 
*x*exp(1)-864*x^2+1728*x)*ln(3-x+exp(1))+(12*exp(1)-12*x+36)*ln(x)^3+(((-6 
*x^2-6*x)*exp(1)+6*x^3-12*x^2-12*x)*exp(x)-72*x*exp(1)+72*x^2-144*x)*ln(x) 
^2+((-12*x*exp(1)+12*x^2-36*x)*exp(x)-144*x*exp(1)+144*x^2-432*x)*ln(x)+(( 
6*x^3+6*x^2)*exp(1)-6*x^4+12*x^3+12*x^2)*exp(x)^2+((72*x^3+144*x^2)*exp(1) 
-72*x^4+72*x^3+288*x^2)*exp(x)+864*x^2*exp(1)-864*x^3+1728*x^2)/(x*exp(1)- 
x^2+3*x),x)
 

Output:

(3*exp(x)^2+72*exp(x)+432)*ln(3-x+exp(1))^2+(6*x*exp(x)^2-6*exp(x)*ln(x)^2 
+144*exp(x)*x-72*ln(x)^2+864*x)*ln(3-x+exp(1))+3*exp(x)^2*x^2-6*x*exp(x)*l 
n(x)^2+3*ln(x)^4+72*exp(x)*x^2-72*x*ln(x)^2+432*x^2
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 99 vs. \(2 (26) = 52\).

Time = 0.10 (sec) , antiderivative size = 99, normalized size of antiderivative = 3.96 \[ \int \frac {1728 x^2+864 e x^2-864 x^3+e^{2 x} \left (12 x^2+12 x^3-6 x^4+e \left (6 x^2+6 x^3\right )\right )+e^x \left (288 x^2+72 x^3-72 x^4+e \left (144 x^2+72 x^3\right )\right )+\left (e^x \left (216 x+72 e x-72 x^2\right )+e^{2 x} \left (18 x+6 e x-6 x^2\right )\right ) \log ^2(3+e-x)+\left (-432 x-144 e x+144 x^2+e^x \left (-36 x-12 e x+12 x^2\right )\right ) \log (x)+\left (-144 x-72 e x+72 x^2+e^x \left (-12 x-12 x^2+6 x^3+e \left (-6 x-6 x^2\right )\right )\right ) \log ^2(x)+(36+12 e-12 x) \log ^3(x)+\log (3+e-x) \left (1728 x+864 e x-864 x^2+e^{2 x} \left (12 x+30 x^2-12 x^3+e \left (6 x+12 x^2\right )\right )+e^x \left (288 x+288 x^2-144 x^3+e \left (144 x+144 x^2\right )\right )+\left (-432-144 e+144 x+e^x (-36-12 e+12 x)\right ) \log (x)+e^x \left (-18 x-6 e x+6 x^2\right ) \log ^2(x)\right )}{3 x+e x-x^2} \, dx=3 \, \log \left (x\right )^{4} + 3 \, x^{2} e^{\left (2 \, x\right )} + 72 \, x^{2} e^{x} - 6 \, {\left (x e^{x} + 12 \, x\right )} \log \left (x\right )^{2} + 3 \, {\left (e^{\left (2 \, x\right )} + 24 \, e^{x} + 144\right )} \log \left (-x + e + 3\right )^{2} + 432 \, x^{2} - 6 \, {\left ({\left (e^{x} + 12\right )} \log \left (x\right )^{2} - x e^{\left (2 \, x\right )} - 24 \, x e^{x} - 144 \, x\right )} \log \left (-x + e + 3\right ) \] Input:

integrate((((6*exp(1)*x-6*x^2+18*x)*exp(x)^2+(72*exp(1)*x-72*x^2+216*x)*ex 
p(x))*log(3-x+exp(1))^2+((-6*exp(1)*x+6*x^2-18*x)*exp(x)*log(x)^2+((-12*ex 
p(1)+12*x-36)*exp(x)-144*exp(1)+144*x-432)*log(x)+((12*x^2+6*x)*exp(1)-12* 
x^3+30*x^2+12*x)*exp(x)^2+((144*x^2+144*x)*exp(1)-144*x^3+288*x^2+288*x)*e 
xp(x)+864*exp(1)*x-864*x^2+1728*x)*log(3-x+exp(1))+(12*exp(1)-12*x+36)*log 
(x)^3+(((-6*x^2-6*x)*exp(1)+6*x^3-12*x^2-12*x)*exp(x)-72*exp(1)*x+72*x^2-1 
44*x)*log(x)^2+((-12*exp(1)*x+12*x^2-36*x)*exp(x)-144*exp(1)*x+144*x^2-432 
*x)*log(x)+((6*x^3+6*x^2)*exp(1)-6*x^4+12*x^3+12*x^2)*exp(x)^2+((72*x^3+14 
4*x^2)*exp(1)-72*x^4+72*x^3+288*x^2)*exp(x)+864*x^2*exp(1)-864*x^3+1728*x^ 
2)/(exp(1)*x-x^2+3*x),x, algorithm="fricas")
 

Output:

3*log(x)^4 + 3*x^2*e^(2*x) + 72*x^2*e^x - 6*(x*e^x + 12*x)*log(x)^2 + 3*(e 
^(2*x) + 24*e^x + 144)*log(-x + e + 3)^2 + 432*x^2 - 6*((e^x + 12)*log(x)^ 
2 - x*e^(2*x) - 24*x*e^x - 144*x)*log(-x + e + 3)
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 139 vs. \(2 (22) = 44\).

Time = 17.73 (sec) , antiderivative size = 139, normalized size of antiderivative = 5.56 \[ \int \frac {1728 x^2+864 e x^2-864 x^3+e^{2 x} \left (12 x^2+12 x^3-6 x^4+e \left (6 x^2+6 x^3\right )\right )+e^x \left (288 x^2+72 x^3-72 x^4+e \left (144 x^2+72 x^3\right )\right )+\left (e^x \left (216 x+72 e x-72 x^2\right )+e^{2 x} \left (18 x+6 e x-6 x^2\right )\right ) \log ^2(3+e-x)+\left (-432 x-144 e x+144 x^2+e^x \left (-36 x-12 e x+12 x^2\right )\right ) \log (x)+\left (-144 x-72 e x+72 x^2+e^x \left (-12 x-12 x^2+6 x^3+e \left (-6 x-6 x^2\right )\right )\right ) \log ^2(x)+(36+12 e-12 x) \log ^3(x)+\log (3+e-x) \left (1728 x+864 e x-864 x^2+e^{2 x} \left (12 x+30 x^2-12 x^3+e \left (6 x+12 x^2\right )\right )+e^x \left (288 x+288 x^2-144 x^3+e \left (144 x+144 x^2\right )\right )+\left (-432-144 e+144 x+e^x (-36-12 e+12 x)\right ) \log (x)+e^x \left (-18 x-6 e x+6 x^2\right ) \log ^2(x)\right )}{3 x+e x-x^2} \, dx=432 x^{2} - 72 x \log {\left (x \right )}^{2} + \left (864 x - 72 \log {\left (x \right )}^{2}\right ) \log {\left (- x + e + 3 \right )} + \left (3 x^{2} + 6 x \log {\left (- x + e + 3 \right )} + 3 \log {\left (- x + e + 3 \right )}^{2}\right ) e^{2 x} + \left (72 x^{2} - 6 x \log {\left (x \right )}^{2} + 144 x \log {\left (- x + e + 3 \right )} - 6 \log {\left (x \right )}^{2} \log {\left (- x + e + 3 \right )} + 72 \log {\left (- x + e + 3 \right )}^{2}\right ) e^{x} + 3 \log {\left (x \right )}^{4} + 432 \log {\left (- x + e + 3 \right )}^{2} \] Input:

integrate((((6*exp(1)*x-6*x**2+18*x)*exp(x)**2+(72*exp(1)*x-72*x**2+216*x) 
*exp(x))*ln(3-x+exp(1))**2+((-6*exp(1)*x+6*x**2-18*x)*exp(x)*ln(x)**2+((-1 
2*exp(1)+12*x-36)*exp(x)-144*exp(1)+144*x-432)*ln(x)+((12*x**2+6*x)*exp(1) 
-12*x**3+30*x**2+12*x)*exp(x)**2+((144*x**2+144*x)*exp(1)-144*x**3+288*x** 
2+288*x)*exp(x)+864*exp(1)*x-864*x**2+1728*x)*ln(3-x+exp(1))+(12*exp(1)-12 
*x+36)*ln(x)**3+(((-6*x**2-6*x)*exp(1)+6*x**3-12*x**2-12*x)*exp(x)-72*exp( 
1)*x+72*x**2-144*x)*ln(x)**2+((-12*exp(1)*x+12*x**2-36*x)*exp(x)-144*exp(1 
)*x+144*x**2-432*x)*ln(x)+((6*x**3+6*x**2)*exp(1)-6*x**4+12*x**3+12*x**2)* 
exp(x)**2+((72*x**3+144*x**2)*exp(1)-72*x**4+72*x**3+288*x**2)*exp(x)+864* 
x**2*exp(1)-864*x**3+1728*x**2)/(exp(1)*x-x**2+3*x),x)
 

Output:

432*x**2 - 72*x*log(x)**2 + (864*x - 72*log(x)**2)*log(-x + E + 3) + (3*x* 
*2 + 6*x*log(-x + E + 3) + 3*log(-x + E + 3)**2)*exp(2*x) + (72*x**2 - 6*x 
*log(x)**2 + 144*x*log(-x + E + 3) - 6*log(x)**2*log(-x + E + 3) + 72*log( 
-x + E + 3)**2)*exp(x) + 3*log(x)**4 + 432*log(-x + E + 3)**2
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 269 vs. \(2 (26) = 52\).

Time = 0.15 (sec) , antiderivative size = 269, normalized size of antiderivative = 10.76 \[ \int \frac {1728 x^2+864 e x^2-864 x^3+e^{2 x} \left (12 x^2+12 x^3-6 x^4+e \left (6 x^2+6 x^3\right )\right )+e^x \left (288 x^2+72 x^3-72 x^4+e \left (144 x^2+72 x^3\right )\right )+\left (e^x \left (216 x+72 e x-72 x^2\right )+e^{2 x} \left (18 x+6 e x-6 x^2\right )\right ) \log ^2(3+e-x)+\left (-432 x-144 e x+144 x^2+e^x \left (-36 x-12 e x+12 x^2\right )\right ) \log (x)+\left (-144 x-72 e x+72 x^2+e^x \left (-12 x-12 x^2+6 x^3+e \left (-6 x-6 x^2\right )\right )\right ) \log ^2(x)+(36+12 e-12 x) \log ^3(x)+\log (3+e-x) \left (1728 x+864 e x-864 x^2+e^{2 x} \left (12 x+30 x^2-12 x^3+e \left (6 x+12 x^2\right )\right )+e^x \left (288 x+288 x^2-144 x^3+e \left (144 x+144 x^2\right )\right )+\left (-432-144 e+144 x+e^x (-36-12 e+12 x)\right ) \log (x)+e^x \left (-18 x-6 e x+6 x^2\right ) \log ^2(x)\right )}{3 x+e x-x^2} \, dx=3 \, \log \left (x\right )^{4} + 3 \, x^{2} e^{\left (2 \, x\right )} - 432 \, {\left (e + 3\right )} \log \left (x - e - 3\right )^{2} - 72 \, x \log \left (x\right )^{2} - 864 \, e \log \left (x - e - 3\right ) \log \left (-x + e + 3\right ) + 3 \, {\left (e^{\left (2 \, x\right )} + 24 \, e^{x}\right )} \log \left (-x + e + 3\right )^{2} + 432 \, x^{2} + 864 \, x {\left (e + 3\right )} - 864 \, {\left ({\left (e + 3\right )} \log \left (x - e - 3\right ) + x\right )} e + 432 \, {\left (2 \, \log \left (x - e - 3\right ) \log \left (-x + e + 3\right ) - \log \left (-x + e + 3\right )^{2}\right )} e - 6 \, {\left (x \log \left (x\right )^{2} - 12 \, x^{2}\right )} e^{x} + 864 \, {\left (e^{2} + 6 \, e + 9\right )} \log \left (x - e - 3\right ) - 2592 \, {\left (e + 3\right )} \log \left (x - e - 3\right ) + 6 \, {\left (x e^{\left (2 \, x\right )} - {\left (\log \left (x\right )^{2} - 24 \, x\right )} e^{x} - 12 \, \log \left (x\right )^{2}\right )} \log \left (-x + e + 3\right ) + 864 \, {\left ({\left (e + 3\right )} \log \left (x - e - 3\right ) + x\right )} \log \left (-x + e + 3\right ) - 864 \, \log \left (-x + e + 3\right )^{2} - 2592 \, x \] Input:

integrate((((6*exp(1)*x-6*x^2+18*x)*exp(x)^2+(72*exp(1)*x-72*x^2+216*x)*ex 
p(x))*log(3-x+exp(1))^2+((-6*exp(1)*x+6*x^2-18*x)*exp(x)*log(x)^2+((-12*ex 
p(1)+12*x-36)*exp(x)-144*exp(1)+144*x-432)*log(x)+((12*x^2+6*x)*exp(1)-12* 
x^3+30*x^2+12*x)*exp(x)^2+((144*x^2+144*x)*exp(1)-144*x^3+288*x^2+288*x)*e 
xp(x)+864*exp(1)*x-864*x^2+1728*x)*log(3-x+exp(1))+(12*exp(1)-12*x+36)*log 
(x)^3+(((-6*x^2-6*x)*exp(1)+6*x^3-12*x^2-12*x)*exp(x)-72*exp(1)*x+72*x^2-1 
44*x)*log(x)^2+((-12*exp(1)*x+12*x^2-36*x)*exp(x)-144*exp(1)*x+144*x^2-432 
*x)*log(x)+((6*x^3+6*x^2)*exp(1)-6*x^4+12*x^3+12*x^2)*exp(x)^2+((72*x^3+14 
4*x^2)*exp(1)-72*x^4+72*x^3+288*x^2)*exp(x)+864*x^2*exp(1)-864*x^3+1728*x^ 
2)/(exp(1)*x-x^2+3*x),x, algorithm="maxima")
 

Output:

3*log(x)^4 + 3*x^2*e^(2*x) - 432*(e + 3)*log(x - e - 3)^2 - 72*x*log(x)^2 
- 864*e*log(x - e - 3)*log(-x + e + 3) + 3*(e^(2*x) + 24*e^x)*log(-x + e + 
 3)^2 + 432*x^2 + 864*x*(e + 3) - 864*((e + 3)*log(x - e - 3) + x)*e + 432 
*(2*log(x - e - 3)*log(-x + e + 3) - log(-x + e + 3)^2)*e - 6*(x*log(x)^2 
- 12*x^2)*e^x + 864*(e^2 + 6*e + 9)*log(x - e - 3) - 2592*(e + 3)*log(x - 
e - 3) + 6*(x*e^(2*x) - (log(x)^2 - 24*x)*e^x - 12*log(x)^2)*log(-x + e + 
3) + 864*((e + 3)*log(x - e - 3) + x)*log(-x + e + 3) - 864*log(-x + e + 3 
)^2 - 2592*x
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 173 vs. \(2 (26) = 52\).

Time = 0.16 (sec) , antiderivative size = 173, normalized size of antiderivative = 6.92 \[ \int \frac {1728 x^2+864 e x^2-864 x^3+e^{2 x} \left (12 x^2+12 x^3-6 x^4+e \left (6 x^2+6 x^3\right )\right )+e^x \left (288 x^2+72 x^3-72 x^4+e \left (144 x^2+72 x^3\right )\right )+\left (e^x \left (216 x+72 e x-72 x^2\right )+e^{2 x} \left (18 x+6 e x-6 x^2\right )\right ) \log ^2(3+e-x)+\left (-432 x-144 e x+144 x^2+e^x \left (-36 x-12 e x+12 x^2\right )\right ) \log (x)+\left (-144 x-72 e x+72 x^2+e^x \left (-12 x-12 x^2+6 x^3+e \left (-6 x-6 x^2\right )\right )\right ) \log ^2(x)+(36+12 e-12 x) \log ^3(x)+\log (3+e-x) \left (1728 x+864 e x-864 x^2+e^{2 x} \left (12 x+30 x^2-12 x^3+e \left (6 x+12 x^2\right )\right )+e^x \left (288 x+288 x^2-144 x^3+e \left (144 x+144 x^2\right )\right )+\left (-432-144 e+144 x+e^x (-36-12 e+12 x)\right ) \log (x)+e^x \left (-18 x-6 e x+6 x^2\right ) \log ^2(x)\right )}{3 x+e x-x^2} \, dx=-6 \, x e^{x} \log \left (x\right )^{2} + 3 \, \log \left (x\right )^{4} - 6 \, e^{x} \log \left (x\right )^{2} \log \left (-x + e + 3\right ) + 3 \, x^{2} e^{\left (2 \, x\right )} + 72 \, x^{2} e^{x} - 72 \, x \log \left (x\right )^{2} + 6 \, x e^{\left (2 \, x\right )} \log \left (-x + e + 3\right ) + 144 \, x e^{x} \log \left (-x + e + 3\right ) - 72 \, \log \left (x\right )^{2} \log \left (-x + e + 3\right ) + 3 \, e^{\left (2 \, x\right )} \log \left (-x + e + 3\right )^{2} + 72 \, e^{x} \log \left (-x + e + 3\right )^{2} + 432 \, x^{2} - 432 \, \log \left (x - e - 3\right )^{2} + 864 \, x \log \left (-x + e + 3\right ) + 864 \, \log \left (x - e - 3\right ) \log \left (-x + e + 3\right ) \] Input:

integrate((((6*exp(1)*x-6*x^2+18*x)*exp(x)^2+(72*exp(1)*x-72*x^2+216*x)*ex 
p(x))*log(3-x+exp(1))^2+((-6*exp(1)*x+6*x^2-18*x)*exp(x)*log(x)^2+((-12*ex 
p(1)+12*x-36)*exp(x)-144*exp(1)+144*x-432)*log(x)+((12*x^2+6*x)*exp(1)-12* 
x^3+30*x^2+12*x)*exp(x)^2+((144*x^2+144*x)*exp(1)-144*x^3+288*x^2+288*x)*e 
xp(x)+864*exp(1)*x-864*x^2+1728*x)*log(3-x+exp(1))+(12*exp(1)-12*x+36)*log 
(x)^3+(((-6*x^2-6*x)*exp(1)+6*x^3-12*x^2-12*x)*exp(x)-72*exp(1)*x+72*x^2-1 
44*x)*log(x)^2+((-12*exp(1)*x+12*x^2-36*x)*exp(x)-144*exp(1)*x+144*x^2-432 
*x)*log(x)+((6*x^3+6*x^2)*exp(1)-6*x^4+12*x^3+12*x^2)*exp(x)^2+((72*x^3+14 
4*x^2)*exp(1)-72*x^4+72*x^3+288*x^2)*exp(x)+864*x^2*exp(1)-864*x^3+1728*x^ 
2)/(exp(1)*x-x^2+3*x),x, algorithm="giac")
 

Output:

-6*x*e^x*log(x)^2 + 3*log(x)^4 - 6*e^x*log(x)^2*log(-x + e + 3) + 3*x^2*e^ 
(2*x) + 72*x^2*e^x - 72*x*log(x)^2 + 6*x*e^(2*x)*log(-x + e + 3) + 144*x*e 
^x*log(-x + e + 3) - 72*log(x)^2*log(-x + e + 3) + 3*e^(2*x)*log(-x + e + 
3)^2 + 72*e^x*log(-x + e + 3)^2 + 432*x^2 - 432*log(x - e - 3)^2 + 864*x*l 
og(-x + e + 3) + 864*log(x - e - 3)*log(-x + e + 3)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {1728 x^2+864 e x^2-864 x^3+e^{2 x} \left (12 x^2+12 x^3-6 x^4+e \left (6 x^2+6 x^3\right )\right )+e^x \left (288 x^2+72 x^3-72 x^4+e \left (144 x^2+72 x^3\right )\right )+\left (e^x \left (216 x+72 e x-72 x^2\right )+e^{2 x} \left (18 x+6 e x-6 x^2\right )\right ) \log ^2(3+e-x)+\left (-432 x-144 e x+144 x^2+e^x \left (-36 x-12 e x+12 x^2\right )\right ) \log (x)+\left (-144 x-72 e x+72 x^2+e^x \left (-12 x-12 x^2+6 x^3+e \left (-6 x-6 x^2\right )\right )\right ) \log ^2(x)+(36+12 e-12 x) \log ^3(x)+\log (3+e-x) \left (1728 x+864 e x-864 x^2+e^{2 x} \left (12 x+30 x^2-12 x^3+e \left (6 x+12 x^2\right )\right )+e^x \left (288 x+288 x^2-144 x^3+e \left (144 x+144 x^2\right )\right )+\left (-432-144 e+144 x+e^x (-36-12 e+12 x)\right ) \log (x)+e^x \left (-18 x-6 e x+6 x^2\right ) \log ^2(x)\right )}{3 x+e x-x^2} \, dx=\int \frac {{\mathrm {e}}^{2\,x}\,\left (\mathrm {e}\,\left (6\,x^3+6\,x^2\right )+12\,x^2+12\,x^3-6\,x^4\right )+\ln \left (\mathrm {e}-x+3\right )\,\left (1728\,x+{\mathrm {e}}^x\,\left (288\,x+\mathrm {e}\,\left (144\,x^2+144\,x\right )+288\,x^2-144\,x^3\right )+864\,x\,\mathrm {e}+{\mathrm {e}}^{2\,x}\,\left (12\,x+\mathrm {e}\,\left (12\,x^2+6\,x\right )+30\,x^2-12\,x^3\right )-\ln \left (x\right )\,\left (144\,\mathrm {e}-144\,x+{\mathrm {e}}^x\,\left (12\,\mathrm {e}-12\,x+36\right )+432\right )-864\,x^2-{\mathrm {e}}^x\,{\ln \left (x\right )}^2\,\left (18\,x+6\,x\,\mathrm {e}-6\,x^2\right )\right )+{\ln \left (\mathrm {e}-x+3\right )}^2\,\left ({\mathrm {e}}^{2\,x}\,\left (18\,x+6\,x\,\mathrm {e}-6\,x^2\right )+{\mathrm {e}}^x\,\left (216\,x+72\,x\,\mathrm {e}-72\,x^2\right )\right )-{\ln \left (x\right )}^2\,\left (144\,x+{\mathrm {e}}^x\,\left (12\,x+\mathrm {e}\,\left (6\,x^2+6\,x\right )+12\,x^2-6\,x^3\right )+72\,x\,\mathrm {e}-72\,x^2\right )+864\,x^2\,\mathrm {e}+{\ln \left (x\right )}^3\,\left (12\,\mathrm {e}-12\,x+36\right )+{\mathrm {e}}^x\,\left (\mathrm {e}\,\left (72\,x^3+144\,x^2\right )+288\,x^2+72\,x^3-72\,x^4\right )-\ln \left (x\right )\,\left (432\,x+144\,x\,\mathrm {e}-144\,x^2+{\mathrm {e}}^x\,\left (36\,x+12\,x\,\mathrm {e}-12\,x^2\right )\right )+1728\,x^2-864\,x^3}{3\,x+x\,\mathrm {e}-x^2} \,d x \] Input:

int((exp(2*x)*(exp(1)*(6*x^2 + 6*x^3) + 12*x^2 + 12*x^3 - 6*x^4) + log(exp 
(1) - x + 3)*(1728*x + exp(x)*(288*x + exp(1)*(144*x + 144*x^2) + 288*x^2 
- 144*x^3) + 864*x*exp(1) + exp(2*x)*(12*x + exp(1)*(6*x + 12*x^2) + 30*x^ 
2 - 12*x^3) - log(x)*(144*exp(1) - 144*x + exp(x)*(12*exp(1) - 12*x + 36) 
+ 432) - 864*x^2 - exp(x)*log(x)^2*(18*x + 6*x*exp(1) - 6*x^2)) + log(exp( 
1) - x + 3)^2*(exp(2*x)*(18*x + 6*x*exp(1) - 6*x^2) + exp(x)*(216*x + 72*x 
*exp(1) - 72*x^2)) - log(x)^2*(144*x + exp(x)*(12*x + exp(1)*(6*x + 6*x^2) 
 + 12*x^2 - 6*x^3) + 72*x*exp(1) - 72*x^2) + 864*x^2*exp(1) + log(x)^3*(12 
*exp(1) - 12*x + 36) + exp(x)*(exp(1)*(144*x^2 + 72*x^3) + 288*x^2 + 72*x^ 
3 - 72*x^4) - log(x)*(432*x + 144*x*exp(1) - 144*x^2 + exp(x)*(36*x + 12*x 
*exp(1) - 12*x^2)) + 1728*x^2 - 864*x^3)/(3*x + x*exp(1) - x^2),x)
 

Output:

int((exp(2*x)*(exp(1)*(6*x^2 + 6*x^3) + 12*x^2 + 12*x^3 - 6*x^4) + log(exp 
(1) - x + 3)*(1728*x + exp(x)*(288*x + exp(1)*(144*x + 144*x^2) + 288*x^2 
- 144*x^3) + 864*x*exp(1) + exp(2*x)*(12*x + exp(1)*(6*x + 12*x^2) + 30*x^ 
2 - 12*x^3) - log(x)*(144*exp(1) - 144*x + exp(x)*(12*exp(1) - 12*x + 36) 
+ 432) - 864*x^2 - exp(x)*log(x)^2*(18*x + 6*x*exp(1) - 6*x^2)) + log(exp( 
1) - x + 3)^2*(exp(2*x)*(18*x + 6*x*exp(1) - 6*x^2) + exp(x)*(216*x + 72*x 
*exp(1) - 72*x^2)) - log(x)^2*(144*x + exp(x)*(12*x + exp(1)*(6*x + 6*x^2) 
 + 12*x^2 - 6*x^3) + 72*x*exp(1) - 72*x^2) + 864*x^2*exp(1) + log(x)^3*(12 
*exp(1) - 12*x + 36) + exp(x)*(exp(1)*(144*x^2 + 72*x^3) + 288*x^2 + 72*x^ 
3 - 72*x^4) - log(x)*(432*x + 144*x*exp(1) - 144*x^2 + exp(x)*(36*x + 12*x 
*exp(1) - 12*x^2)) + 1728*x^2 - 864*x^3)/(3*x + x*exp(1) - x^2), x)
 

Reduce [B] (verification not implemented)

Time = 0.24 (sec) , antiderivative size = 155, normalized size of antiderivative = 6.20 \[ \int \frac {1728 x^2+864 e x^2-864 x^3+e^{2 x} \left (12 x^2+12 x^3-6 x^4+e \left (6 x^2+6 x^3\right )\right )+e^x \left (288 x^2+72 x^3-72 x^4+e \left (144 x^2+72 x^3\right )\right )+\left (e^x \left (216 x+72 e x-72 x^2\right )+e^{2 x} \left (18 x+6 e x-6 x^2\right )\right ) \log ^2(3+e-x)+\left (-432 x-144 e x+144 x^2+e^x \left (-36 x-12 e x+12 x^2\right )\right ) \log (x)+\left (-144 x-72 e x+72 x^2+e^x \left (-12 x-12 x^2+6 x^3+e \left (-6 x-6 x^2\right )\right )\right ) \log ^2(x)+(36+12 e-12 x) \log ^3(x)+\log (3+e-x) \left (1728 x+864 e x-864 x^2+e^{2 x} \left (12 x+30 x^2-12 x^3+e \left (6 x+12 x^2\right )\right )+e^x \left (288 x+288 x^2-144 x^3+e \left (144 x+144 x^2\right )\right )+\left (-432-144 e+144 x+e^x (-36-12 e+12 x)\right ) \log (x)+e^x \left (-18 x-6 e x+6 x^2\right ) \log ^2(x)\right )}{3 x+e x-x^2} \, dx=3 e^{2 x} \mathrm {log}\left (e -x +3\right )^{2}+6 e^{2 x} \mathrm {log}\left (e -x +3\right ) x +3 e^{2 x} x^{2}+72 e^{x} \mathrm {log}\left (e -x +3\right )^{2}-6 e^{x} \mathrm {log}\left (e -x +3\right ) \mathrm {log}\left (x \right )^{2}+144 e^{x} \mathrm {log}\left (e -x +3\right ) x -6 e^{x} \mathrm {log}\left (x \right )^{2} x +72 e^{x} x^{2}+432 \mathrm {log}\left (e -x +3\right )^{2}-72 \,\mathrm {log}\left (e -x +3\right ) \mathrm {log}\left (x \right )^{2}+864 \,\mathrm {log}\left (e -x +3\right ) x +3 \mathrm {log}\left (x \right )^{4}-72 \mathrm {log}\left (x \right )^{2} x +432 x^{2} \] Input:

int((((6*exp(1)*x-6*x^2+18*x)*exp(x)^2+(72*exp(1)*x-72*x^2+216*x)*exp(x))* 
log(3-x+exp(1))^2+((-6*exp(1)*x+6*x^2-18*x)*exp(x)*log(x)^2+((-12*exp(1)+1 
2*x-36)*exp(x)-144*exp(1)+144*x-432)*log(x)+((12*x^2+6*x)*exp(1)-12*x^3+30 
*x^2+12*x)*exp(x)^2+((144*x^2+144*x)*exp(1)-144*x^3+288*x^2+288*x)*exp(x)+ 
864*exp(1)*x-864*x^2+1728*x)*log(3-x+exp(1))+(12*exp(1)-12*x+36)*log(x)^3+ 
(((-6*x^2-6*x)*exp(1)+6*x^3-12*x^2-12*x)*exp(x)-72*exp(1)*x+72*x^2-144*x)* 
log(x)^2+((-12*exp(1)*x+12*x^2-36*x)*exp(x)-144*exp(1)*x+144*x^2-432*x)*lo 
g(x)+((6*x^3+6*x^2)*exp(1)-6*x^4+12*x^3+12*x^2)*exp(x)^2+((72*x^3+144*x^2) 
*exp(1)-72*x^4+72*x^3+288*x^2)*exp(x)+864*x^2*exp(1)-864*x^3+1728*x^2)/(ex 
p(1)*x-x^2+3*x),x)
 

Output:

3*(e**(2*x)*log(e - x + 3)**2 + 2*e**(2*x)*log(e - x + 3)*x + e**(2*x)*x** 
2 + 24*e**x*log(e - x + 3)**2 - 2*e**x*log(e - x + 3)*log(x)**2 + 48*e**x* 
log(e - x + 3)*x - 2*e**x*log(x)**2*x + 24*e**x*x**2 + 144*log(e - x + 3)* 
*2 - 24*log(e - x + 3)*log(x)**2 + 288*log(e - x + 3)*x + log(x)**4 - 24*l 
og(x)**2*x + 144*x**2)