\(\int \frac {50-50 x+e^{e^x+3 x} (-12 x^2+12 x^3-3 x^4+e^x (-4 x^2+4 x^3-x^4))}{4 x^2-4 x^3+x^4} \, dx\) [6514]

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

Optimal result

Integrand size = 68, antiderivative size = 22 \[ \int \frac {50-50 x+e^{e^x+3 x} \left (-12 x^2+12 x^3-3 x^4+e^x \left (-4 x^2+4 x^3-x^4\right )\right )}{4 x^2-4 x^3+x^4} \, dx=-e^{e^x+3 x}+\frac {25}{(-2+x) x} \]

[Out]

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

Rubi [A] (verified)

Time = 0.56 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.09, number of steps used = 15, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {1608, 27, 6820, 6874, 2320, 2207, 2225, 75} \[ \int \frac {50-50 x+e^{e^x+3 x} \left (-12 x^2+12 x^3-3 x^4+e^x \left (-4 x^2+4 x^3-x^4\right )\right )}{4 x^2-4 x^3+x^4} \, dx=-e^{3 x+e^x}-\frac {25}{(2-x) x} \]

[In]

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

[Out]

-E^(E^x + 3*x) - 25/((2 - x)*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 75

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

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 2207

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^m*
((b*F^(g*(e + f*x)))^n/(f*g*n*Log[F])), x] - Dist[d*(m/(f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !TrueQ[$UseGamma]

Rule 2225

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2320

Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] &&  !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] &&  !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]

Rule 6820

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

Rule 6874

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

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

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.00 \[ \int \frac {50-50 x+e^{e^x+3 x} \left (-12 x^2+12 x^3-3 x^4+e^x \left (-4 x^2+4 x^3-x^4\right )\right )}{4 x^2-4 x^3+x^4} \, dx=-e^{e^x+3 x}+\frac {25}{(-2+x) x} \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.17 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.95

method result size
risch \(\frac {25}{\left (-2+x \right ) x}-{\mathrm e}^{3 x +{\mathrm e}^{x}}\) \(21\)
parts \(-{\mathrm e}^{3 x} {\mathrm e}^{{\mathrm e}^{x}}-\frac {25}{2 x}+\frac {25}{2 \left (-2+x \right )}\) \(23\)
norman \(\frac {25+2 x \,{\mathrm e}^{3 x +{\mathrm e}^{x}}-{\mathrm e}^{3 x +{\mathrm e}^{x}} x^{2}}{\left (-2+x \right ) x}\) \(34\)
parallelrisch \(-\frac {{\mathrm e}^{3 x +{\mathrm e}^{x}} x^{2}-2 x \,{\mathrm e}^{3 x +{\mathrm e}^{x}}-25}{\left (-2+x \right ) x}\) \(34\)

[In]

int((((-x^4+4*x^3-4*x^2)*exp(x)-3*x^4+12*x^3-12*x^2)*exp(3*x+exp(x))-50*x+50)/(x^4-4*x^3+4*x^2),x,method=_RETU
RNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.27 \[ \int \frac {50-50 x+e^{e^x+3 x} \left (-12 x^2+12 x^3-3 x^4+e^x \left (-4 x^2+4 x^3-x^4\right )\right )}{4 x^2-4 x^3+x^4} \, dx=-\frac {{\left (x^{2} - 2 \, x\right )} e^{\left (3 \, x + e^{x}\right )} - 25}{x^{2} - 2 \, x} \]

[In]

integrate((((-x^4+4*x^3-4*x^2)*exp(x)-3*x^4+12*x^3-12*x^2)*exp(3*x+exp(x))-50*x+50)/(x^4-4*x^3+4*x^2),x, algor
ithm="fricas")

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.68 \[ \int \frac {50-50 x+e^{e^x+3 x} \left (-12 x^2+12 x^3-3 x^4+e^x \left (-4 x^2+4 x^3-x^4\right )\right )}{4 x^2-4 x^3+x^4} \, dx=- e^{3 x + e^{x}} + \frac {25}{x^{2} - 2 x} \]

[In]

integrate((((-x**4+4*x**3-4*x**2)*exp(x)-3*x**4+12*x**3-12*x**2)*exp(3*x+exp(x))-50*x+50)/(x**4-4*x**3+4*x**2)
,x)

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.41 \[ \int \frac {50-50 x+e^{e^x+3 x} \left (-12 x^2+12 x^3-3 x^4+e^x \left (-4 x^2+4 x^3-x^4\right )\right )}{4 x^2-4 x^3+x^4} \, dx=-\frac {25 \, {\left (x - 1\right )}}{x^{2} - 2 \, x} + \frac {25}{x - 2} - e^{\left (3 \, x + e^{x}\right )} \]

[In]

integrate((((-x^4+4*x^3-4*x^2)*exp(x)-3*x^4+12*x^3-12*x^2)*exp(3*x+exp(x))-50*x+50)/(x^4-4*x^3+4*x^2),x, algor
ithm="maxima")

[Out]

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

Giac [B] (verification not implemented)

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

Time = 0.27 (sec) , antiderivative size = 48, normalized size of antiderivative = 2.18 \[ \int \frac {50-50 x+e^{e^x+3 x} \left (-12 x^2+12 x^3-3 x^4+e^x \left (-4 x^2+4 x^3-x^4\right )\right )}{4 x^2-4 x^3+x^4} \, dx=-\frac {x^{2} e^{\left (7 \, x + e^{x}\right )} - 2 \, x e^{\left (7 \, x + e^{x}\right )} - 25 \, e^{\left (4 \, x\right )}}{x^{2} e^{\left (4 \, x\right )} - 2 \, x e^{\left (4 \, x\right )}} \]

[In]

integrate((((-x^4+4*x^3-4*x^2)*exp(x)-3*x^4+12*x^3-12*x^2)*exp(3*x+exp(x))-50*x+50)/(x^4-4*x^3+4*x^2),x, algor
ithm="giac")

[Out]

-(x^2*e^(7*x + e^x) - 2*x*e^(7*x + e^x) - 25*e^(4*x))/(x^2*e^(4*x) - 2*x*e^(4*x))

Mupad [B] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.05 \[ \int \frac {50-50 x+e^{e^x+3 x} \left (-12 x^2+12 x^3-3 x^4+e^x \left (-4 x^2+4 x^3-x^4\right )\right )}{4 x^2-4 x^3+x^4} \, dx=-{\mathrm {e}}^{3\,x+{\mathrm {e}}^x}-\frac {25}{2\,x-x^2} \]

[In]

int(-(50*x + exp(3*x + exp(x))*(12*x^2 - 12*x^3 + 3*x^4 + exp(x)*(4*x^2 - 4*x^3 + x^4)) - 50)/(4*x^2 - 4*x^3 +
 x^4),x)

[Out]

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