\(\int \frac {4 e^6 x+2 x^3-4 x^5+2 x^7+e^2 (1-3 x^2)+e^4 (-2 x^2-6 x^6)}{x^2-2 x^4+4 e^8 x^4+x^6+e^4 (4 x^3-4 x^5)} \, dx\) [720]

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

Optimal result

Integrand size = 86, antiderivative size = 31 \[ \int \frac {4 e^6 x+2 x^3-4 x^5+2 x^7+e^2 \left (1-3 x^2\right )+e^4 \left (-2 x^2-6 x^6\right )}{x^2-2 x^4+4 e^8 x^4+x^6+e^4 \left (4 x^3-4 x^5\right )} \, dx=\frac {1-\frac {e^2}{x}-x^4}{1+2 e^4 x-x^2} \] Output:

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

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.84 \[ \int \frac {4 e^6 x+2 x^3-4 x^5+2 x^7+e^2 \left (1-3 x^2\right )+e^4 \left (-2 x^2-6 x^6\right )}{x^2-2 x^4+4 e^8 x^4+x^6+e^4 \left (4 x^3-4 x^5\right )} \, dx=\frac {e^2+2 e^4 x^2+8 e^{12} x^2-4 e^8 x \left (-1+x^2\right )+x^3 \left (-1+x^2\right )}{x \left (-1-2 e^4 x+x^2\right )} \] Input:

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

Output:

(E^2 + 2*E^4*x^2 + 8*E^12*x^2 - 4*E^8*x*(-1 + x^2) + x^3*(-1 + x^2))/(x*(- 
1 - 2*E^4*x + x^2))
 

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(65\) vs. \(2(31)=62\).

Time = 0.50 (sec) , antiderivative size = 65, normalized size of antiderivative = 2.10, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.047, Rules used = {6, 2026, 2462, 2009}

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 {2 x^7-4 x^5+2 x^3+e^2 \left (1-3 x^2\right )+e^4 \left (-6 x^6-2 x^2\right )+4 e^6 x}{x^6+4 e^8 x^4-2 x^4+x^2+e^4 \left (4 x^3-4 x^5\right )} \, dx\)

\(\Big \downarrow \) 6

\(\displaystyle \int \frac {2 x^7-4 x^5+2 x^3+e^2 \left (1-3 x^2\right )+e^4 \left (-6 x^6-2 x^2\right )+4 e^6 x}{x^6+\left (4 e^8-2\right ) x^4+x^2+e^4 \left (4 x^3-4 x^5\right )}dx\)

\(\Big \downarrow \) 2026

\(\displaystyle \int \frac {2 x^7-4 x^5+2 x^3+e^2 \left (1-3 x^2\right )+e^4 \left (-6 x^6-2 x^2\right )+4 e^6 x}{x^2 \left (x^4-4 e^4 x^3-2 \left (1-2 e^8\right ) x^2+4 e^4 x+1\right )}dx\)

\(\Big \downarrow \) 2462

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

\(\Big \downarrow \) 2009

\(\displaystyle x^2+\frac {e^2 \left (2 e^4 \left (1-2 e^2\right )-\left (1+4 e^2+8 e^{10}\right ) x\right )}{-x^2+2 e^4 x+1}+2 e^4 x-\frac {e^2}{x}\)

Input:

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

Output:

-(E^2/x) + 2*E^4*x + x^2 + (E^2*(2*E^4*(1 - 2*E^2) - (1 + 4*E^2 + 8*E^10)* 
x))/(1 + 2*E^4*x - x^2)
 

Defintions of rubi rules used

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

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2026
Int[(Fx_.)*(Px_)^(p_.), x_Symbol] :> With[{r = Expon[Px, x, Min]}, Int[x^(p 
*r)*ExpandToSum[Px/x^r, x]^p*Fx, x] /; IGtQ[r, 0]] /; PolyQ[Px, x] && Integ 
erQ[p] &&  !MonomialQ[Px, x] && (ILtQ[p, 0] ||  !PolyQ[u, x])
 

rule 2462
Int[(u_.)*(Px_)^(p_), x_Symbol] :> With[{Qx = Factor[Px]}, Int[ExpandIntegr 
and[u*Qx^p, x], x] /;  !SumQ[NonfreeFactors[Qx, x]]] /; PolyQ[Px, x] && GtQ 
[Expon[Px, x], 2] &&  !BinomialQ[Px, x] &&  !TrinomialQ[Px, x] && ILtQ[p, 0 
] && RationalFunctionQ[u, x]
 
