\(\int \frac {-9+250 x+54 x^2+3 x^3+e^x (8 x+x^2)+x \log (x)}{243 x+54 x^2+3 x^3} \, dx\) [1490]

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

Optimal result

Integrand size = 47, antiderivative size = 20 \[ \int \frac {-9+250 x+54 x^2+3 x^3+e^x \left (8 x+x^2\right )+x \log (x)}{243 x+54 x^2+3 x^3} \, dx=x+\frac {-8+e^x-\log (x)}{3 (9+x)} \]

[Out]

1/3*(exp(x)-ln(x)-8)/(x+9)+x

Rubi [B] (verified)

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

Time = 0.28 (sec) , antiderivative size = 41, normalized size of antiderivative = 2.05, number of steps used = 14, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.191, Rules used = {1608, 27, 12, 6874, 46, 45, 2228, 2351, 31} \[ \int \frac {-9+250 x+54 x^2+3 x^3+e^x \left (8 x+x^2\right )+x \log (x)}{243 x+54 x^2+3 x^3} \, dx=x+\frac {e^x}{3 (x+9)}-\frac {8}{3 (x+9)}+\frac {x \log (x)}{27 (x+9)}-\frac {\log (x)}{27} \]

[In]

Int[(-9 + 250*x + 54*x^2 + 3*x^3 + E^x*(8*x + x^2) + x*Log[x])/(243*x + 54*x^2 + 3*x^3),x]

[Out]

x - 8/(3*(9 + x)) + E^x/(3*(9 + x)) - Log[x]/27 + (x*Log[x])/(27*(9 + 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 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 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 46

Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x
)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && Lt
Q[m + n + 2, 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 2228

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 2351

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_), x_Symbol] :> Simp[x*(d + e*x^r)^(q +
 1)*((a + b*Log[c*x^n])/d), x] - Dist[b*(n/d), Int[(d + e*x^r)^(q + 1), x], x] /; FreeQ[{a, b, c, d, e, n, q,
r}, x] && EqQ[r*(q + 1) + 1, 0]

