3.88.75 \(\int \frac {-19 x-35 x^2-2 x^3+3 x^4+(-32-32 x-6 x^2+4 x^3) \log (x)+(-4 x+x^2) \log ^2(x)}{-4 x+x^2} \, dx\)

Optimal. Leaf size=24 \[ 3-x+\log (-4+x)-(4+x) \left (2-(x+\log (x))^2\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.23, antiderivative size = 42, normalized size of antiderivative = 1.75, number of steps used = 12, number of rules used = 8, integrand size = 59, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {1593, 6688, 1850, 2357, 2295, 2301, 2304, 2296} \begin {gather*} x^3+4 x^2+2 x^2 \log (x)-3 x+x \log ^2(x)+4 \log ^2(x)+8 x \log (x)+\log (4-x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-19*x - 35*x^2 - 2*x^3 + 3*x^4 + (-32 - 32*x - 6*x^2 + 4*x^3)*Log[x] + (-4*x + x^2)*Log[x]^2)/(-4*x + x^2
),x]

[Out]

-3*x + 4*x^2 + x^3 + Log[4 - x] + 8*x*Log[x] + 2*x^2*Log[x] + 4*Log[x]^2 + x*Log[x]^2

Rule 1593

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

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 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2296

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*Log[c*x^n])^p, x] - Dist[b*n*p, In
t[(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{a, b, c, n}, x] && GtQ[p, 0] && IntegerQ[2*p]

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 2304

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 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 6688

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {-19 x-35 x^2-2 x^3+3 x^4+\left (-32-32 x-6 x^2+4 x^3\right ) \log (x)+\left (-4 x+x^2\right ) \log ^2(x)}{(-4+x) x} \, dx\\ &=\int \left (\frac {19+35 x+2 x^2-3 x^3}{4-x}+\left (10+\frac {8}{x}+4 x\right ) \log (x)+\log ^2(x)\right ) \, dx\\ &=\int \frac {19+35 x+2 x^2-3 x^3}{4-x} \, dx+\int \left (10+\frac {8}{x}+4 x\right ) \log (x) \, dx+\int \log ^2(x) \, dx\\ &=x \log ^2(x)-2 \int \log (x) \, dx+\int \left (5+\frac {1}{-4+x}+10 x+3 x^2\right ) \, dx+\int \left (10 \log (x)+\frac {8 \log (x)}{x}+4 x \log (x)\right ) \, dx\\ &=7 x+5 x^2+x^3+\log (4-x)-2 x \log (x)+x \log ^2(x)+4 \int x \log (x) \, dx+8 \int \frac {\log (x)}{x} \, dx+10 \int \log (x) \, dx\\ &=-3 x+4 x^2+x^3+\log (4-x)+8 x \log (x)+2 x^2 \log (x)+4 \log ^2(x)+x \log ^2(x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 35, normalized size = 1.46 \begin {gather*} -164-3 x+4 x^2+x^3+\log (4-x)+2 x (4+x) \log (x)+(4+x) \log ^2(x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-19*x - 35*x^2 - 2*x^3 + 3*x^4 + (-32 - 32*x - 6*x^2 + 4*x^3)*Log[x] + (-4*x + x^2)*Log[x]^2)/(-4*x
 + x^2),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.54, size = 35, normalized size = 1.46 \begin {gather*} x^{3} + {\left (x + 4\right )} \log \relax (x)^{2} + 4 \, x^{2} + 2 \, {\left (x^{2} + 4 \, x\right )} \log \relax (x) - 3 \, x + \log \left (x - 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2-4*x)*log(x)^2+(4*x^3-6*x^2-32*x-32)*log(x)+3*x^4-2*x^3-35*x^2-19*x)/(x^2-4*x),x, algorithm="fr
icas")

[Out]

x^3 + (x + 4)*log(x)^2 + 4*x^2 + 2*(x^2 + 4*x)*log(x) - 3*x + log(x - 4)

________________________________________________________________________________________

giac [A]  time = 0.13, size = 35, normalized size = 1.46 \begin {gather*} x^{3} + {\left (x + 4\right )} \log \relax (x)^{2} + 4 \, x^{2} + 2 \, {\left (x^{2} + 4 \, x\right )} \log \relax (x) - 3 \, x + \log \left (x - 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2-4*x)*log(x)^2+(4*x^3-6*x^2-32*x-32)*log(x)+3*x^4-2*x^3-35*x^2-19*x)/(x^2-4*x),x, algorithm="gi
ac")

[Out]

x^3 + (x + 4)*log(x)^2 + 4*x^2 + 2*(x^2 + 4*x)*log(x) - 3*x + log(x - 4)

________________________________________________________________________________________

maple [A]  time = 0.44, size = 37, normalized size = 1.54




method result size



risch \(\left (4+x \right ) \ln \relax (x )^{2}+\left (2 x^{2}+8 x \right ) \ln \relax (x )+x^{3}+4 x^{2}-3 x +\ln \left (x -4\right )\) \(37\)
default \(x \ln \relax (x )^{2}+8 x \ln \relax (x )-3 x +x^{3}+4 x^{2}+\ln \left (x -4\right )+2 x^{2} \ln \relax (x )+4 \ln \relax (x )^{2}\) \(41\)
norman \(x \ln \relax (x )^{2}+8 x \ln \relax (x )-3 x +x^{3}+4 x^{2}+\ln \left (x -4\right )+2 x^{2} \ln \relax (x )+4 \ln \relax (x )^{2}\) \(41\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x^2-4*x)*ln(x)^2+(4*x^3-6*x^2-32*x-32)*ln(x)+3*x^4-2*x^3-35*x^2-19*x)/(x^2-4*x),x,method=_RETURNVERBOSE)

