\(\int \frac {(-34-34 x+e^4 (2 x+2 x^2)) \log (e^5 x)+(34 x+e^4 (x-x^2)) \log ^2(e^5 x)}{x+3 x^2+3 x^3+x^4} \, dx\) [7800]

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

Optimal result

Integrand size = 68, antiderivative size = 21 \[ \int \frac {\left (-34-34 x+e^4 \left (2 x+2 x^2\right )\right ) \log \left (e^5 x\right )+\left (34 x+e^4 \left (x-x^2\right )\right ) \log ^2\left (e^5 x\right )}{x+3 x^2+3 x^3+x^4} \, dx=\frac {\left (-17+e^4 x\right ) \log ^2\left (e^5 x\right )}{(1+x)^2} \]

[Out]

(x*exp(4)-17)*ln(x*exp(5))^2/(1+x)^2

Rubi [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(208\) vs. \(2(21)=42\).

Time = 0.45 (sec) , antiderivative size = 208, normalized size of antiderivative = 9.90, number of steps used = 24, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {6820, 6874, 46, 37, 2404, 2338, 2356, 2351, 31, 2354, 2438, 2398} \[ \int \frac {\left (-34-34 x+e^4 \left (2 x+2 x^2\right )\right ) \log \left (e^5 x\right )+\left (34 x+e^4 \left (x-x^2\right )\right ) \log ^2\left (e^5 x\right )}{x+3 x^2+3 x^3+x^4} \, dx=-\frac {15 e^4 x^2}{2 (x+1)^2}+\frac {10 \left (17+e^4\right )}{x+1}-\frac {170}{x+1}-\frac {5 \left (136+7 e^4\right )}{2 (x+1)^2}-\frac {85}{(x+1)^2}-\frac {\left (-e^4 x+e^4+34\right )^2 \log ^2(x)}{4 \left (17+e^4\right ) (x+1)^2}+\frac {\left (34+e^4\right )^2 \log ^2(x)}{4 \left (17+e^4\right )}-17 \log ^2(x)-\frac {2 \left (17+e^4\right ) x \log (x)}{x+1}+\frac {2 \left (17-4 e^4\right ) x \log (x)}{x+1}-\frac {10 \left (17+e^4\right ) \log (x)}{(x+1)^2}+10 \left (17+e^4\right ) \log (x)-170 \log (x)-8 \left (17+e^4\right ) \log (x+1)-2 \left (17-4 e^4\right ) \log (x+1)+170 \log (x+1) \]

[In]

Int[((-34 - 34*x + E^4*(2*x + 2*x^2))*Log[E^5*x] + (34*x + E^4*(x - x^2))*Log[E^5*x]^2)/(x + 3*x^2 + 3*x^3 + x
^4),x]

[Out]

-85/(1 + x)^2 - (5*(136 + 7*E^4))/(2*(1 + x)^2) - (15*E^4*x^2)/(2*(1 + x)^2) - 170/(1 + x) + (10*(17 + E^4))/(
1 + x) - 170*Log[x] + 10*(17 + E^4)*Log[x] - (10*(17 + E^4)*Log[x])/(1 + x)^2 + (2*(17 - 4*E^4)*x*Log[x])/(1 +
 x) - (2*(17 + E^4)*x*Log[x])/(1 + x) - 17*Log[x]^2 + ((34 + E^4)^2*Log[x]^2)/(4*(17 + E^4)) - ((34 + E^4 - E^
4*x)^2*Log[x]^2)/(4*(17 + E^4)*(1 + x)^2) + 170*Log[1 + x] - 2*(17 - 4*E^4)*Log[1 + x] - 8*(17 + E^4)*Log[1 +
x]

Rule 31

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

Rule 37

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

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 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, 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 2354

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

Rule 2356

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.), x_Symbol] :> Simp[(d + e*x)^(q + 1)
*((a + b*Log[c*x^n])^p/(e*(q + 1))), x] - Dist[b*n*(p/(e*(q + 1))), Int[((d + e*x)^(q + 1)*(a + b*Log[c*x^n])^
(p - 1))/x, x], x] /; FreeQ[{a, b, c, d, e, n, p, q}, x] && GtQ[p, 0] && NeQ[q, -1] && (EqQ[p, 1] || (Integers
Q[2*p, 2*q] &&  !IGtQ[q, 0]) || (EqQ[p, 2] && NeQ[q, 1]))

Rule 2398

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

Rule 2404

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*x^
n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]

