3.36.45 \(\int \frac {4-x+x^2+(4 x^2-x^3) \log (5)+(-8 x+2 x^2) \log (-4+x)}{-4+x} \, dx\)

Optimal. Leaf size=24 \[ \log \left (e^{1-x+x^2 \left (-\frac {1}{3} x \log (5)+\log (-4+x)\right )}\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.15, antiderivative size = 21, normalized size of antiderivative = 0.88, number of steps used = 7, number of rules used = 4, integrand size = 42, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {6742, 1850, 2395, 43} \begin {gather*} -\frac {1}{3} x^3 \log (5)+x^2 \log (x-4)-x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 43

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 1850

Int[(Pq_)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^n)^p, x], x] /; FreeQ[
{a, b, n}, x] && PolyQ[Pq, x] && (IGtQ[p, 0] || EqQ[n, 1])

Rule 2395

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

Rule 6742

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (\frac {-4+x+x^3 \log (5)-x^2 (1+\log (625))}{4-x}+2 x \log (-4+x)\right ) \, dx\\ &=2 \int x \log (-4+x) \, dx+\int \frac {-4+x+x^3 \log (5)-x^2 (1+\log (625))}{4-x} \, dx\\ &=x^2 \log (-4+x)-\int \frac {x^2}{-4+x} \, dx+\int \left (3+\frac {16}{-4+x}+x-x^2 \log (5)\right ) \, dx\\ &=3 x+\frac {x^2}{2}-\frac {1}{3} x^3 \log (5)+16 \log (4-x)+x^2 \log (-4+x)-\int \left (4+\frac {16}{-4+x}+x\right ) \, dx\\ &=-x-\frac {1}{3} x^3 \log (5)+x^2 \log (-4+x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 21, normalized size = 0.88 \begin {gather*} -x-\frac {1}{3} x^3 \log (5)+x^2 \log (-4+x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.69, size = 19, normalized size = 0.79 \begin {gather*} -\frac {1}{3} \, x^{3} \log \relax (5) + x^{2} \log \left (x - 4\right ) - x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.19, size = 19, normalized size = 0.79 \begin {gather*} -\frac {1}{3} \, x^{3} \log \relax (5) + x^{2} \log \left (x - 4\right ) - x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.10, size = 20, normalized size = 0.83




method result size



norman \(x^{2} \ln \left (x -4\right )-x -\frac {x^{3} \ln \relax (5)}{3}\) \(20\)
risch \(x^{2} \ln \left (x -4\right )-x -\frac {x^{3} \ln \relax (5)}{3}\) \(20\)
derivativedivides \(-\frac {\ln \relax (5) \left (x -4\right )^{3}}{3}-4 \ln \relax (5) \left (x -4\right )^{2}+\ln \left (x -4\right ) \left (x -4\right )^{2}-16 \left (x -4\right ) \ln \relax (5)+8 \left (x -4\right ) \ln \left (x -4\right )-x +4+16 \ln \left (x -4\right )\) \(56\)
default \(-\frac {\ln \relax (5) \left (x -4\right )^{3}}{3}-4 \ln \relax (5) \left (x -4\right )^{2}+\ln \left (x -4\right ) \left (x -4\right )^{2}-16 \left (x -4\right ) \ln \relax (5)+8 \left (x -4\right ) \ln \left (x -4\right )-x +4+16 \ln \left (x -4\right )\) \(56\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2*ln(x-4)-x-1/3*x^3*ln(5)

________________________________________________________________________________________

maxima [B]  time = 0.38, size = 75, normalized size = 3.12 \begin {gather*} -\frac {1}{3} \, {\left (x^{3} + 6 \, x^{2} + 48 \, x + 192 \, \log \left (x - 4\right )\right )} \log \relax (5) + 2 \, {\left (x^{2} + 8 \, x + 32 \, \log \left (x - 4\right )\right )} \log \relax (5) + {\left (x^{2} + 8 \, x + 32 \, \log \left (x - 4\right )\right )} \log \left (x - 4\right ) - 8 \, {\left (x + 4 \, \log \left (x - 4\right )\right )} \log \left (x - 4\right ) - x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/3*(x^3 + 6*x^2 + 48*x + 192*log(x - 4))*log(5) + 2*(x^2 + 8*x + 32*log(x - 4))*log(5) + (x^2 + 8*x + 32*log
(x - 4))*log(x - 4) - 8*(x + 4*log(x - 4))*log(x - 4) - x

________________________________________________________________________________________

mupad [B]  time = 2.14, size = 19, normalized size = 0.79 \begin {gather*} x^2\,\ln \left (x-4\right )-x-\frac {x^3\,\ln \relax (5)}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2*log(x - 4) - x - (x^3*log(5))/3

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 17, normalized size = 0.71 \begin {gather*} - \frac {x^{3} \log {\relax (5 )}}{3} + x^{2} \log {\left (x - 4 \right )} - x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-x**3*log(5)/3 + x**2*log(x - 4) - x

________________________________________________________________________________________