\(\int \frac {-5 x-4 x^2+x^3+e^{7+x} (4+3 x-x^2)+(-8-10 x+3 x^2+e^{7+x} (4 x+3 x^2-x^3)) \log (x)+(-4-3 x+x^2) \log (1+x)}{-4 x-3 x^2+x^3} \, dx\) [10134]

   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 [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 89, antiderivative size = 27 \[ \int \frac {-5 x-4 x^2+x^3+e^{7+x} \left (4+3 x-x^2\right )+\left (-8-10 x+3 x^2+e^{7+x} \left (4 x+3 x^2-x^3\right )\right ) \log (x)+\left (-4-3 x+x^2\right ) \log (1+x)}{-4 x-3 x^2+x^3} \, dx=x-\log (4-x)+\log (x) \left (-e^{7+x}+\log (x)+\log (1+x)\right ) \]

[Out]

ln(x)*(ln(x)-exp(x+7)+ln(1+x))+x-ln(-x+4)

Rubi [A] (verified)

Time = 0.69 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.78, number of steps used = 32, number of rules used = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.146, Rules used = {1608, 6860, 84, 630, 31, 646, 2404, 2353, 2352, 2354, 2438, 2338, 2326} \[ \int \frac {-5 x-4 x^2+x^3+e^{7+x} \left (4+3 x-x^2\right )+\left (-8-10 x+3 x^2+e^{7+x} \left (4 x+3 x^2-x^3\right )\right ) \log (x)+\left (-4-3 x+x^2\right ) \log (1+x)}{-4 x-3 x^2+x^3} \, dx=x+\log ^2(x)-e^{x+7} \log (x)+\log (x+1) \log (x)-2 \log (4) \log (8-2 x)-\log (4-x)+2 \log (4) \log (x-4) \]

[In]

Int[(-5*x - 4*x^2 + x^3 + E^(7 + x)*(4 + 3*x - x^2) + (-8 - 10*x + 3*x^2 + E^(7 + x)*(4*x + 3*x^2 - x^3))*Log[
x] + (-4 - 3*x + x^2)*Log[1 + x])/(-4*x - 3*x^2 + x^3),x]

[Out]

x - 2*Log[4]*Log[8 - 2*x] - Log[4 - x] + 2*Log[4]*Log[-4 + x] - E^(7 + x)*Log[x] + Log[x]^2 + Log[x]*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 84

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rule 630

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/Simp
[b/2 - q/2 + c*x, x], x], x] - Dist[c/q, Int[1/Simp[b/2 + q/2 + c*x, x], x], x]] /; FreeQ[{a, b, c}, x] && NeQ
[b^2 - 4*a*c, 0] && PosQ[b^2 - 4*a*c] && PerfectSquareQ[b^2 - 4*a*c]

Rule 646

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[
(c*d - e*(b/2 - q/2))/q, Int[1/(b/2 - q/2 + c*x), x], x] - Dist[(c*d - e*(b/2 + q/2))/q, Int[1/(b/2 + q/2 + c*
x), x], x]] /; FreeQ[{a, b, c, d, e}, x] && NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] && NiceSqrtQ[b^2 - 4*a*
c]

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 2326

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = v*(y/(Log[F]*D[u, x]))}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

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 2352

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

Rule 2353

Int[((a_.) + Log[(c_.)*(x_)]*(b_.))/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(a + b*Log[(-c)*(d/e)])*(Log[d + e*
x]/e), x] + Dist[b, Int[Log[(-e)*(x/d)]/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e}, x] && GtQ[(-c)*(d/e), 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 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 6860

Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a +
b*x^n + c*x^(2*n)), x]}, Int[v, x] /; SumQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && IGtQ[n, 0]

