\(\int \frac {3+2 x-36 x^3-12 x^4+e^4 (-1+12 x^3)+(-36 x^3+12 e^4 x^3-12 x^4) \log (3 x-e^4 x+x^2)+(-9 x^3+3 e^4 x^3-3 x^4) \log ^2(3 x-e^4 x+x^2)}{-12 x+4 e^4 x-4 x^2+(-12 x+4 e^4 x-4 x^2) \log (3 x-e^4 x+x^2)+(-3 x+e^4 x-x^2) \log ^2(3 x-e^4 x+x^2)} \, dx\) [2574]

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

Optimal result

Integrand size = 175, antiderivative size = 19 \[ \int \frac {3+2 x-36 x^3-12 x^4+e^4 \left (-1+12 x^3\right )+\left (-36 x^3+12 e^4 x^3-12 x^4\right ) \log \left (3 x-e^4 x+x^2\right )+\left (-9 x^3+3 e^4 x^3-3 x^4\right ) \log ^2\left (3 x-e^4 x+x^2\right )}{-12 x+4 e^4 x-4 x^2+\left (-12 x+4 e^4 x-4 x^2\right ) \log \left (3 x-e^4 x+x^2\right )+\left (-3 x+e^4 x-x^2\right ) \log ^2\left (3 x-e^4 x+x^2\right )} \, dx=x^3+\frac {1}{2+\log \left (x \left (3-e^4+x\right )\right )} \] Output:

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

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00 \[ \int \frac {3+2 x-36 x^3-12 x^4+e^4 \left (-1+12 x^3\right )+\left (-36 x^3+12 e^4 x^3-12 x^4\right ) \log \left (3 x-e^4 x+x^2\right )+\left (-9 x^3+3 e^4 x^3-3 x^4\right ) \log ^2\left (3 x-e^4 x+x^2\right )}{-12 x+4 e^4 x-4 x^2+\left (-12 x+4 e^4 x-4 x^2\right ) \log \left (3 x-e^4 x+x^2\right )+\left (-3 x+e^4 x-x^2\right ) \log ^2\left (3 x-e^4 x+x^2\right )} \, dx=x^3+\frac {1}{2+\log \left (x \left (3-e^4+x\right )\right )} \] Input:

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

Output:

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

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 {-12 x^4-36 x^3+e^4 \left (12 x^3-1\right )+\left (-3 x^4+3 e^4 x^3-9 x^3\right ) \log ^2\left (x^2-e^4 x+3 x\right )+\left (-12 x^4+12 e^4 x^3-36 x^3\right ) \log \left (x^2-e^4 x+3 x\right )+2 x+3}{-4 x^2+\left (-x^2+e^4 x-3 x\right ) \log ^2\left (x^2-e^4 x+3 x\right )+\left (-4 x^2+4 e^4 x-12 x\right ) \log \left (x^2-e^4 x+3 x\right )+4 e^4 x-12 x} \, dx\)

\(\Big \downarrow \) 6

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

\(\Big \downarrow \) 7292

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

\(\Big \downarrow \) 7293

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

\(\Big \downarrow \) 2009

\(\displaystyle 12 \left (3-e^4\right )^2 \int \frac {1}{\left (\log \left (x \left (x-e^4+3\right )\right )+2\right )^2}dx+12 e^4 \left (3-e^4\right ) \int \frac {1}{\left (\log \left (x \left (x-e^4+3\right )\right )+2\right )^2}dx-36 \left (3-e^4\right ) \int \frac {1}{\left (\log \left (x \left (x-e^4+3\right )\right )+2\right )^2}dx+\frac {e^4 \left (325-324 e^4+108 e^8-12 e^{12}\right ) \int \frac {1}{\left (-x+e^4-3\right ) \left (\log \left (x \left (x-e^4+3\right )\right )+2\right )^2}dx}{3-e^4}+12 \left (3-e^4\right )^3 \int \frac {1}{\left (-x+e^4-3\right ) \left (\log \left (x \left (x-e^4+3\right )\right )+2\right )^2}dx-36 \left (3-e^4\right )^2 \int \frac {1}{\left (-x+e^4-3\right ) \left (\log \left (x \left (x-e^4+3\right )\right )+2\right )^2}dx-\frac {3 \int \frac {1}{\left (-x+e^4-3\right ) \left (\log \left (x \left (x-e^4+3\right )\right )+2\right )^2}dx}{3-e^4}+2 \int \frac {1}{\left (-x+e^4-3\right ) \left (\log \left (x \left (x-e^4+3\right )\right )+2\right )^2}dx+\frac {e^4 \int \frac {1}{x \left (\log \left (x \left (x-e^4+3\right )\right )+2\right )^2}dx}{3-e^4}-\frac {3 \int \frac {1}{x \left (\log \left (x \left (x-e^4+3\right )\right )+2\right )^2}dx}{3-e^4}-12 \left (3-e^4\right ) \int \frac {x}{\left (\log \left (x \left (x-e^4+3\right )\right )+2\right )^2}dx-12 e^4 \int \frac {x}{\left (\log \left (x \left (x-e^4+3\right )\right )+2\right )^2}dx+36 \int \frac {x}{\left (\log \left (x \left (x-e^4+3\right )\right )+2\right )^2}dx+x^3\)