Maple [A] (verified)

Time = 0.23 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00

method result size
gosper \(-\frac {x^{5}+{\mathrm e}^{2}-x}{x \left (2 x \,{\mathrm e}^{4}-x^{2}+1\right )}\) \(31\)
parallelrisch \(-\frac {x^{5}+{\mathrm e}^{2}-x}{x \left (2 x \,{\mathrm e}^{4}-x^{2}+1\right )}\) \(31\)
norman \(\frac {-x^{5}+x -{\mathrm e}^{2}}{x \left (2 x \,{\mathrm e}^{4}-x^{2}+1\right )}\) \(32\)
risch \(2 x \,{\mathrm e}^{4}+x^{2}+\frac {-4 \left (2 \,{\mathrm e}^{8}+1\right ) {\mathrm e}^{4} x^{2}-4 x \,{\mathrm e}^{8}-{\mathrm e}^{2}}{x \left (2 x \,{\mathrm e}^{4}-x^{2}+1\right )}\) \(52\)
default \(x^{2}+2 x \,{\mathrm e}^{4}-\frac {{\mathrm e}^{2}}{x}+\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (1+\textit {\_Z}^{4}-4 \textit {\_Z}^{3} {\mathrm e}^{4}+\left (4 \,{\mathrm e}^{8}-2\right ) \textit {\_Z}^{2}+4 \textit {\_Z} \,{\mathrm e}^{4}\right )}{\sum }\frac {\left (\left (-8 \,{\mathrm e}^{12}-4 \,{\mathrm e}^{4}-{\mathrm e}^{2}\right ) \textit {\_R}^{2}+4 \left ({\mathrm e}^{6}-2 \,{\mathrm e}^{8}\right ) \textit {\_R} -4 \,{\mathrm e}^{10}-4 \,{\mathrm e}^{4}-{\mathrm e}^{2}\right ) \ln \left (x -\textit {\_R} \right )}{2 \textit {\_R} \,{\mathrm e}^{8}-3 \textit {\_R}^{2} {\mathrm e}^{4}+\textit {\_R}^{3}+{\mathrm e}^{4}-\textit {\_R}}\right )}{4}\) \(120\)

Input:

int((4*x*exp(2)^3+(-6*x^6-2*x^2)*exp(2)^2+(-3*x^2+1)*exp(2)+2*x^7-4*x^5+2* 
x^3)/(4*x^4*exp(2)^4+(-4*x^5+4*x^3)*exp(2)^2+x^6-2*x^4+x^2),x,method=_RETU 
RNVERBOSE)
 

Output:

-1/x*(x^5+exp(2)-x)/(2*x*exp(2)^2-x^2+1)
 

Fricas [B] (verification not implemented)

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

Time = 0.08 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.71 \[ \int \frac {4 e^6 x+2 x^3-4 x^5+2 x^7+e^2 \left (1-3 x^2\right )+e^4 \left (-2 x^2-6 x^6\right )}{x^2-2 x^4+4 e^8 x^4+x^6+e^4 \left (4 x^3-4 x^5\right )} \, dx=\frac {x^{5} - x^{3} + 8 \, x^{2} e^{12} + 2 \, x^{2} e^{4} - 4 \, {\left (x^{3} - x\right )} e^{8} + e^{2}}{x^{3} - 2 \, x^{2} e^{4} - x} \] Input:

integrate((4*x*exp(2)^3+(-6*x^6-2*x^2)*exp(2)^2+(-3*x^2+1)*exp(2)+2*x^7-4* 
x^5+2*x^3)/(4*x^4*exp(2)^4+(-4*x^5+4*x^3)*exp(2)^2+x^6-2*x^4+x^2),x, algor 
ithm="fricas")
 

Output:

(x^5 - x^3 + 8*x^2*e^12 + 2*x^2*e^4 - 4*(x^3 - x)*e^8 + e^2)/(x^3 - 2*x^2* 
e^4 - x)
 

Sympy [B] (verification not implemented)

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

Time = 3.19 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.48 \[ \int \frac {4 e^6 x+2 x^3-4 x^5+2 x^7+e^2 \left (1-3 x^2\right )+e^4 \left (-2 x^2-6 x^6\right )}{x^2-2 x^4+4 e^8 x^4+x^6+e^4 \left (4 x^3-4 x^5\right )} \, dx=x^{2} + 2 x e^{4} + \frac {x^{2} \cdot \left (4 e^{4} + 8 e^{12}\right ) + 4 x e^{8} + e^{2}}{x^{3} - 2 x^{2} e^{4} - x} \] Input:

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