Rule 6874

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {-9+250 x+54 x^2+3 x^3+e^x \left (8 x+x^2\right )+x \log (x)}{x \left (243+54 x+3 x^2\right )} \, dx \\ & = \int \frac {-9+250 x+54 x^2+3 x^3+e^x \left (8 x+x^2\right )+x \log (x)}{3 x (9+x)^2} \, dx \\ & = \frac {1}{3} \int \frac {-9+250 x+54 x^2+3 x^3+e^x \left (8 x+x^2\right )+x \log (x)}{x (9+x)^2} \, dx \\ & = \frac {1}{3} \int \left (\frac {250}{(9+x)^2}-\frac {9}{x (9+x)^2}+\frac {54 x}{(9+x)^2}+\frac {3 x^2}{(9+x)^2}+\frac {e^x (8+x)}{(9+x)^2}+\frac {\log (x)}{(9+x)^2}\right ) \, dx \\ & = -\frac {250}{3 (9+x)}+\frac {1}{3} \int \frac {e^x (8+x)}{(9+x)^2} \, dx+\frac {1}{3} \int \frac {\log (x)}{(9+x)^2} \, dx-3 \int \frac {1}{x (9+x)^2} \, dx+18 \int \frac {x}{(9+x)^2} \, dx+\int \frac {x^2}{(9+x)^2} \, dx \\ & = -\frac {250}{3 (9+x)}+\frac {e^x}{3 (9+x)}+\frac {x \log (x)}{27 (9+x)}-\frac {1}{27} \int \frac {1}{9+x} \, dx-3 \int \left (\frac {1}{81 x}-\frac {1}{9 (9+x)^2}-\frac {1}{81 (9+x)}\right ) \, dx+18 \int \left (-\frac {9}{(9+x)^2}+\frac {1}{9+x}\right ) \, dx+\int \left (1+\frac {81}{(9+x)^2}-\frac {18}{9+x}\right ) \, dx \\ & = x-\frac {8}{3 (9+x)}+\frac {e^x}{3 (9+x)}-\frac {\log (x)}{27}+\frac {x \log (x)}{27 (9+x)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.22 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.30 \[ \int \frac {-9+250 x+54 x^2+3 x^3+e^x \left (8 x+x^2\right )+x \log (x)}{243 x+54 x^2+3 x^3} \, dx=\frac {-8+e^x+27 x+3 x^2-\log (x)}{3 (9+x)} \]

[In]

Integrate[(-9 + 250*x + 54*x^2 + 3*x^3 + E^x*(8*x + x^2) + x*Log[x])/(243*x + 54*x^2 + 3*x^3),x]

[Out]

(-8 + E^x + 27*x + 3*x^2 - Log[x])/(3*(9 + x))

Maple [A] (verified)

Time = 0.07 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00

method result size
norman \(\frac {x^{2}-\frac {\ln \left (x \right )}{3}-\frac {251}{3}+\frac {{\mathrm e}^{x}}{3}}{x +9}\) \(20\)
parallelrisch \(\frac {3 x^{2}-251-\ln \left (x \right )+{\mathrm e}^{x}}{3 x +27}\) \(21\)
risch \(-\frac {\ln \left (x \right )}{3 \left (x +9\right )}+\frac {3 x^{2}+27 x +{\mathrm e}^{x}-8}{3 x +27}\) \(30\)
default \(\frac {x \ln \left (x \right )}{27 x +243}+\frac {{\mathrm e}^{x}}{3 x +27}+x -\frac {\ln \left (x \right )}{27}-\frac {8}{3 \left (x +9\right )}\) \(33\)
parts \(\frac {x \ln \left (x \right )}{27 x +243}+\frac {{\mathrm e}^{x}}{3 x +27}+x -\frac {\ln \left (x \right )}{27}-\frac {8}{3 \left (x +9\right )}\) \(33\)

[In]

int((x*ln(x)+(x^2+8*x)*exp(x)+3*x^3+54*x^2+250*x-9)/(3*x^3+54*x^2+243*x),x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.15 \[ \int \frac {-9+250 x+54 x^2+3 x^3+e^x \left (8 x+x^2\right )+x \log (x)}{243 x+54 x^2+3 x^3} \, dx=\frac {3 \, x^{2} + 27 \, x + e^{x} - \log \left (x\right ) - 8}{3 \, {\left (x + 9\right )}} \]

[In]

integrate((x*log(x)+(x^2+8*x)*exp(x)+3*x^3+54*x^2+250*x-9)/(3*x^3+54*x^2+243*x),x, algorithm="fricas")

[Out]

1/3*(3*x^2 + 27*x + e^x - log(x) - 8)/(x + 9)

Sympy [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.20 \[ \int \frac {-9+250 x+54 x^2+3 x^3+e^x \left (8 x+x^2\right )+x \log (x)}{243 x+54 x^2+3 x^3} \, dx=x + \frac {e^{x}}{3 x + 27} - \frac {\log {\left (x \right )}}{3 x + 27} - \frac {8}{3 x + 27} \]

[In]

integrate((x*ln(x)+(x**2+8*x)*exp(x)+3*x**3+54*x**2+250*x-9)/(3*x**3+54*x**2+243*x),x)

[Out]

x + exp(x)/(3*x + 27) - log(x)/(3*x + 27) - 8/(3*x + 27)

Maxima [F]

\[ \int \frac {-9+250 x+54 x^2+3 x^3+e^x \left (8 x+x^2\right )+x \log (x)}{243 x+54 x^2+3 x^3} \, dx=\int { \frac {3 \, x^{3} + 54 \, x^{2} + {\left (x^{2} + 8 \, x\right )} e^{x} + x \log \left (x\right ) + 250 \, x - 9}{3 \, {\left (x^{3} + 18 \, x^{2} + 81 \, x\right )}} \,d x } \]

[In]

integrate((x*log(x)+(x^2+8*x)*exp(x)+3*x^3+54*x^2+250*x-9)/(3*x^3+54*x^2+243*x),x, algorithm="maxima")

[Out]

x - 8/3*e^(-9)*exp_integral_e(2, -x - 9)/(x + 9) - 1/3*log(x)/(x + 9) - 8/3/(x + 9) + 1/3*integrate(x*e^x/(x^2
 + 18*x + 81), x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.15 \[ \int \frac {-9+250 x+54 x^2+3 x^3+e^x \left (8 x+x^2\right )+x \log (x)}{243 x+54 x^2+3 x^3} \, dx=\frac {3 \, x^{2} + 27 \, x + e^{x} - \log \left (x\right ) - 8}{3 \, {\left (x + 9\right )}} \]

[In]

integrate((x*log(x)+(x^2+8*x)*exp(x)+3*x^3+54*x^2+250*x-9)/(3*x^3+54*x^2+243*x),x, algorithm="giac")

[Out]

1/3*(3*x^2 + 27*x + e^x - log(x) - 8)/(x + 9)

Mupad [B] (verification not implemented)

Time = 9.07 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.95 \[ \int \frac {-9+250 x+54 x^2+3 x^3+e^x \left (8 x+x^2\right )+x \log (x)}{243 x+54 x^2+3 x^3} \, dx=x-\frac {\frac {\ln \left (x\right )}{3}-\frac {{\mathrm {e}}^x}{3}+\frac {8}{3}}{x+9} \]

[In]

int((250*x + exp(x)*(8*x + x^2) + x*log(x) + 54*x^2 + 3*x^3 - 9)/(243*x + 54*x^2 + 3*x^3),x)

[Out]

x - (log(x)/3 - exp(x)/3 + 8/3)/(x + 9)