Input:

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

Output:

$Aborted
 
Maple [A] (verified)

Time = 1.31 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.16

method result size
risch \(x^{3}+\frac {1}{\ln \left (-x \,{\mathrm e}^{4}+x^{2}+3 x \right )+2}\) \(22\)
parallelrisch \(\frac {\ln \left (-x \left ({\mathrm e}^{4}-x -3\right )\right ) x^{3}+1+2 x^{3}}{\ln \left (-x \left ({\mathrm e}^{4}-x -3\right )\right )+2}\) \(39\)
norman \(\frac {x^{3} \ln \left (-x \,{\mathrm e}^{4}+x^{2}+3 x \right )+2 x^{3}+1}{\ln \left (-x \,{\mathrm e}^{4}+x^{2}+3 x \right )+2}\) \(43\)

Input:

int(((3*x^3*exp(4)-3*x^4-9*x^3)*ln(-x*exp(4)+x^2+3*x)^2+(12*x^3*exp(4)-12* 
x^4-36*x^3)*ln(-x*exp(4)+x^2+3*x)+(12*x^3-1)*exp(4)-12*x^4-36*x^3+2*x+3)/( 
(x*exp(4)-x^2-3*x)*ln(-x*exp(4)+x^2+3*x)^2+(4*x*exp(4)-4*x^2-12*x)*ln(-x*e 
xp(4)+x^2+3*x)+4*x*exp(4)-4*x^2-12*x),x,method=_RETURNVERBOSE)
 

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 42 vs. \(2 (18) = 36\).

Time = 0.11 (sec) , antiderivative size = 42, normalized size of antiderivative = 2.21 \[ \int \frac {3+2 x-36 x^3-12 x^4+e^4 \left (-1+12 x^3\right )+\left (-36 x^3+12 e^4 x^3-12 x^4\right ) \log \left (3 x-e^4 x+x^2\right )+\left (-9 x^3+3 e^4 x^3-3 x^4\right ) \log ^2\left (3 x-e^4 x+x^2\right )}{-12 x+4 e^4 x-4 x^2+\left (-12 x+4 e^4 x-4 x^2\right ) \log \left (3 x-e^4 x+x^2\right )+\left (-3 x+e^4 x-x^2\right ) \log ^2\left (3 x-e^4 x+x^2\right )} \, dx=\frac {x^{3} \log \left (x^{2} - x e^{4} + 3 \, x\right ) + 2 \, x^{3} + 1}{\log \left (x^{2} - x e^{4} + 3 \, x\right ) + 2} \] Input:

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

Output:

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

