3.82.61 \(\int \frac {-57 x^2+18 x^3-3 x^4+e (36-24 x+4 x^2)+e^{1+x} (18-30 x+14 x^2-2 x^3)}{18 x^2-12 x^3+2 x^4} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.34, antiderivative size = 31, normalized size of antiderivative = 1.11, number of steps used = 8, number of rules used = 6, integrand size = 68, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.088, Rules used = {1594, 27, 12, 6688, 2197, 683} \begin {gather*} -\frac {3 x}{2}-\frac {15}{3-x}-\frac {e^{x+1}}{x}-\frac {2 e}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-57*x^2 + 18*x^3 - 3*x^4 + E*(36 - 24*x + 4*x^2) + E^(1 + x)*(18 - 30*x + 14*x^2 - 2*x^3))/(18*x^2 - 12*x
^3 + 2*x^4),x]

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, 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 683

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

Rule 1594

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 2197

Int[(F_)^((c_.)*(v_))*(u_)^(m_.)*(w_), x_Symbol] :> With[{b = Coefficient[v, x, 1], d = Coefficient[u, x, 0],
e = Coefficient[u, x, 1], f = Coefficient[w, x, 0], g = Coefficient[w, x, 1]}, Simp[(g*u^(m + 1)*F^(c*v))/(b*c
*e*Log[F]), x] /; EqQ[e*g*(m + 1) - b*c*(e*f - d*g)*Log[F], 0]] /; FreeQ[{F, c, m}, x] && LinearQ[{u, v, w}, x
]

Rule 6688

