\(\int \frac {140+70 x-77 x^2+35 x^3+77 x^4+21 x^5+e^x (28 x+28 x^2+7 x^3)+(-56 x^2-56 x^3-14 x^4) \log (5 x)}{4 x+4 x^2+x^3} \, dx\) [9425]

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

Optimal result

Integrand size = 79, antiderivative size = 29 \[ \int \frac {140+70 x-77 x^2+35 x^3+77 x^4+21 x^5+e^x \left (28 x+28 x^2+7 x^3\right )+\left (-56 x^2-56 x^3-14 x^4\right ) \log (5 x)}{4 x+4 x^2+x^3} \, dx=7 \left (e^x+\left (5-x^2\right ) \left (-x-\frac {2}{2+x}+\log (5 x)\right )\right ) \]

[Out]

7*exp(x)+7*(-x^2+5)*(ln(5*x)-2/(2+x)-x)

Rubi [A] (verified)

Time = 0.40 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.17, number of steps used = 16, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.089, Rules used = {1608, 27, 6874, 2225, 46, 45, 2341} \[ \int \frac {140+70 x-77 x^2+35 x^3+77 x^4+21 x^5+e^x \left (28 x+28 x^2+7 x^3\right )+\left (-56 x^2-56 x^3-14 x^4\right ) \log (5 x)}{4 x+4 x^2+x^3} \, dx=7 x^3-7 x^2 \log (5 x)-21 x+7 e^x-\frac {14}{x+2}+35 \log (x) \]

[In]

Int[(140 + 70*x - 77*x^2 + 35*x^3 + 77*x^4 + 21*x^5 + E^x*(28*x + 28*x^2 + 7*x^3) + (-56*x^2 - 56*x^3 - 14*x^4
)*Log[5*x])/(4*x + 4*x^2 + x^3),x]

[Out]

