3.82.96 \(\int \frac {64-28 x+8 x^2-x^3+(-16+8 x-x^2) \log (2)+(16-8 x+x^2) \log (4-x)}{-64 x+32 x^2-4 x^3+(16 x-4 x^2) \log (2)+(-16 x+4 x^2) \log (4-x)} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.70, antiderivative size = 24, normalized size of antiderivative = 0.89, number of steps used = 7, number of rules used = 5, integrand size = 88, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.057, Rules used = {6741, 12, 6742, 43, 6684} \begin {gather*} \frac {x}{4}-\log (x)+\log \left (-x+\log \left (2-\frac {x}{2}\right )+4\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(64 - 28*x + 8*x^2 - x^3 + (-16 + 8*x - x^2)*Log[2] + (16 - 8*x + x^2)*Log[4 - x])/(-64*x + 32*x^2 - 4*x^3
 + (16*x - 4*x^2)*Log[2] + (-16*x + 4*x^2)*Log[4 - x]),x]

[Out]

x/4 - Log[x] + Log[4 - x + Log[2 - x/2]]

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, 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 6684

Int[(u_)/(y_), x_Symbol] :> With[{q = DerivativeDivides[y, u, x]}, Simp[q*Log[RemoveContent[y, x]], x] /;  !Fa
lseQ[q]]

Rule 6741

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

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 \frac {64-28 x+8 x^2-x^3+\left (-16+8 x-x^2\right ) \log (2)+\left (16-8 x+x^2\right ) \log (4-x)}{4 (4-x) x \left (x-4 \left (1-\frac {\log (2)}{4}\right )-\log (4-x)\right )} \, dx\\ &=\frac {1}{4} \int \frac {64-28 x+8 x^2-x^3+\left (-16+8 x-x^2\right ) \log (2)+\left (16-8 x+x^2\right ) \log (4-x)}{(4-x) x \left (x-4 \left (1-\frac {\log (2)}{4}\right )-\log (4-x)\right )} \, dx\\ &=\frac {1}{4} \int \left (\frac {-4+x}{x}+\frac {4 (-5+x)}{(-4+x) \left (-4+x-\log \left (2-\frac {x}{2}\right )\right )}\right ) \, dx\\ &=\frac {1}{4} \int \frac {-4+x}{x} \, dx+\int \frac {-5+x}{(-4+x) \left (-4+x-\log \left (2-\frac {x}{2}\right )\right )} \, dx\\ &=\log \left (4-x+\log \left (2-\frac {x}{2}\right )\right )+\frac {1}{4} \int \left (1-\frac {4}{x}\right ) \, dx\\ &=\frac {x}{4}-\log (x)+\log \left (4-x+\log \left (2-\frac {x}{2}\right )\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [F]  time = 1.07, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {64-28 x+8 x^2-x^3+\left (-16+8 x-x^2\right ) \log (2)+\left (16-8 x+x^2\right ) \log (4-x)}{-64 x+32 x^2-4 x^3+\left (16 x-4 x^2\right ) \log (2)+\left (-16 x+4 x^2\right ) \log (4-x)} \, dx \end {gather*}

Verification is not applicable to the result.

[In]

Integrate[(64 - 28*x + 8*x^2 - x^3 + (-16 + 8*x - x^2)*Log[2] + (16 - 8*x + x^2)*Log[4 - x])/(-64*x + 32*x^2 -
 4*x^3 + (16*x - 4*x^2)*Log[2] + (-16*x + 4*x^2)*Log[4 - x]),x]

[Out]

Integrate[(64 - 28*x + 8*x^2 - x^3 + (-16 + 8*x - x^2)*Log[2] + (16 - 8*x + x^2)*Log[4 - x])/(-64*x + 32*x^2 -
 4*x^3 + (16*x - 4*x^2)*Log[2] + (-16*x + 4*x^2)*Log[4 - x]), x]

________________________________________________________________________________________

fricas [A]  time = 0.59, size = 24, normalized size = 0.89 \begin {gather*} \frac {1}{4} \, x - \log \relax (x) + \log \left (-x - \log \relax (2) + \log \left (-x + 4\right ) + 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2-8*x+16)*log(-x+4)+(-x^2+8*x-16)*log(2)-x^3+8*x^2-28*x+64)/((4*x^2-16*x)*log(-x+4)+(-4*x^2+16*x
)*log(2)-4*x^3+32*x^2-64*x),x, algorithm="fricas")

