3.102.34 \(\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\)

Optimal. Leaf size=27 \[ x-\log (4-x)+\log (x) \left (-e^{7+x}+\log (x)+\log (1+x)\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 1.24, antiderivative size = 48, normalized size of antiderivative = 1.78, number of steps used = 32, number of rules used = 13, integrand size = 89, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.146, Rules used = {1594, 6728, 72, 616, 31, 632, 2357, 2316, 2315, 2317, 2391, 2301, 2288} \begin {gather*} 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) \end {gather*}

Antiderivative was successfully verified.

[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 72

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 616

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 632

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 1594

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 2288

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 2301

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 2315

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

Rule 2316

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 2317

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 2357

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 2391

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 6728

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 {gather*} \begin {aligned} \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)-\text {Li}_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)-\text {Li}_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)-\text {Li}_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 {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.28, size = 30, normalized size = 1.11 \begin {gather*} x-\log (4-x)-e^{7+x} \log (x)+\log ^2(x)+\log (x) \log (1+x) \end {gather*}

Antiderivative was successfully verified.

[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]

________________________________________________________________________________________

fricas [A]  time = 0.54, size = 27, normalized size = 1.00 \begin {gather*} -e^{\left (x + 7\right )} \log \relax (x) + \log \left (x + 1\right ) \log \relax (x) + \log \relax (x)^{2} + x - \log \left (x - 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2-3*x-4)*log(x+1)+((-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)

________________________________________________________________________________________

giac [A]  time = 0.20, size = 27, normalized size = 1.00 \begin {gather*} -e^{\left (x + 7\right )} \log \relax (x) + \log \left (x + 1\right ) \log \relax (x) + \log \relax (x)^{2} + x - \log \left (x - 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2-3*x-4)*log(x+1)+((-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)

________________________________________________________________________________________

maple [A]  time = 0.07, size = 28, normalized size = 1.04




method result size



default \(x -\ln \left (x -4\right )-\ln \relax (x ) {\mathrm e}^{x +7}+\ln \relax (x )^{2}+\ln \relax (x ) \ln \left (x +1\right )\) \(28\)
risch \(x -\ln \left (x -4\right )-\ln \relax (x ) {\mathrm e}^{x +7}+\ln \relax (x )^{2}+\ln \relax (x ) \ln \left (x +1\right )\) \(28\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x^2-3*x-4)*ln(x+1)+((-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(x+1)

________________________________________________________________________________________

maxima [A]  time = 0.40, size = 27, normalized size = 1.00 \begin {gather*} -e^{\left (x + 7\right )} \log \relax (x) + \log \left (x + 1\right ) \log \relax (x) + \log \relax (x)^{2} + x - \log \left (x - 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2-3*x-4)*log(x+1)+((-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)

________________________________________________________________________________________

mupad [B]  time = 8.07, size = 27, normalized size = 1.00 \begin {gather*} x-\ln \left (x-4\right )+{\ln \relax (x)}^2-{\mathrm {e}}^{x+7}\,\ln \relax (x)+\ln \left (x+1\right )\,\ln \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

sympy [A]  time = 0.56, size = 27, normalized size = 1.00 \begin {gather*} x - e^{x + 7} \log {\relax (x )} + \log {\relax (x )}^{2} + \log {\relax (x )} \log {\left (x + 1 \right )} - \log {\left (x - 4 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x**2-3*x-4)*ln(x+1)+((-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)

________________________________________________________________________________________