Int[u_, x_Symbol] :> With[{v = SimplifyIntegrand[u, x]}, Int[v, x] /; SimplerIntegrandQ[v, u, x]]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-57 x^2+18 x^3-3 x^4+e \left (36-24 x+4 x^2\right )+e^{1+x} \left (18-30 x+14 x^2-2 x^3\right )}{x^2 \left (18-12 x+2 x^2\right )} \, dx\\ &=\int \frac {-57 x^2+18 x^3-3 x^4+e \left (36-24 x+4 x^2\right )+e^{1+x} \left (18-30 x+14 x^2-2 x^3\right )}{2 (-3+x)^2 x^2} \, dx\\ &=\frac {1}{2} \int \frac {-57 x^2+18 x^3-3 x^4+e \left (36-24 x+4 x^2\right )+e^{1+x} \left (18-30 x+14 x^2-2 x^3\right )}{(-3+x)^2 x^2} \, dx\\ &=\frac {1}{2} \int \left (\frac {4 e}{x^2}-\frac {2 e^{1+x} (-1+x)}{x^2}-\frac {3 \left (19-6 x+x^2\right )}{(-3+x)^2}\right ) \, dx\\ &=-\frac {2 e}{x}-\frac {3}{2} \int \frac {19-6 x+x^2}{(-3+x)^2} \, dx-\int \frac {e^{1+x} (-1+x)}{x^2} \, dx\\ &=-\frac {2 e}{x}-\frac {e^{1+x}}{x}-\frac {3}{2} \int \left (1+\frac {10}{(-3+x)^2}\right ) \, dx\\ &=-\frac {15}{3-x}-\frac {2 e}{x}-\frac {e^{1+x}}{x}-\frac {3 x}{2}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 29, normalized size = 1.04 \begin {gather*} \frac {15}{-3+x}-\frac {2 e}{x}-\frac {e^{1+x}}{x}-\frac {3 x}{2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-57*x^2 + 18*x^3 - 3*x^4 + E*(36 - 24*x + 4*x^2) + E^(1 + x)*(18 - 30*x + 14*x^2 - 2*x^3))/(18*x^2
- 12*x^3 + 2*x^4),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.72, size = 41, normalized size = 1.46 \begin {gather*} -\frac {3 \, x^{3} - 9 \, x^{2} + 4 \, {\left (x - 3\right )} e + 2 \, {\left (x - 3\right )} e^{\left (x + 1\right )} - 30 \, x}{2 \, {\left (x^{2} - 3 \, x\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x^3+14*x^2-30*x+18)*exp(1)*exp(x)+(4*x^2-24*x+36)*exp(1)-3*x^4+18*x^3-57*x^2)/(2*x^4-12*x^3+18*
x^2),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.16, size = 47, normalized size = 1.68 \begin {gather*} -\frac {3 \, x^{3} - 9 \, x^{2} + 4 \, x e + 2 \, x e^{\left (x + 1\right )} - 30 \, x - 12 \, e - 6 \, e^{\left (x + 1\right )}}{2 \, {\left (x^{2} - 3 \, x\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x^3+14*x^2-30*x+18)*exp(1)*exp(x)+(4*x^2-24*x+36)*exp(1)-3*x^4+18*x^3-57*x^2)/(2*x^4-12*x^3+18*
x^2),x, algorithm="giac")

[Out]

-1/2*(3*x^3 - 9*x^2 + 4*x*e + 2*x*e^(x + 1) - 30*x - 12*e - 6*e^(x + 1))/(x^2 - 3*x)

________________________________________________________________________________________

maple [A]  time = 0.08, size = 37, normalized size = 1.32




method result size



risch \(-\frac {3 x}{2}+\frac {\frac {\left (30-4 \,{\mathrm e}\right ) x}{2}+6 \,{\mathrm e}}{x \left (x -3\right )}-\frac {{\mathrm e}^{x +1}}{x}\) \(37\)
norman \(\frac {\left (\frac {57}{2}-2 \,{\mathrm e}\right ) x -\frac {3 x^{3}}{2}+3 \,{\mathrm e} \,{\mathrm e}^{x}-x \,{\mathrm e} \,{\mathrm e}^{x}+6 \,{\mathrm e}}{x \left (x -3\right )}\) \(41\)
default \(\frac {15}{x -3}-\frac {3 x}{2}-\frac {2 \,{\mathrm e}}{x}+9 \,{\mathrm e} \left (-\frac {5 \expIntegralEi \left (1, -x \right )}{27}-\frac {{\mathrm e}^{x}}{9 x}-\frac {{\mathrm e}^{3} \expIntegralEi \left (1, 3-x \right )}{27}-\frac {{\mathrm e}^{x}}{9 \left (x -3\right )}\right )-15 \,{\mathrm e} \left (-\frac {\expIntegralEi \left (1, -x \right )}{9}-\frac {2 \,{\mathrm e}^{3} \expIntegralEi \left (1, 3-x \right )}{9}-\frac {{\mathrm e}^{x}}{3 \left (x -3\right )}\right )+7 \,{\mathrm e} \left (-\frac {{\mathrm e}^{x}}{x -3}-{\mathrm e}^{3} \expIntegralEi \left (1, 3-x \right )\right )-{\mathrm e} \left (-4 \,{\mathrm e}^{3} \expIntegralEi \left (1, 3-x \right )-\frac {3 \,{\mathrm e}^{x}}{x -3}\right )\) \(140\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-2*x^3+14*x^2-30*x+18)*exp(1)*exp(x)+(4*x^2-24*x+36)*exp(1)-3*x^4+18*x^3-57*x^2)/(2*x^4-12*x^3+18*x^2),x
,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [B]  time = 0.43, size = 80, normalized size = 2.86 \begin {gather*} -\frac {2}{3} \, {\left (\frac {3 \, {\left (2 \, x - 3\right )}}{x^{2} - 3 \, x} + 2 \, \log \left (x - 3\right ) - 2 \, \log \relax (x)\right )} e + \frac {4}{3} \, {\left (\frac {3}{x - 3} + \log \left (x - 3\right ) - \log \relax (x)\right )} e - \frac {3}{2} \, x - \frac {2 \, e}{x - 3} - \frac {e^{\left (x + 1\right )}}{x} + \frac {15}{x - 3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x^3+14*x^2-30*x+18)*exp(1)*exp(x)+(4*x^2-24*x+36)*exp(1)-3*x^4+18*x^3-57*x^2)/(2*x^4-12*x^3+18*
x^2),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.17, size = 25, normalized size = 0.89 \begin {gather*} \frac {15}{x-3}-\frac {3\,x}{2}-\frac {{\mathrm {e}}^{x+1}+2\,\mathrm {e}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(57*x^2 - exp(1)*(4*x^2 - 24*x + 36) - 18*x^3 + 3*x^4 + exp(1)*exp(x)*(30*x - 14*x^2 + 2*x^3 - 18))/(18*x
^2 - 12*x^3 + 2*x^4),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.34, size = 34, normalized size = 1.21 \begin {gather*} - \frac {3 x}{2} - \frac {x \left (-15 + 2 e\right ) - 6 e}{x^{2} - 3 x} - \frac {e e^{x}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-2*x**3+14*x**2-30*x+18)*exp(1)*exp(x)+(4*x**2-24*x+36)*exp(1)-3*x**4+18*x**3-57*x**2)/(2*x**4-12*
x**3+18*x**2),x)

[Out]

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

________________________________________________________________________________________