Output:

x**2 + 2*x*exp(4) + (x**2*(4*exp(4) + 8*exp(12)) + 4*x*exp(8) + exp(2))/(x 
**3 - 2*x**2*exp(4) - x)
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 46, normalized size of antiderivative = 1.48 \[ \int \frac {4 e^6 x+2 x^3-4 x^5+2 x^7+e^2 \left (1-3 x^2\right )+e^4 \left (-2 x^2-6 x^6\right )}{x^2-2 x^4+4 e^8 x^4+x^6+e^4 \left (4 x^3-4 x^5\right )} \, dx=x^{2} + 2 \, x e^{4} + \frac {4 \, x^{2} {\left (2 \, e^{12} + e^{4}\right )} + 4 \, x e^{8} + e^{2}}{x^{3} - 2 \, x^{2} e^{4} - x} \] Input:

integrate((4*x*exp(2)^3+(-6*x^6-2*x^2)*exp(2)^2+(-3*x^2+1)*exp(2)+2*x^7-4* 
x^5+2*x^3)/(4*x^4*exp(2)^4+(-4*x^5+4*x^3)*exp(2)^2+x^6-2*x^4+x^2),x, algor 
ithm="maxima")
 

Output:

x^2 + 2*x*e^4 + (4*x^2*(2*e^12 + e^4) + 4*x*e^8 + e^2)/(x^3 - 2*x^2*e^4 - 
x)
 

Giac [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.55 \[ \int \frac {4 e^6 x+2 x^3-4 x^5+2 x^7+e^2 \left (1-3 x^2\right )+e^4 \left (-2 x^2-6 x^6\right )}{x^2-2 x^4+4 e^8 x^4+x^6+e^4 \left (4 x^3-4 x^5\right )} \, dx=x^{2} + 2 \, x e^{4} + \frac {8 \, x^{2} e^{12} + 4 \, x^{2} e^{4} + 4 \, x e^{8} + e^{2}}{x^{3} - 2 \, x^{2} e^{4} - x} \] Input:

integrate((4*x*exp(2)^3+(-6*x^6-2*x^2)*exp(2)^2+(-3*x^2+1)*exp(2)+2*x^7-4* 
x^5+2*x^3)/(4*x^4*exp(2)^4+(-4*x^5+4*x^3)*exp(2)^2+x^6-2*x^4+x^2),x, algor 
ithm="giac")
 

Output:

x^2 + 2*x*e^4 + (8*x^2*e^12 + 4*x^2*e^4 + 4*x*e^8 + e^2)/(x^3 - 2*x^2*e^4 
- x)
 

Mupad [B] (verification not implemented)

Time = 2.73 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.55 \[ \int \frac {4 e^6 x+2 x^3-4 x^5+2 x^7+e^2 \left (1-3 x^2\right )+e^4 \left (-2 x^2-6 x^6\right )}{x^2-2 x^4+4 e^8 x^4+x^6+e^4 \left (4 x^3-4 x^5\right )} \, dx=2\,x\,{\mathrm {e}}^4-\frac {\left (4\,{\mathrm {e}}^4+8\,{\mathrm {e}}^{12}\right )\,x^2+4\,{\mathrm {e}}^8\,x+{\mathrm {e}}^2}{-x^3+2\,{\mathrm {e}}^4\,x^2+x}+x^2 \] Input:

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

Output:

2*x*exp(4) - (exp(2) + x^2*(4*exp(4) + 8*exp(12)) + 4*x*exp(8))/(x + 2*x^2 
*exp(4) - x^3) + x^2
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.00 \[ \int \frac {4 e^6 x+2 x^3-4 x^5+2 x^7+e^2 \left (1-3 x^2\right )+e^4 \left (-2 x^2-6 x^6\right )}{x^2-2 x^4+4 e^8 x^4+x^6+e^4 \left (4 x^3-4 x^5\right )} \, dx=\frac {-x^{5}-e^{2}+x}{x \left (2 e^{4} x -x^{2}+1\right )} \] Input:

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

Output:

( - e**2 - x**5 + x)/(x*(2*e**4*x - x**2 + 1))