Rubi steps \begin{align*} \text {integral}& = \int \frac {-5 x-4 x^2+x^3+e^{7+x} \left (4+3 x-x^2\right )+\left (-8-10 x+3 x^2+e^{7+x} \left (4 x+3 x^2-x^3\right )\right ) \log (x)+\left (-4-3 x+x^2\right ) \log (1+x)}{x \left (-4-3 x+x^2\right )} \, dx \\ & = \int \left (\frac {x^2}{(-4+x) (1+x)}-\frac {5}{-4-3 x+x^2}-\frac {4 x}{-4-3 x+x^2}+\frac {3 x \log (x)}{(-4+x) (1+x)}-\frac {10 \log (x)}{-4-3 x+x^2}-\frac {8 \log (x)}{x \left (-4-3 x+x^2\right )}-\frac {e^{7+x} (1+x \log (x))}{x}+\frac {\log (1+x)}{x}\right ) \, dx \\ & = 3 \int \frac {x \log (x)}{(-4+x) (1+x)} \, dx-4 \int \frac {x}{-4-3 x+x^2} \, dx-5 \int \frac {1}{-4-3 x+x^2} \, dx-8 \int \frac {\log (x)}{x \left (-4-3 x+x^2\right )} \, dx-10 \int \frac {\log (x)}{-4-3 x+x^2} \, dx+\int \frac {x^2}{(-4+x) (1+x)} \, dx-\int \frac {e^{7+x} (1+x \log (x))}{x} \, dx+\int \frac {\log (1+x)}{x} \, dx \\ & = -e^{7+x} \log (x)-\operatorname {PolyLog}(2,-x)-\frac {4}{5} \int \frac {1}{1+x} \, dx+3 \int \left (\frac {4 \log (x)}{5 (-4+x)}+\frac {\log (x)}{5 (1+x)}\right ) \, dx-\frac {16}{5} \int \frac {1}{-4+x} \, dx-8 \int \left (\frac {\log (x)}{20 (-4+x)}-\frac {\log (x)}{4 x}+\frac {\log (x)}{5 (1+x)}\right ) \, dx-10 \int \left (-\frac {2 \log (x)}{5 (8-2 x)}-\frac {2 \log (x)}{5 (2+2 x)}\right ) \, dx-\int \frac {1}{-4+x} \, dx+\int \frac {1}{1+x} \, dx+\int \left (1+\frac {16}{5 (-4+x)}-\frac {1}{5 (1+x)}\right ) \, dx \\ & = x-\log (4-x)-e^{7+x} \log (x)-\operatorname {PolyLog}(2,-x)-\frac {2}{5} \int \frac {\log (x)}{-4+x} \, dx+\frac {3}{5} \int \frac {\log (x)}{1+x} \, dx-\frac {8}{5} \int \frac {\log (x)}{1+x} \, dx+2 \int \frac {\log (x)}{x} \, dx+\frac {12}{5} \int \frac {\log (x)}{-4+x} \, dx+4 \int \frac {\log (x)}{8-2 x} \, dx+4 \int \frac {\log (x)}{2+2 x} \, dx \\ & = x-2 \log (4) \log (8-2 x)-\log (4-x)+2 \log (4) \log (-4+x)-e^{7+x} \log (x)+\log ^2(x)+\log (x) \log (1+x)-\operatorname {PolyLog}(2,-x)-\frac {2}{5} \int \frac {\log \left (\frac {x}{4}\right )}{-4+x} \, dx-\frac {3}{5} \int \frac {\log (1+x)}{x} \, dx+\frac {8}{5} \int \frac {\log (1+x)}{x} \, dx-2 \int \frac {\log (1+x)}{x} \, dx+\frac {12}{5} \int \frac {\log \left (\frac {x}{4}\right )}{-4+x} \, dx+4 \int \frac {\log \left (\frac {x}{4}\right )}{8-2 x} \, dx \\ & = x-2 \log (4) \log (8-2 x)-\log (4-x)+2 \log (4) \log (-4+x)-e^{7+x} \log (x)+\log ^2(x)+\log (x) \log (1+x) \\ \end{align*}

Mathematica [A] (verified)

Time = 0.28 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.11 \[ \int \frac {-5 x-4 x^2+x^3+e^{7+x} \left (4+3 x-x^2\right )+\left (-8-10 x+3 x^2+e^{7+x} \left (4 x+3 x^2-x^3\right )\right ) \log (x)+\left (-4-3 x+x^2\right ) \log (1+x)}{-4 x-3 x^2+x^3} \, dx=x-\log (4-x)-e^{7+x} \log (x)+\log ^2(x)+\log (x) \log (1+x) \]

[In]

Integrate[(-5*x - 4*x^2 + x^3 + E^(7 + x)*(4 + 3*x - x^2) + (-8 - 10*x + 3*x^2 + E^(7 + x)*(4*x + 3*x^2 - x^3)
)*Log[x] + (-4 - 3*x + x^2)*Log[1 + x])/(-4*x - 3*x^2 + x^3),x]

[Out]

x - Log[4 - x] - E^(7 + x)*Log[x] + Log[x]^2 + Log[x]*Log[1 + x]

Maple [A] (verified)

Time = 1.32 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.04

method result size
default \(x -\ln \left (x -4\right )-\ln \left (x \right ) {\mathrm e}^{x +7}+\ln \left (x \right )^{2}+\ln \left (x \right ) \ln \left (1+x \right )\) \(28\)
risch \(x -\ln \left (x -4\right )-\ln \left (x \right ) {\mathrm e}^{x +7}+\ln \left (x \right )^{2}+\ln \left (x \right ) \ln \left (1+x \right )\) \(28\)
parts \(x -\ln \left (x -4\right )-\ln \left (x \right ) {\mathrm e}^{x +7}+\ln \left (x \right )^{2}+\ln \left (x \right ) \ln \left (1+x \right )\) \(28\)
parallelrisch \(\ln \left (x \right )^{2}+\ln \left (x \right ) \ln \left (1+x \right )-\ln \left (x \right ) {\mathrm e}^{x +7}-\ln \left (x -4\right )+x -\frac {1}{2}\) \(29\)