[Out]

1/4*x - log(x) + log(-x - log(2) + log(-x + 4) + 4)

________________________________________________________________________________________

giac [A]  time = 0.20, size = 24, normalized size = 0.89 \begin {gather*} \frac {1}{4} \, x - \log \relax (x) + \log \left (-x - \log \relax (2) + \log \left (-x + 4\right ) + 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2-8*x+16)*log(-x+4)+(-x^2+8*x-16)*log(2)-x^3+8*x^2-28*x+64)/((4*x^2-16*x)*log(-x+4)+(-4*x^2+16*x
)*log(2)-4*x^3+32*x^2-64*x),x, algorithm="giac")

[Out]

1/4*x - log(x) + log(-x - log(2) + log(-x + 4) + 4)

________________________________________________________________________________________

maple [A]  time = 0.11, size = 23, normalized size = 0.85




method result size



norman \(\frac {x}{4}-\ln \relax (x )+\ln \left (x -\ln \left (-x +4\right )-4+\ln \relax (2)\right )\) \(23\)
risch \(\frac {x}{4}-\ln \relax (x )+\ln \left (-x -\ln \relax (2)+\ln \left (-x +4\right )+4\right )\) \(25\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x^2-8*x+16)*ln(-x+4)+(-x^2+8*x-16)*ln(2)-x^3+8*x^2-28*x+64)/((4*x^2-16*x)*ln(-x+4)+(-4*x^2+16*x)*ln(2)-4
*x^3+32*x^2-64*x),x,method=_RETURNVERBOSE)

[Out]

1/4*x-ln(x)+ln(x-ln(-x+4)-4+ln(2))

________________________________________________________________________________________

maxima [A]  time = 0.49, size = 24, normalized size = 0.89 \begin {gather*} \frac {1}{4} \, x - \log \relax (x) + \log \left (-x - \log \relax (2) + \log \left (-x + 4\right ) + 4\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^2-8*x+16)*log(-x+4)+(-x^2+8*x-16)*log(2)-x^3+8*x^2-28*x+64)/((4*x^2-16*x)*log(-x+4)+(-4*x^2+16*x
)*log(2)-4*x^3+32*x^2-64*x),x, algorithm="maxima")

[Out]

1/4*x - log(x) + log(-x - log(2) + log(-x + 4) + 4)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.04 \begin {gather*} \int \frac {28\,x-\ln \left (4-x\right )\,\left (x^2-8\,x+16\right )-8\,x^2+x^3+\ln \relax (2)\,\left (x^2-8\,x+16\right )-64}{64\,x-\ln \relax (2)\,\left (16\,x-4\,x^2\right )+\ln \left (4-x\right )\,\left (16\,x-4\,x^2\right )-32\,x^2+4\,x^3} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((28*x - log(4 - x)*(x^2 - 8*x + 16) - 8*x^2 + x^3 + log(2)*(x^2 - 8*x + 16) - 64)/(64*x - log(2)*(16*x - 4
*x^2) + log(4 - x)*(16*x - 4*x^2) - 32*x^2 + 4*x^3),x)

[Out]

int((28*x - log(4 - x)*(x^2 - 8*x + 16) - 8*x^2 + x^3 + log(2)*(x^2 - 8*x + 16) - 64)/(64*x - log(2)*(16*x - 4
*x^2) + log(4 - x)*(16*x - 4*x^2) - 32*x^2 + 4*x^3), x)

________________________________________________________________________________________

sympy [A]  time = 0.22, size = 19, normalized size = 0.70 \begin {gather*} \frac {x}{4} - \log {\relax (x )} + \log {\left (- x + \log {\left (4 - x \right )} - \log {\relax (2 )} + 4 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x**2-8*x+16)*ln(-x+4)+(-x**2+8*x-16)*ln(2)-x**3+8*x**2-28*x+64)/((4*x**2-16*x)*ln(-x+4)+(-4*x**2+1
6*x)*ln(2)-4*x**3+32*x**2-64*x),x)

[Out]

x/4 - log(x) + log(-x + log(4 - x) - log(2) + 4)

________________________________________________________________________________________