[Out]

(4+x)*ln(x)^2+(2*x^2+8*x)*ln(x)+x^3+4*x^2-3*x+ln(x-4)

________________________________________________________________________________________

maxima [A]  time = 0.38, size = 35, normalized size = 1.46 \begin {gather*} x^{3} + {\left (x + 4\right )} \log \relax (x)^{2} + 4 \, x^{2} + 2 \, {\left (x^{2} + 4 \, x\right )} \log \relax (x) - 3 \, x + \log \left (x - 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2-4*x)*log(x)^2+(4*x^3-6*x^2-32*x-32)*log(x)+3*x^4-2*x^3-35*x^2-19*x)/(x^2-4*x),x, algorithm="ma
xima")

[Out]

x^3 + (x + 4)*log(x)^2 + 4*x^2 + 2*(x^2 + 4*x)*log(x) - 3*x + log(x - 4)

________________________________________________________________________________________

mupad [B]  time = 5.51, size = 40, normalized size = 1.67 \begin {gather*} \ln \left (x-4\right )-3\,x+x\,{\ln \relax (x)}^2+2\,x^2\,\ln \relax (x)+4\,{\ln \relax (x)}^2+8\,x\,\ln \relax (x)+4\,x^2+x^3 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((19*x + log(x)^2*(4*x - x^2) + 35*x^2 + 2*x^3 - 3*x^4 + log(x)*(32*x + 6*x^2 - 4*x^3 + 32))/(4*x - x^2),x)

[Out]

log(x - 4) - 3*x + x*log(x)^2 + 2*x^2*log(x) + 4*log(x)^2 + 8*x*log(x) + 4*x^2 + x^3

________________________________________________________________________________________

sympy [A]  time = 0.16, size = 36, normalized size = 1.50 \begin {gather*} x^{3} + 4 x^{2} - 3 x + \left (x + 4\right ) \log {\relax (x )}^{2} + \left (2 x^{2} + 8 x\right ) \log {\relax (x )} + \log {\left (x - 4 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x**2-4*x)*ln(x)**2+(4*x**3-6*x**2-32*x-32)*ln(x)+3*x**4-2*x**3-35*x**2-19*x)/(x**2-4*x),x)

[Out]

x**3 + 4*x**2 - 3*x + (x + 4)*log(x)**2 + (2*x**2 + 8*x)*log(x) + log(x - 4)

________________________________________________________________________________________