[In]

int(((x^2-3*x-4)*ln(1+x)+((-x^3+3*x^2+4*x)*exp(x+7)+3*x^2-10*x-8)*ln(x)+(-x^2+3*x+4)*exp(x+7)+x^3-4*x^2-5*x)/(
x^3-3*x^2-4*x),x,method=_RETURNVERBOSE)

[Out]

x-ln(x-4)-ln(x)*exp(x+7)+ln(x)^2+ln(x)*ln(1+x)

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00 \[ \int \frac {-5 x-4 x^2+x^3+e^{7+x} \left (4+3 x-x^2\right )+\left (-8-10 x+3 x^2+e^{7+x} \left (4 x+3 x^2-x^3\right )\right ) \log (x)+\left (-4-3 x+x^2\right ) \log (1+x)}{-4 x-3 x^2+x^3} \, dx=-e^{\left (x + 7\right )} \log \left (x\right ) + \log \left (x + 1\right ) \log \left (x\right ) + \log \left (x\right )^{2} + x - \log \left (x - 4\right ) \]

[In]

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

[Out]

-e^(x + 7)*log(x) + log(x + 1)*log(x) + log(x)^2 + x - log(x - 4)

Sympy [A] (verification not implemented)

Time = 0.35 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00 \[ \int \frac {-5 x-4 x^2+x^3+e^{7+x} \left (4+3 x-x^2\right )+\left (-8-10 x+3 x^2+e^{7+x} \left (4 x+3 x^2-x^3\right )\right ) \log (x)+\left (-4-3 x+x^2\right ) \log (1+x)}{-4 x-3 x^2+x^3} \, dx=x - e^{x + 7} \log {\left (x \right )} + \log {\left (x \right )}^{2} + \log {\left (x \right )} \log {\left (x + 1 \right )} - \log {\left (x - 4 \right )} \]

[In]

integrate(((x**2-3*x-4)*ln(1+x)+((-x**3+3*x**2+4*x)*exp(x+7)+3*x**2-10*x-8)*ln(x)+(-x**2+3*x+4)*exp(x+7)+x**3-
4*x**2-5*x)/(x**3-3*x**2-4*x),x)

[Out]

x - exp(x + 7)*log(x) + log(x)**2 + log(x)*log(x + 1) - log(x - 4)

Maxima [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00 \[ \int \frac {-5 x-4 x^2+x^3+e^{7+x} \left (4+3 x-x^2\right )+\left (-8-10 x+3 x^2+e^{7+x} \left (4 x+3 x^2-x^3\right )\right ) \log (x)+\left (-4-3 x+x^2\right ) \log (1+x)}{-4 x-3 x^2+x^3} \, dx=-e^{\left (x + 7\right )} \log \left (x\right ) + \log \left (x + 1\right ) \log \left (x\right ) + \log \left (x\right )^{2} + x - \log \left (x - 4\right ) \]

[In]

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

[Out]

-e^(x + 7)*log(x) + log(x + 1)*log(x) + log(x)^2 + x - log(x - 4)

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00 \[ \int \frac {-5 x-4 x^2+x^3+e^{7+x} \left (4+3 x-x^2\right )+\left (-8-10 x+3 x^2+e^{7+x} \left (4 x+3 x^2-x^3\right )\right ) \log (x)+\left (-4-3 x+x^2\right ) \log (1+x)}{-4 x-3 x^2+x^3} \, dx=-e^{\left (x + 7\right )} \log \left (x\right ) + \log \left (x + 1\right ) \log \left (x\right ) + \log \left (x\right )^{2} + x - \log \left (x - 4\right ) \]

[In]

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

[Out]

-e^(x + 7)*log(x) + log(x + 1)*log(x) + log(x)^2 + x - log(x - 4)

Mupad [B] (verification not implemented)

Time = 17.28 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.00 \[ \int \frac {-5 x-4 x^2+x^3+e^{7+x} \left (4+3 x-x^2\right )+\left (-8-10 x+3 x^2+e^{7+x} \left (4 x+3 x^2-x^3\right )\right ) \log (x)+\left (-4-3 x+x^2\right ) \log (1+x)}{-4 x-3 x^2+x^3} \, dx=x-\ln \left (x-4\right )+{\ln \left (x\right )}^2-{\mathrm {e}}^{x+7}\,\ln \left (x\right )+\ln \left (x+1\right )\,\ln \left (x\right ) \]

[In]

int((5*x - exp(x + 7)*(3*x - x^2 + 4) + log(x + 1)*(3*x - x^2 + 4) + 4*x^2 - x^3 + log(x)*(10*x - exp(x + 7)*(
4*x + 3*x^2 - x^3) - 3*x^2 + 8))/(4*x + 3*x^2 - x^3),x)

[Out]

x - log(x - 4) + log(x)^2 - exp(x + 7)*log(x) + log(x + 1)*log(x)