7*E^x - 21*x + 7*x^3 - 14/(2 + x) + 35*Log[x] - 7*x^2*Log[5*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 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 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 2341

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^
n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^(m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1
]

Rule 6874

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {140+70 x-77 x^2+35 x^3+77 x^4+21 x^5+e^x \left (28 x+28 x^2+7 x^3\right )+\left (-56 x^2-56 x^3-14 x^4\right ) \log (5 x)}{x \left (4+4 x+x^2\right )} \, dx \\ & = \int \frac {140+70 x-77 x^2+35 x^3+77 x^4+21 x^5+e^x \left (28 x+28 x^2+7 x^3\right )+\left (-56 x^2-56 x^3-14 x^4\right ) \log (5 x)}{x (2+x)^2} \, dx \\ & = \int \left (7 e^x+\frac {70}{(2+x)^2}+\frac {140}{x (2+x)^2}-\frac {77 x}{(2+x)^2}+\frac {35 x^2}{(2+x)^2}+\frac {77 x^3}{(2+x)^2}+\frac {21 x^4}{(2+x)^2}-14 x \log (5 x)\right ) \, dx \\ & = -\frac {70}{2+x}+7 \int e^x \, dx-14 \int x \log (5 x) \, dx+21 \int \frac {x^4}{(2+x)^2} \, dx+35 \int \frac {x^2}{(2+x)^2} \, dx-77 \int \frac {x}{(2+x)^2} \, dx+77 \int \frac {x^3}{(2+x)^2} \, dx+140 \int \frac {1}{x (2+x)^2} \, dx \\ & = 7 e^x+\frac {7 x^2}{2}-\frac {70}{2+x}-7 x^2 \log (5 x)+21 \int \left (12-4 x+x^2+\frac {16}{(2+x)^2}-\frac {32}{2+x}\right ) \, dx+35 \int \left (1+\frac {4}{(2+x)^2}-\frac {4}{2+x}\right ) \, dx-77 \int \left (-\frac {2}{(2+x)^2}+\frac {1}{2+x}\right ) \, dx+77 \int \left (-4+x-\frac {8}{(2+x)^2}+\frac {12}{2+x}\right ) \, dx+140 \int \left (\frac {1}{4 x}-\frac {1}{2 (2+x)^2}-\frac {1}{4 (2+x)}\right ) \, dx \\ & = 7 e^x-21 x+7 x^3-\frac {14}{2+x}+35 \log (x)-7 x^2 \log (5 x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.21 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.10 \[ \int \frac {140+70 x-77 x^2+35 x^3+77 x^4+21 x^5+e^x \left (28 x+28 x^2+7 x^3\right )+\left (-56 x^2-56 x^3-14 x^4\right ) \log (5 x)}{4 x+4 x^2+x^3} \, dx=7 \left (e^x-3 x+x^3-\frac {2}{2+x}+5 \log (x)-x^2 \log (5 x)\right ) \]

[In]

Integrate[(140 + 70*x - 77*x^2 + 35*x^3 + 77*x^4 + 21*x^5 + E^x*(28*x + 28*x^2 + 7*x^3) + (-56*x^2 - 56*x^3 -
14*x^4)*Log[5*x])/(4*x + 4*x^2 + x^3),x]

[Out]

7*(E^x - 3*x + x^3 - 2/(2 + x) + 5*Log[x] - x^2*Log[5*x])

Maple [A] (verified)

Time = 0.21 (sec) , antiderivative size = 34, normalized size of antiderivative = 1.17

method result size
default \(-7 x^{2} \ln \left (5 x \right )+7 x^{3}-21 x +35 \ln \left (x \right )-\frac {14}{2+x}+7 \,{\mathrm e}^{x}\) \(34\)
parts \(-7 x^{2} \ln \left (5 x \right )+7 x^{3}-21 x +35 \ln \left (x \right )-\frac {14}{2+x}+7 \,{\mathrm e}^{x}\) \(34\)
risch \(-7 x^{2} \ln \left (5 x \right )+\frac {7 x^{4}+14 x^{3}+35 x \ln \left (x \right )-21 x^{2}+7 \,{\mathrm e}^{x} x +70 \ln \left (x \right )-42 x +14 \,{\mathrm e}^{x}-14}{2+x}\) \(53\)
parallelrisch \(-\frac {-14 x^{4}+14 x^{3} \ln \left (5 x \right )-140-28 x^{3}+28 x^{2} \ln \left (5 x \right )-70 x \ln \left (x \right )+42 x^{2}-14 \,{\mathrm e}^{x} x -140 \ln \left (x \right )-28 \,{\mathrm e}^{x}}{2 \left (2+x \right )}\) \(61\)

[In]

int(((-14*x^4-56*x^3-56*x^2)*ln(5*x)+(7*x^3+28*x^2+28*x)*exp(x)+21*x^5+77*x^4+35*x^3-77*x^2+70*x+140)/(x^3+4*x
^2+4*x),x,method=_RETURNVERBOSE)

[Out]

-7*x^2*ln(5*x)+7*x^3-21*x+35*ln(x)-14/(2+x)+7*exp(x)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.72 \[ \int \frac {140+70 x-77 x^2+35 x^3+77 x^4+21 x^5+e^x \left (28 x+28 x^2+7 x^3\right )+\left (-56 x^2-56 x^3-14 x^4\right ) \log (5 x)}{4 x+4 x^2+x^3} \, dx=\frac {7 \, {\left (x^{4} + 2 \, x^{3} - 3 \, x^{2} + {\left (x + 2\right )} e^{x} - {\left (x^{3} + 2 \, x^{2} - 5 \, x - 10\right )} \log \left (5 \, x\right ) - 6 \, x - 2\right )}}{x + 2} \]

[In]

integrate(((-14*x^4-56*x^3-56*x^2)*log(5*x)+(7*x^3+28*x^2+28*x)*exp(x)+21*x^5+77*x^4+35*x^3-77*x^2+70*x+140)/(
x^3+4*x^2+4*x),x, algorithm="fricas")

[Out]

7*(x^4 + 2*x^3 - 3*x^2 + (x + 2)*e^x - (x^3 + 2*x^2 - 5*x - 10)*log(5*x) - 6*x - 2)/(x + 2)

Sympy [A] (verification not implemented)

Time = 0.14 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.10 \[ \int \frac {140+70 x-77 x^2+35 x^3+77 x^4+21 x^5+e^x \left (28 x+28 x^2+7 x^3\right )+\left (-56 x^2-56 x^3-14 x^4\right ) \log (5 x)}{4 x+4 x^2+x^3} \, dx=7 x^{3} - 7 x^{2} \log {\left (5 x \right )} - 21 x + 7 e^{x} + 35 \log {\left (x \right )} - \frac {14}{x + 2} \]

[In]

integrate(((-14*x**4-56*x**3-56*x**2)*ln(5*x)+(7*x**3+28*x**2+28*x)*exp(x)+21*x**5+77*x**4+35*x**3-77*x**2+70*
x+140)/(x**3+4*x**2+4*x),x)

[Out]

7*x**3 - 7*x**2*log(5*x) - 21*x + 7*exp(x) + 35*log(x) - 14/(x + 2)

Maxima [F]

\[ \int \frac {140+70 x-77 x^2+35 x^3+77 x^4+21 x^5+e^x \left (28 x+28 x^2+7 x^3\right )+\left (-56 x^2-56 x^3-14 x^4\right ) \log (5 x)}{4 x+4 x^2+x^3} \, dx=\int { \frac {7 \, {\left (3 \, x^{5} + 11 \, x^{4} + 5 \, x^{3} - 11 \, x^{2} + {\left (x^{3} + 4 \, x^{2} + 4 \, x\right )} e^{x} - 2 \, {\left (x^{4} + 4 \, x^{3} + 4 \, x^{2}\right )} \log \left (5 \, x\right ) + 10 \, x + 20\right )}}{x^{3} + 4 \, x^{2} + 4 \, x} \,d x } \]

[In]

integrate(((-14*x^4-56*x^3-56*x^2)*log(5*x)+(7*x^3+28*x^2+28*x)*exp(x)+21*x^5+77*x^4+35*x^3-77*x^2+70*x+140)/(
x^3+4*x^2+4*x),x, algorithm="maxima")

[Out]

7*x^3 - 7/2*x^2*(2*log(5) - 1) - 7*x^2*log(x) - 7/2*x^2 - 21*x - 28*e^(-2)*exp_integral_e(2, -x - 2)/(x + 2) -
 14/(x + 2) + 7*integrate((x^2 + 4*x)*e^x/(x^2 + 4*x + 4), x) + 35*log(x)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 60 vs. \(2 (27) = 54\).

Time = 0.28 (sec) , antiderivative size = 60, normalized size of antiderivative = 2.07 \[ \int \frac {140+70 x-77 x^2+35 x^3+77 x^4+21 x^5+e^x \left (28 x+28 x^2+7 x^3\right )+\left (-56 x^2-56 x^3-14 x^4\right ) \log (5 x)}{4 x+4 x^2+x^3} \, dx=\frac {7 \, {\left (x^{4} - x^{3} \log \left (5 \, x\right ) + 2 \, x^{3} - 2 \, x^{2} \log \left (5 \, x\right ) - 3 \, x^{2} + x e^{x} + 5 \, x \log \left (x\right ) - 6 \, x + 2 \, e^{x} + 10 \, \log \left (x\right ) - 2\right )}}{x + 2} \]

[In]

integrate(((-14*x^4-56*x^3-56*x^2)*log(5*x)+(7*x^3+28*x^2+28*x)*exp(x)+21*x^5+77*x^4+35*x^3-77*x^2+70*x+140)/(
x^3+4*x^2+4*x),x, algorithm="giac")

[Out]

7*(x^4 - x^3*log(5*x) + 2*x^3 - 2*x^2*log(5*x) - 3*x^2 + x*e^x + 5*x*log(x) - 6*x + 2*e^x + 10*log(x) - 2)/(x
+ 2)

Mupad [B] (verification not implemented)

Time = 13.85 (sec) , antiderivative size = 38, normalized size of antiderivative = 1.31 \[ \int \frac {140+70 x-77 x^2+35 x^3+77 x^4+21 x^5+e^x \left (28 x+28 x^2+7 x^3\right )+\left (-56 x^2-56 x^3-14 x^4\right ) \log (5 x)}{4 x+4 x^2+x^3} \, dx=7\,{\mathrm {e}}^x-21\,x+35\,\ln \left (x\right )-7\,x^2\,\ln \left (x\right )-\frac {14}{x+2}-7\,x^2\,\ln \left (5\right )+7\,x^3 \]

[In]

int((70*x - log(5*x)*(56*x^2 + 56*x^3 + 14*x^4) - 77*x^2 + 35*x^3 + 77*x^4 + 21*x^5 + exp(x)*(28*x + 28*x^2 +
7*x^3) + 140)/(4*x + 4*x^2 + x^3),x)

[Out]

7*exp(x) - 21*x + 35*log(x) - 7*x^2*log(x) - 14/(x + 2) - 7*x^2*log(5) + 7*x^3