Rule 2438

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

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 {(5+\log (x)) \left (-34+\left (136+7 e^4\right ) x-3 e^4 x^2+\left (34-e^4 (-1+x)\right ) x \log (x)\right )}{x (1+x)^3} \, dx \\ & = \int \left (\frac {5 \left (136+7 e^4\right )}{(1+x)^3}-\frac {170}{x (1+x)^3}-\frac {15 e^4 x}{(1+x)^3}+\frac {2 \left (-17+3 \left (51+2 e^4\right ) x-4 e^4 x^2\right ) \log (x)}{x (1+x)^3}-\frac {\left (-34-e^4+e^4 x\right ) \log ^2(x)}{(1+x)^3}\right ) \, dx \\ & = -\frac {5 \left (136+7 e^4\right )}{2 (1+x)^2}+2 \int \frac {\left (-17+3 \left (51+2 e^4\right ) x-4 e^4 x^2\right ) \log (x)}{x (1+x)^3} \, dx-170 \int \frac {1}{x (1+x)^3} \, dx-\left (15 e^4\right ) \int \frac {x}{(1+x)^3} \, dx-\int \frac {\left (-34-e^4+e^4 x\right ) \log ^2(x)}{(1+x)^3} \, dx \\ & = -\frac {5 \left (136+7 e^4\right )}{2 (1+x)^2}-\frac {15 e^4 x^2}{2 (1+x)^2}-\frac {\left (34+e^4-e^4 x\right )^2 \log ^2(x)}{4 \left (17+e^4\right ) (1+x)^2}+2 \int \left (-\frac {17 \log (x)}{x}+\frac {10 \left (17+e^4\right ) \log (x)}{(1+x)^3}+\frac {\left (17-4 e^4\right ) \log (x)}{(1+x)^2}+\frac {17 \log (x)}{1+x}\right ) \, dx-170 \int \left (\frac {1}{-1-x}+\frac {1}{x}-\frac {1}{(1+x)^3}-\frac {1}{(1+x)^2}\right ) \, dx+\frac {\int \frac {\left (-34-e^4+e^4 x\right )^2 \log (x)}{x (1+x)^2} \, dx}{2 \left (17+e^4\right )} \\ & = -\frac {85}{(1+x)^2}-\frac {5 \left (136+7 e^4\right )}{2 (1+x)^2}-\frac {15 e^4 x^2}{2 (1+x)^2}-\frac {170}{1+x}-170 \log (x)-\frac {\left (34+e^4-e^4 x\right )^2 \log ^2(x)}{4 \left (17+e^4\right ) (1+x)^2}+170 \log (1+x)-34 \int \frac {\log (x)}{x} \, dx+34 \int \frac {\log (x)}{1+x} \, dx+\left (2 \left (17-4 e^4\right )\right ) \int \frac {\log (x)}{(1+x)^2} \, dx+\frac {\int \left (\frac {\left (34+e^4\right )^2 \log (x)}{x}-\frac {4 \left (17+e^4\right )^2 \log (x)}{(1+x)^2}-\frac {68 \left (17+e^4\right ) \log (x)}{1+x}\right ) \, dx}{2 \left (17+e^4\right )}+\left (20 \left (17+e^4\right )\right ) \int \frac {\log (x)}{(1+x)^3} \, dx \\ & = -\frac {85}{(1+x)^2}-\frac {5 \left (136+7 e^4\right )}{2 (1+x)^2}-\frac {15 e^4 x^2}{2 (1+x)^2}-\frac {170}{1+x}-170 \log (x)-\frac {10 \left (17+e^4\right ) \log (x)}{(1+x)^2}+\frac {2 \left (17-4 e^4\right ) x \log (x)}{1+x}-17 \log ^2(x)-\frac {\left (34+e^4-e^4 x\right )^2 \log ^2(x)}{4 \left (17+e^4\right ) (1+x)^2}+170 \log (1+x)+34 \log (x) \log (1+x)-34 \int \frac {\log (x)}{1+x} \, dx-34 \int \frac {\log (1+x)}{x} \, dx-\left (2 \left (17-4 e^4\right )\right ) \int \frac {1}{1+x} \, dx-\left (2 \left (17+e^4\right )\right ) \int \frac {\log (x)}{(1+x)^2} \, dx+\left (10 \left (17+e^4\right )\right ) \int \frac {1}{x (1+x)^2} \, dx+\frac {\left (34+e^4\right )^2 \int \frac {\log (x)}{x} \, dx}{2 \left (17+e^4\right )} \\ & = -\frac {85}{(1+x)^2}-\frac {5 \left (136+7 e^4\right )}{2 (1+x)^2}-\frac {15 e^4 x^2}{2 (1+x)^2}-\frac {170}{1+x}-170 \log (x)-\frac {10 \left (17+e^4\right ) \log (x)}{(1+x)^2}+\frac {2 \left (17-4 e^4\right ) x \log (x)}{1+x}-\frac {2 \left (17+e^4\right ) x \log (x)}{1+x}-17 \log ^2(x)+\frac {\left (34+e^4\right )^2 \log ^2(x)}{4 \left (17+e^4\right )}-\frac {\left (34+e^4-e^4 x\right )^2 \log ^2(x)}{4 \left (17+e^4\right ) (1+x)^2}+170 \log (1+x)-2 \left (17-4 e^4\right ) \log (1+x)+34 \operatorname {PolyLog}(2,-x)+34 \int \frac {\log (1+x)}{x} \, dx+\left (2 \left (17+e^4\right )\right ) \int \frac {1}{1+x} \, dx+\left (10 \left (17+e^4\right )\right ) \int \left (\frac {1}{-1-x}+\frac {1}{x}-\frac {1}{(1+x)^2}\right ) \, dx \\ & = -\frac {85}{(1+x)^2}-\frac {5 \left (136+7 e^4\right )}{2 (1+x)^2}-\frac {15 e^4 x^2}{2 (1+x)^2}-\frac {170}{1+x}+\frac {10 \left (17+e^4\right )}{1+x}-170 \log (x)+10 \left (17+e^4\right ) \log (x)-\frac {10 \left (17+e^4\right ) \log (x)}{(1+x)^2}+\frac {2 \left (17-4 e^4\right ) x \log (x)}{1+x}-\frac {2 \left (17+e^4\right ) x \log (x)}{1+x}-17 \log ^2(x)+\frac {\left (34+e^4\right )^2 \log ^2(x)}{4 \left (17+e^4\right )}-\frac {\left (34+e^4-e^4 x\right )^2 \log ^2(x)}{4 \left (17+e^4\right ) (1+x)^2}+170 \log (1+x)-2 \left (17-4 e^4\right ) \log (1+x)-8 \left (17+e^4\right ) \log (1+x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.90 \[ \int \frac {\left (-34-34 x+e^4 \left (2 x+2 x^2\right )\right ) \log \left (e^5 x\right )+\left (34 x+e^4 \left (x-x^2\right )\right ) \log ^2\left (e^5 x\right )}{x+3 x^2+3 x^3+x^4} \, dx=\frac {\left (-17+e^4 x\right ) (5+\log (x))^2}{(1+x)^2} \]

[In]

Integrate[((-34 - 34*x + E^4*(2*x + 2*x^2))*Log[E^5*x] + (34*x + E^4*(x - x^2))*Log[E^5*x]^2)/(x + 3*x^2 + 3*x
^3 + x^4),x]

[Out]

((-17 + E^4*x)*(5 + Log[x])^2)/(1 + x)^2

Maple [A] (verified)

Time = 0.33 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.19

method result size
risch \(\frac {\left (x \,{\mathrm e}^{4}-17\right ) \ln \left (x \,{\mathrm e}^{5}\right )^{2}}{x^{2}+2 x +1}\) \(25\)
norman \(\frac {x \,{\mathrm e}^{4} \ln \left (x \,{\mathrm e}^{5}\right )^{2}-17 \ln \left (x \,{\mathrm e}^{5}\right )^{2}}{\left (1+x \right )^{2}}\) \(28\)
parallelrisch \(\frac {x \,{\mathrm e}^{4} \ln \left (x \,{\mathrm e}^{5}\right )^{2}-17 \ln \left (x \,{\mathrm e}^{5}\right )^{2}}{x^{2}+2 x +1}\) \(33\)

[In]

int((((-x^2+x)*exp(4)+34*x)*ln(x*exp(5))^2+((2*x^2+2*x)*exp(4)-34*x-34)*ln(x*exp(5)))/(x^4+3*x^3+3*x^2+x),x,me
thod=_RETURNVERBOSE)

[Out]

(x*exp(4)-17)/(x^2+2*x+1)*ln(x*exp(5))^2

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.14 \[ \int \frac {\left (-34-34 x+e^4 \left (2 x+2 x^2\right )\right ) \log \left (e^5 x\right )+\left (34 x+e^4 \left (x-x^2\right )\right ) \log ^2\left (e^5 x\right )}{x+3 x^2+3 x^3+x^4} \, dx=\frac {{\left (x e^{4} - 17\right )} \log \left (x e^{5}\right )^{2}}{x^{2} + 2 \, x + 1} \]

[In]

integrate((((-x^2+x)*exp(4)+34*x)*log(x*exp(5))^2+((2*x^2+2*x)*exp(4)-34*x-34)*log(x*exp(5)))/(x^4+3*x^3+3*x^2
+x),x, algorithm="fricas")

[Out]

(x*e^4 - 17)*log(x*e^5)^2/(x^2 + 2*x + 1)

Sympy [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 22, normalized size of antiderivative = 1.05 \[ \int \frac {\left (-34-34 x+e^4 \left (2 x+2 x^2\right )\right ) \log \left (e^5 x\right )+\left (34 x+e^4 \left (x-x^2\right )\right ) \log ^2\left (e^5 x\right )}{x+3 x^2+3 x^3+x^4} \, dx=\frac {\left (x e^{4} - 17\right ) \log {\left (x e^{5} \right )}^{2}}{x^{2} + 2 x + 1} \]

[In]

integrate((((-x**2+x)*exp(4)+34*x)*ln(x*exp(5))**2+((2*x**2+2*x)*exp(4)-34*x-34)*ln(x*exp(5)))/(x**4+3*x**3+3*
x**2+x),x)

[Out]

(x*exp(4) - 17)*log(x*exp(5))**2/(x**2 + 2*x + 1)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 39 vs. \(2 (19) = 38\).

Time = 0.26 (sec) , antiderivative size = 39, normalized size of antiderivative = 1.86 \[ \int \frac {\left (-34-34 x+e^4 \left (2 x+2 x^2\right )\right ) \log \left (e^5 x\right )+\left (34 x+e^4 \left (x-x^2\right )\right ) \log ^2\left (e^5 x\right )}{x+3 x^2+3 x^3+x^4} \, dx=\frac {{\left (x e^{4} - 17\right )} \log \left (x\right )^{2} + 25 \, x e^{4} + 10 \, {\left (x e^{4} - 17\right )} \log \left (x\right ) - 425}{x^{2} + 2 \, x + 1} \]

[In]

integrate((((-x^2+x)*exp(4)+34*x)*log(x*exp(5))^2+((2*x^2+2*x)*exp(4)-34*x-34)*log(x*exp(5)))/(x^4+3*x^3+3*x^2
+x),x, algorithm="maxima")

[Out]

((x*e^4 - 17)*log(x)^2 + 25*x*e^4 + 10*(x*e^4 - 17)*log(x) - 425)/(x^2 + 2*x + 1)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 43 vs. \(2 (19) = 38\).

Time = 0.29 (sec) , antiderivative size = 43, normalized size of antiderivative = 2.05 \[ \int \frac {\left (-34-34 x+e^4 \left (2 x+2 x^2\right )\right ) \log \left (e^5 x\right )+\left (34 x+e^4 \left (x-x^2\right )\right ) \log ^2\left (e^5 x\right )}{x+3 x^2+3 x^3+x^4} \, dx=\frac {x e^{4} \log \left (x\right )^{2} + 10 \, x e^{4} \log \left (x\right ) + 25 \, x e^{4} - 17 \, \log \left (x\right )^{2} - 170 \, \log \left (x\right ) - 425}{x^{2} + 2 \, x + 1} \]

[In]

integrate((((-x^2+x)*exp(4)+34*x)*log(x*exp(5))^2+((2*x^2+2*x)*exp(4)-34*x-34)*log(x*exp(5)))/(x^4+3*x^3+3*x^2
+x),x, algorithm="giac")

[Out]

(x*e^4*log(x)^2 + 10*x*e^4*log(x) + 25*x*e^4 - 17*log(x)^2 - 170*log(x) - 425)/(x^2 + 2*x + 1)

Mupad [B] (verification not implemented)

Time = 13.58 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.90 \[ \int \frac {\left (-34-34 x+e^4 \left (2 x+2 x^2\right )\right ) \log \left (e^5 x\right )+\left (34 x+e^4 \left (x-x^2\right )\right ) \log ^2\left (e^5 x\right )}{x+3 x^2+3 x^3+x^4} \, dx=\frac {{\ln \left (x\,{\mathrm {e}}^5\right )}^2\,\left (x\,{\mathrm {e}}^4-17\right )}{{\left (x+1\right )}^2} \]

[In]

int(-(log(x*exp(5))*(34*x - exp(4)*(2*x + 2*x^2) + 34) - log(x*exp(5))^2*(34*x + exp(4)*(x - x^2)))/(x + 3*x^2
 + 3*x^3 + x^4),x)

[Out]

(log(x*exp(5))^2*(x*exp(4) - 17))/(x + 1)^2