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

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

Optimal result

Integrand size = 69, antiderivative size = 23 \[ \int \frac {-2 e^8+2 x^4}{e^{12}+x^3-3 x^4+3 x^5-x^6+e^8 \left (3 x-3 x^2\right )+e^4 \left (3 x^2-6 x^3+3 x^4\right )} \, dx=\left (-1+\frac {x}{e^4+(1-x) x}\right )^2+\log (\log (4)) \]

[Out]

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

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(183\) vs. \(2(23)=46\).

Time = 0.14 (sec) , antiderivative size = 183, normalized size of antiderivative = 7.96, number of steps used = 11, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.072, Rules used = {2099, 652, 628, 632, 212} \[ \int \frac {-2 e^8+2 x^4}{e^{12}+x^3-3 x^4+3 x^5-x^6+e^8 \left (3 x-3 x^2\right )+e^4 \left (3 x^2-6 x^3+3 x^4\right )} \, dx=-\frac {4 \text {arctanh}\left (\frac {1-2 x}{\sqrt {1+4 e^4}}\right )}{\sqrt {1+4 e^4}}+\frac {16 \left (1+e^4\right ) \text {arctanh}\left (\frac {1-2 x}{\sqrt {1+4 e^4}}\right )}{\left (1+4 e^4\right )^{3/2}}-\frac {12 \text {arctanh}\left (\frac {1-2 x}{\sqrt {1+4 e^4}}\right )}{\left (1+4 e^4\right )^{3/2}}-\frac {3 (1-2 x)}{\left (1+4 e^4\right ) \left (-x^2+x+e^4\right )}+\frac {2 \left (-4 \left (1+e^4\right ) x-2 e^4+1\right )}{\left (1+4 e^4\right ) \left (-x^2+x+e^4\right )}+\frac {x+e^4}{\left (-x^2+x+e^4\right )^2} \]

[In]

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

[Out]

(E^4 + x)/(E^4 + x - x^2)^2 - (3*(1 - 2*x))/((1 + 4*E^4)*(E^4 + x - x^2)) + (2*(1 - 2*E^4 - 4*(1 + E^4)*x))/((
1 + 4*E^4)*(E^4 + x - x^2)) - (12*ArcTanh[(1 - 2*x)/Sqrt[1 + 4*E^4]])/(1 + 4*E^4)^(3/2) + (16*(1 + E^4)*ArcTan
h[(1 - 2*x)/Sqrt[1 + 4*E^4]])/(1 + 4*E^4)^(3/2) - (4*ArcTanh[(1 - 2*x)/Sqrt[1 + 4*E^4]])/Sqrt[1 + 4*E^4]

Rule 212

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))*ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 628

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(b + 2*c*x)*((a + b*x + c*x^2)^(p + 1)/((p + 1
)*(b^2 - 4*a*c))), x] - Dist[2*c*((2*p + 3)/((p + 1)*(b^2 - 4*a*c))), Int[(a + b*x + c*x^2)^(p + 1), x], x] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0] && LtQ[p, -1] && NeQ[p, -3/2] && IntegerQ[4*p]

Rule 632

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 652

