3.30.4 \(\int \frac {-4 e^2+118098 x-16 x^2+e (-39366+16 x)}{e^2 x^3-4 e x^4+4 x^5} \, dx\) [2904]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.08, antiderivative size = 33, normalized size of antiderivative = 1.43, number of steps used = 4, number of rules used = 3, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.070, Rules used = {1608, 27, 1834} \begin {gather*} \frac {19683+2 e}{e x^2}+\frac {39366}{e^2 x}+\frac {78732}{e^2 (e-2 x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-4*E^2 + 118098*x - 16*x^2 + E*(-39366 + 16*x))/(E^2*x^3 - 4*E*x^4 + 4*x^5),x]

[Out]

78732/(E^2*(E - 2*x)) + (19683 + 2*E)/(E*x^2) + 39366/(E^2*x)

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 1608

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

Rule 1834

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*Pq*(a +
 b*x^n)^p, x], x] /; FreeQ[{a, b, c, m, n}, x] && PolyQ[Pq, x] && (IGtQ[p, 0] || EqQ[n, 1])

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-4 e^2+118098 x-16 x^2+e (-39366+16 x)}{x^3 \left (e^2-4 e x+4 x^2\right )} \, dx\\ &=\int \frac {-4 e^2+118098 x-16 x^2+e (-39366+16 x)}{(e-2 x)^2 x^3} \, dx\\ &=\int \left (\frac {157464}{e^2 (e-2 x)^2}-\frac {2 (19683+2 e)}{e x^3}-\frac {39366}{e^2 x^2}\right ) \, dx\\ &=\frac {78732}{e^2 (e-2 x)}+\frac {19683+2 e}{e x^2}+\frac {39366}{e^2 x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 20, normalized size = 0.87 \begin {gather*} -\frac {-19683-2 e+4 x}{(e-2 x) x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-4*E^2 + 118098*x - 16*x^2 + E*(-39366 + 16*x))/(E^2*x^3 - 4*E*x^4 + 4*x^5),x]

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.18, size = 22, normalized size = 0.96

method result size
gosper \(\frac {19683-4 x +2 \,{\mathrm e}}{x^{2} \left ({\mathrm e}-2 x \right )}\) \(22\)
norman \(\frac {19683-4 x +2 \,{\mathrm e}}{x^{2} \left ({\mathrm e}-2 x \right )}\) \(22\)
risch \(\frac {19683-4 x +2 \,{\mathrm e}}{x^{2} \left ({\mathrm e}-2 x \right )}\) \(22\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-4*exp(1)^2+(16*x-39366)*exp(1)-16*x^2+118098*x)/(x^3*exp(1)^2-4*x^4*exp(1)+4*x^5),x,method=_RETURNVERBOS
E)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 25, normalized size = 1.09 \begin {gather*} \frac {4 \, x - 2 \, e - 19683}{2 \, x^{3} - x^{2} e} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-4*exp(1)^2+(16*x-39366)*exp(1)-16*x^2+118098*x)/(x^3*exp(1)^2-4*x^4*exp(1)+4*x^5),x, algorithm="ma
xima")

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.52, size = 25, normalized size = 1.09 \begin {gather*} \frac {4 \, x - 2 \, e - 19683}{2 \, x^{3} - x^{2} e} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-4*exp(1)^2+(16*x-39366)*exp(1)-16*x^2+118098*x)/(x^3*exp(1)^2-4*x^4*exp(1)+4*x^5),x, algorithm="fr
icas")

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.22, size = 22, normalized size = 0.96 \begin {gather*} - \frac {- 4 x + 2 e + 19683}{2 x^{3} - e x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-4*exp(1)**2+(16*x-39366)*exp(1)-16*x**2+118098*x)/(x**3*exp(1)**2-4*x**4*exp(1)+4*x**5),x)

[Out]

-(-4*x + 2*E + 19683)/(2*x**3 - E*x**2)

________________________________________________________________________________________

Giac [A]
time = 0.40, size = 33, normalized size = 1.43 \begin {gather*} -\frac {78732 \, e^{\left (-2\right )}}{2 \, x - e} + \frac {{\left (39366 \, x + 2 \, e^{2} + 19683 \, e\right )} e^{\left (-2\right )}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-4*exp(1)^2+(16*x-39366)*exp(1)-16*x^2+118098*x)/(x^3*exp(1)^2-4*x^4*exp(1)+4*x^5),x, algorithm="gi
ac")

[Out]

-78732*e^(-2)/(2*x - e) + (39366*x + 2*e^2 + 19683*e)*e^(-2)/x^2

________________________________________________________________________________________

Mupad [B]
time = 0.14, size = 24, normalized size = 1.04 \begin {gather*} \frac {2\,\mathrm {e}-4\,x+19683}{x^2\,\mathrm {e}-2\,x^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((118098*x - 4*exp(2) - 16*x^2 + exp(1)*(16*x - 39366))/(x^3*exp(2) - 4*x^4*exp(1) + 4*x^5),x)

[Out]

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

________________________________________________________________________________________