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

Optimal. Leaf size=24 \[ \frac {1}{-x+e^{3-e} \left (1-\frac {3 x}{-2+x}\right )} \]

[Out]

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

________________________________________________________________________________________

Rubi [B] Leaf count is larger than twice the leaf count of optimal. \(53\) vs. \(2(24)=48\).
time = 0.24, antiderivative size = 53, normalized size of antiderivative = 2.21, number of steps used = 4, number of rules used = 4, integrand size = 79, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.051, Rules used = {1694, 12, 1828, 8} \begin {gather*} -\frac {2 e^{2 e}-e^{2 e} x}{-e^{2 e} x^2-2 e^e \left (e^3-e^e\right ) x-2 e^{3+e}} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 1694

Int[(Pq_)*(Q4_)^(p_), x_Symbol] :> With[{a = Coeff[Q4, x, 0], b = Coeff[Q4, x, 1], c = Coeff[Q4, x, 2], d = Co
eff[Q4, x, 3], e = Coeff[Q4, x, 4]}, Subst[Int[SimplifyIntegrand[(Pq /. x -> -d/(4*e) + x)*(a + d^4/(256*e^3)
- b*(d/(8*e)) + (c - 3*(d^2/(8*e)))*x^2 + e*x^4)^p, x], x], x, d/(4*e) + x] /; EqQ[d^3 - 4*c*d*e + 8*b*e^2, 0]
 && NeQ[d, 0]] /; FreeQ[p, x] && PolyQ[Pq, x] && PolyQ[Q4, x, 4] &&  !IGtQ[p, 0]

Rule 1828

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> With[{Q = PolynomialQuotient[Pq, a + b*x^2, x], f = Coeff[P
olynomialRemainder[Pq, a + b*x^2, x], x, 0], g = Coeff[PolynomialRemainder[Pq, a + b*x^2, x], x, 1]}, Simp[(a*
g - b*f*x)*((a + b*x^2)^(p + 1)/(2*a*b*(p + 1))), x] + Dist[1/(2*a*(p + 1)), Int[(a + b*x^2)^(p + 1)*ExpandToS
um[2*a*(p + 1)*Q + f*(2*p + 3), x], x], x]] /; FreeQ[{a, b}, x] && PolyQ[Pq, x] && LtQ[p, -1]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\text {Subst}\left (\int \frac {e^{2 e} \left (e^6+e^{2 e}-4 e^{3+e}-2 e^e \left (e^3+e^e\right ) x+e^{2 e} x^2\right )}{\left (e^6+e^{2 e}-4 e^{3+e}-e^{2 e} x^2\right )^2} \, dx,x,\frac {1}{4} e^{6-2 e} \left (4 e^{-3+e}-4 e^{-6+2 e}\right )+x\right )\\ &=e^{2 e} \text {Subst}\left (\int \frac {e^6+e^{2 e}-4 e^{3+e}-2 e^e \left (e^3+e^e\right ) x+e^{2 e} x^2}{\left (e^6+e^{2 e}-4 e^{3+e}-e^{2 e} x^2\right )^2} \, dx,x,\frac {1}{4} e^{6-2 e} \left (4 e^{-3+e}-4 e^{-6+2 e}\right )+x\right )\\ &=\frac {e^{2 e} (2-x)}{2 e^{3+e}+2 e^e \left (e^3-e^e\right ) x+e^{2 e} x^2}-\frac {e^{2 e} \text {Subst}\left (\int 0 \, dx,x,\frac {1}{4} e^{6-2 e} \left (4 e^{-3+e}-4 e^{-6+2 e}\right )+x\right )}{2 \left (e^6+e^{2 e}-4 e^{3+e}\right )}\\ &=\frac {e^{2 e} (2-x)}{2 e^{3+e}+2 e^e \left (e^3-e^e\right ) x+e^{2 e} x^2}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.03, size = 28, normalized size = 1.17 \begin {gather*} \frac {e^e (2-x)}{e^e (-2+x) x+2 e^3 (1+x)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.11, size = 177, normalized size = 7.38

method result size
gosper \(-\frac {\left (x -2\right ) {\mathrm e}^{{\mathrm e}-3}}{{\mathrm e}^{{\mathrm e}-3} x^{2}-2 x \,{\mathrm e}^{{\mathrm e}-3}+2 x +2}\) \(35\)
risch \(\frac {-x \,{\mathrm e}^{{\mathrm e}-3}+2 \,{\mathrm e}^{{\mathrm e}-3}}{{\mathrm e}^{{\mathrm e}-3} x^{2}-2 x \,{\mathrm e}^{{\mathrm e}-3}+2 x +2}\) \(42\)
norman \(\frac {-{\mathrm e}^{2 \,{\mathrm e}} {\mathrm e}^{-6} x^{2}+\left (2 \,{\mathrm e}^{2 \,{\mathrm e}} {\mathrm e}^{-6}-3 \,{\mathrm e}^{{\mathrm e}} {\mathrm e}^{-3}\right ) x}{{\mathrm e}^{{\mathrm e}-3} x^{2}-2 x \,{\mathrm e}^{{\mathrm e}-3}+2 x +2}\) \(62\)
default \(\frac {{\mathrm e}^{{\mathrm e}-3} \left (\munderset {\textit {\_R} =\RootOf \left (4+{\mathrm e}^{2 \,{\mathrm e}-6} \textit {\_Z}^{4}+\left (-4 \,{\mathrm e}^{2 \,{\mathrm e}-6}+4 \,{\mathrm e}^{{\mathrm e}-3}\right ) \textit {\_Z}^{3}+\left (4 \,{\mathrm e}^{2 \,{\mathrm e}-6}-4 \,{\mathrm e}^{{\mathrm e}-3}+4\right ) \textit {\_Z}^{2}+\left (-8 \,{\mathrm e}^{{\mathrm e}-3}+8\right ) \textit {\_Z} \right )}{\sum }\frac {\left ({\mathrm e}^{{\mathrm e}-3} \textit {\_R}^{2}-4 \textit {\_R} \,{\mathrm e}^{{\mathrm e}-3}+4 \,{\mathrm e}^{{\mathrm e}-3}-6\right ) \ln \left (x -\textit {\_R} \right )}{2+{\mathrm e}^{2 \,{\mathrm e}-6} \textit {\_R}^{3}-3 \,{\mathrm e}^{2 \,{\mathrm e}-6} \textit {\_R}^{2}+2 \,{\mathrm e}^{2 \,{\mathrm e}-6} \textit {\_R} +3 \,{\mathrm e}^{{\mathrm e}-3} \textit {\_R}^{2}-2 \textit {\_R} \,{\mathrm e}^{{\mathrm e}-3}-2 \,{\mathrm e}^{{\mathrm e}-3}+2 \textit {\_R}}\right )}{4}\) \(177\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x^2-4*x+4)*exp(exp(1)-3)^2-6*exp(exp(1)-3))/((x^4-4*x^3+4*x^2)*exp(exp(1)-3)^2+(4*x^3-4*x^2-8*x)*exp(exp
(1)-3)+4*x^2+8*x+4),x,method=_RETURNVERBOSE)