Sympy [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 19, normalized size of antiderivative = 1.00 \[ \int \frac {3+2 x-36 x^3-12 x^4+e^4 \left (-1+12 x^3\right )+\left (-36 x^3+12 e^4 x^3-12 x^4\right ) \log \left (3 x-e^4 x+x^2\right )+\left (-9 x^3+3 e^4 x^3-3 x^4\right ) \log ^2\left (3 x-e^4 x+x^2\right )}{-12 x+4 e^4 x-4 x^2+\left (-12 x+4 e^4 x-4 x^2\right ) \log \left (3 x-e^4 x+x^2\right )+\left (-3 x+e^4 x-x^2\right ) \log ^2\left (3 x-e^4 x+x^2\right )} \, dx=x^{3} + \frac {1}{\log {\left (x^{2} - x e^{4} + 3 x \right )} + 2} \] Input:

integrate(((3*x**3*exp(4)-3*x**4-9*x**3)*ln(-x*exp(4)+x**2+3*x)**2+(12*x** 
3*exp(4)-12*x**4-36*x**3)*ln(-x*exp(4)+x**2+3*x)+(12*x**3-1)*exp(4)-12*x** 
4-36*x**3+2*x+3)/((x*exp(4)-x**2-3*x)*ln(-x*exp(4)+x**2+3*x)**2+(4*x*exp(4 
)-4*x**2-12*x)*ln(-x*exp(4)+x**2+3*x)+4*x*exp(4)-4*x**2-12*x),x)
 

Output:

x**3 + 1/(log(x**2 - x*exp(4) + 3*x) + 2)
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 40 vs. \(2 (18) = 36\).

Time = 0.08 (sec) , antiderivative size = 40, normalized size of antiderivative = 2.11 \[ \int \frac {3+2 x-36 x^3-12 x^4+e^4 \left (-1+12 x^3\right )+\left (-36 x^3+12 e^4 x^3-12 x^4\right ) \log \left (3 x-e^4 x+x^2\right )+\left (-9 x^3+3 e^4 x^3-3 x^4\right ) \log ^2\left (3 x-e^4 x+x^2\right )}{-12 x+4 e^4 x-4 x^2+\left (-12 x+4 e^4 x-4 x^2\right ) \log \left (3 x-e^4 x+x^2\right )+\left (-3 x+e^4 x-x^2\right ) \log ^2\left (3 x-e^4 x+x^2\right )} \, dx=\frac {x^{3} \log \left (x - e^{4} + 3\right ) + x^{3} \log \left (x\right ) + 2 \, x^{3} + 1}{\log \left (x - e^{4} + 3\right ) + \log \left (x\right ) + 2} \] Input:

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

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 42 vs. \(2 (18) = 36\).

Time = 0.21 (sec) , antiderivative size = 42, normalized size of antiderivative = 2.21 \[ \int \frac {3+2 x-36 x^3-12 x^4+e^4 \left (-1+12 x^3\right )+\left (-36 x^3+12 e^4 x^3-12 x^4\right ) \log \left (3 x-e^4 x+x^2\right )+\left (-9 x^3+3 e^4 x^3-3 x^4\right ) \log ^2\left (3 x-e^4 x+x^2\right )}{-12 x+4 e^4 x-4 x^2+\left (-12 x+4 e^4 x-4 x^2\right ) \log \left (3 x-e^4 x+x^2\right )+\left (-3 x+e^4 x-x^2\right ) \log ^2\left (3 x-e^4 x+x^2\right )} \, dx=\frac {x^{3} \log \left (x^{2} - x e^{4} + 3 \, x\right ) + 2 \, x^{3} + 1}{\log \left (x^{2} - x e^{4} + 3 \, x\right ) + 2} \] Input:

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

Output:

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

Mupad [B] (verification not implemented)

Time = 3.97 (sec) , antiderivative size = 21, normalized size of antiderivative = 1.11 \[ \int \frac {3+2 x-36 x^3-12 x^4+e^4 \left (-1+12 x^3\right )+\left (-36 x^3+12 e^4 x^3-12 x^4\right ) \log \left (3 x-e^4 x+x^2\right )+\left (-9 x^3+3 e^4 x^3-3 x^4\right ) \log ^2\left (3 x-e^4 x+x^2\right )}{-12 x+4 e^4 x-4 x^2+\left (-12 x+4 e^4 x-4 x^2\right ) \log \left (3 x-e^4 x+x^2\right )+\left (-3 x+e^4 x-x^2\right ) \log ^2\left (3 x-e^4 x+x^2\right )} \, dx=\frac {1}{\ln \left (3\,x-x\,{\mathrm {e}}^4+x^2\right )+2}+x^3 \] Input:

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

Output:

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

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 62, normalized size of antiderivative = 3.26 \[ \int \frac {3+2 x-36 x^3-12 x^4+e^4 \left (-1+12 x^3\right )+\left (-36 x^3+12 e^4 x^3-12 x^4\right ) \log \left (3 x-e^4 x+x^2\right )+\left (-9 x^3+3 e^4 x^3-3 x^4\right ) \log ^2\left (3 x-e^4 x+x^2\right )}{-12 x+4 e^4 x-4 x^2+\left (-12 x+4 e^4 x-4 x^2\right ) \log \left (3 x-e^4 x+x^2\right )+\left (-3 x+e^4 x-x^2\right ) \log ^2\left (3 x-e^4 x+x^2\right )} \, dx=\frac {2 \,\mathrm {log}\left (-e^{4} x +x^{2}+3 x \right ) x^{3}-\mathrm {log}\left (-e^{4} x +x^{2}+3 x \right )+4 x^{3}}{2 \,\mathrm {log}\left (-e^{4} x +x^{2}+3 x \right )+4} \] Input:

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

Output:

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