Int[((d_.) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[((b*d - 2*a*e + (2*c*d -
b*e)*x)/((p + 1)*(b^2 - 4*a*c)))*(a + b*x + c*x^2)^(p + 1), x] - Dist[(2*p + 3)*((2*c*d - b*e)/((p + 1)*(b^2 -
 4*a*c))), Int[(a + b*x + c*x^2)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && NeQ[b^
2 - 4*a*c, 0] && LtQ[p, -1] && NeQ[p, -3/2]

Rule 2099

Int[(P_)^(p_)*(Q_)^(q_.), x_Symbol] :> With[{PP = Factor[P]}, Int[ExpandIntegrand[PP^p*Q^q, x], x] /;  !SumQ[N
onfreeFactors[PP, x]]] /; FreeQ[q, x] && PolyQ[P, x] && PolyQ[Q, x] && IntegerQ[p] && NeQ[P, x]

Rubi steps \begin{align*} \text {integral}& = \int \left (\frac {2 \left (e^4+\left (1+2 e^4\right ) x\right )}{\left (e^4+x-x^2\right )^3}-\frac {2 \left (1+2 e^4+2 x\right )}{\left (e^4+x-x^2\right )^2}+\frac {2}{e^4+x-x^2}\right ) \, dx \\ & = 2 \int \frac {e^4+\left (1+2 e^4\right ) x}{\left (e^4+x-x^2\right )^3} \, dx-2 \int \frac {1+2 e^4+2 x}{\left (e^4+x-x^2\right )^2} \, dx+2 \int \frac {1}{e^4+x-x^2} \, dx \\ & = \frac {e^4+x}{\left (e^4+x-x^2\right )^2}+\frac {2 \left (1-2 e^4-4 \left (1+e^4\right ) x\right )}{\left (1+4 e^4\right ) \left (e^4+x-x^2\right )}+3 \int \frac {1}{\left (e^4+x-x^2\right )^2} \, dx-4 \text {Subst}\left (\int \frac {1}{1+4 e^4-x^2} \, dx,x,1-2 x\right )-\frac {\left (8 \left (1+e^4\right )\right ) \int \frac {1}{e^4+x-x^2} \, dx}{1+4 e^4} \\ & = \frac {e^4+x}{\left (e^4+x-x^2\right )^2}-\frac {3 (1-2 x)}{\left (1+4 e^4\right ) \left (e^4+x-x^2\right )}+\frac {2 \left (1-2 e^4-4 \left (1+e^4\right ) x\right )}{\left (1+4 e^4\right ) \left (e^4+x-x^2\right )}-\frac {4 \text {arctanh}\left (\frac {1-2 x}{\sqrt {1+4 e^4}}\right )}{\sqrt {1+4 e^4}}+\frac {6 \int \frac {1}{e^4+x-x^2} \, dx}{1+4 e^4}+\frac {\left (16 \left (1+e^4\right )\right ) \text {Subst}\left (\int \frac {1}{1+4 e^4-x^2} \, dx,x,1-2 x\right )}{1+4 e^4} \\ & = \frac {e^4+x}{\left (e^4+x-x^2\right )^2}-\frac {3 (1-2 x)}{\left (1+4 e^4\right ) \left (e^4+x-x^2\right )}+\frac {2 \left (1-2 e^4-4 \left (1+e^4\right ) x\right )}{\left (1+4 e^4\right ) \left (e^4+x-x^2\right )}+\frac {16 \left (1+e^4\right ) \text {arctanh}\left (\frac {1-2 x}{\sqrt {1+4 e^4}}\right )}{\left (1+4 e^4\right )^{3/2}}-\frac {4 \text {arctanh}\left (\frac {1-2 x}{\sqrt {1+4 e^4}}\right )}{\sqrt {1+4 e^4}}-\frac {12 \text {Subst}\left (\int \frac {1}{1+4 e^4-x^2} \, dx,x,1-2 x\right )}{1+4 e^4} \\ & = \frac {e^4+x}{\left (e^4+x-x^2\right )^2}-\frac {3 (1-2 x)}{\left (1+4 e^4\right ) \left (e^4+x-x^2\right )}+\frac {2 \left (1-2 e^4-4 \left (1+e^4\right ) x\right )}{\left (1+4 e^4\right ) \left (e^4+x-x^2\right )}-\frac {12 \text {arctanh}\left (\frac {1-2 x}{\sqrt {1+4 e^4}}\right )}{\left (1+4 e^4\right )^{3/2}}+\frac {16 \left (1+e^4\right ) \text {arctanh}\left (\frac {1-2 x}{\sqrt {1+4 e^4}}\right )}{\left (1+4 e^4\right )^{3/2}}-\frac {4 \text {arctanh}\left (\frac {1-2 x}{\sqrt {1+4 e^4}}\right )}{\sqrt {1+4 e^4}} \\ \end{align*}

Mathematica [A] (verified)

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

[In]

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

[Out]

-((x*(2*E^4 + x - 2*x^2))/(E^4 + x - x^2)^2)

Maple [A] (verified)

Time = 0.14 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.26

method result size
norman \(\frac {-x^{2}+2 x^{3}-2 x \,{\mathrm e}^{4}}{\left (-x^{2}+{\mathrm e}^{4}+x \right )^{2}}\) \(29\)
gosper \(-\frac {x \left (-2 x^{2}+2 \,{\mathrm e}^{4}+x \right )}{x^{4}-2 x^{2} {\mathrm e}^{4}-2 x^{3}+{\mathrm e}^{8}+2 x \,{\mathrm e}^{4}+x^{2}}\) \(45\)
risch \(\frac {-x^{2}+2 x^{3}-2 x \,{\mathrm e}^{4}}{x^{4}-2 x^{2} {\mathrm e}^{4}-2 x^{3}+{\mathrm e}^{8}+2 x \,{\mathrm e}^{4}+x^{2}}\) \(46\)
parallelrisch \(\frac {-x^{2}+2 x^{3}-2 x \,{\mathrm e}^{4}}{x^{4}-2 x^{2} {\mathrm e}^{4}-2 x^{3}+{\mathrm e}^{8}+2 x \,{\mathrm e}^{4}+x^{2}}\) \(48\)

[In]

int((-2*exp(4)^2+2*x^4)/(exp(4)^3+(-3*x^2+3*x)*exp(4)^2+(3*x^4-6*x^3+3*x^2)*exp(4)-x^6+3*x^5-3*x^4+x^3),x,meth
od=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.91 \[ \int \frac {-2 e^8+2 x^4}{e^{12}+x^3-3 x^4+3 x^5-x^6+e^8 \left (3 x-3 x^2\right )+e^4 \left (3 x^2-6 x^3+3 x^4\right )} \, dx=\frac {2 \, x^{3} - x^{2} - 2 \, x e^{4}}{x^{4} - 2 \, x^{3} + x^{2} - 2 \, {\left (x^{2} - x\right )} e^{4} + e^{8}} \]

[In]

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

[Out]

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

Sympy [B] (verification not implemented)

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

Time = 0.47 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.91 \[ \int \frac {-2 e^8+2 x^4}{e^{12}+x^3-3 x^4+3 x^5-x^6+e^8 \left (3 x-3 x^2\right )+e^4 \left (3 x^2-6 x^3+3 x^4\right )} \, dx=- \frac {- 2 x^{3} + x^{2} + 2 x e^{4}}{x^{4} - 2 x^{3} + x^{2} \cdot \left (1 - 2 e^{4}\right ) + 2 x e^{4} + e^{8}} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.30 \[ \int \frac {-2 e^8+2 x^4}{e^{12}+x^3-3 x^4+3 x^5-x^6+e^8 \left (3 x-3 x^2\right )+e^4 \left (3 x^2-6 x^3+3 x^4\right )} \, dx=\frac {2 \, x^{3} - x^{2} - 2 \, x e^{4}}{{\left (x^{2} - x - e^{4}\right )}^{2}} \]

[In]

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

[Out]

(2*x^3 - x^2 - 2*x*e^4)/(x^2 - x - e^4)^2

Mupad [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.87 \[ \int \frac {-2 e^8+2 x^4}{e^{12}+x^3-3 x^4+3 x^5-x^6+e^8 \left (3 x-3 x^2\right )+e^4 \left (3 x^2-6 x^3+3 x^4\right )} \, dx=-\frac {x\,\left (-2\,x^2+x+2\,{\mathrm {e}}^4\right )}{x^4-2\,x^3+\left (1-2\,{\mathrm {e}}^4\right )\,x^2+2\,{\mathrm {e}}^4\,x+{\mathrm {e}}^8} \]

[In]

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

[Out]

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