[Out]

1/4*exp(exp(1)-3)*sum((exp(exp(1)-3)*_R^2-4*_R*exp(exp(1)-3)+4*exp(exp(1)-3)-6)/(2+exp(2*exp(1)-6)*_R^3-3*exp(
2*exp(1)-6)*_R^2+2*exp(2*exp(1)-6)*_R+3*exp(exp(1)-3)*_R^2-2*_R*exp(exp(1)-3)-2*exp(exp(1)-3)+2*_R)*ln(x-_R),_
R=RootOf(4+exp(2*exp(1)-6)*_Z^4+(-4*exp(2*exp(1)-6)+4*exp(exp(1)-3))*_Z^3+(4*exp(2*exp(1)-6)-4*exp(exp(1)-3)+4
)*_Z^2+(-8*exp(exp(1)-3)+8)*_Z))

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 38, normalized size = 1.58 \begin {gather*} -\frac {x e^{e} - 2 \, e^{e}}{x^{2} e^{e} + 2 \, x {\left (e^{3} - e^{e}\right )} + 2 \, e^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2-4*x+4)*exp(exp(1)-3)^2-6*exp(exp(1)-3))/((x^4-4*x^3+4*x^2)*exp(exp(1)-3)^2+(4*x^3-4*x^2-8*x)*e
xp(exp(1)-3)+4*x^2+8*x+4),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.35, size = 30, normalized size = 1.25 \begin {gather*} -\frac {{\left (x - 2\right )} e^{\left (e - 3\right )}}{{\left (x^{2} - 2 \, x\right )} e^{\left (e - 3\right )} + 2 \, x + 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2-4*x+4)*exp(exp(1)-3)^2-6*exp(exp(1)-3))/((x^4-4*x^3+4*x^2)*exp(exp(1)-3)^2+(4*x^3-4*x^2-8*x)*e
xp(exp(1)-3)+4*x^2+8*x+4),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 39 vs. \(2 (17) = 34\).
time = 0.55, size = 39, normalized size = 1.62 \begin {gather*} \frac {- x e^{e} + 2 e^{e}}{x^{2} e^{e} + x \left (- 2 e^{e} + 2 e^{3}\right ) + 2 e^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(-x*exp(E) + 2*exp(E))/(x**2*exp(E) + x*(-2*exp(E) + 2*exp(3)) + 2*exp(3))

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2-4*x+4)*exp(exp(1)-3)^2-6*exp(exp(1)-3))/((x^4-4*x^3+4*x^2)*exp(exp(1)-3)^2+(4*x^3-4*x^2-8*x)*e
xp(exp(1)-3)+4*x^2+8*x+4),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 6.85, size = 33, normalized size = 1.38 \begin {gather*} -\frac {x-2}{x^2+\left (2\,{\mathrm {e}}^{3-\mathrm {e}}-2\right )\,x+2\,{\mathrm {e}}^{3-\mathrm {e}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________