3.41.33 \(\int \frac {2+2 x-x^2-x^3+(2 x-x^2+x^3) \log (\frac {x}{2-x+x^2})}{10 x-5 x^2+5 x^3} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.30, antiderivative size = 38, normalized size of antiderivative = 1.73, number of steps used = 16, number of rules used = 9, integrand size = 58, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.155, Rules used = {1594, 6728, 1628, 634, 618, 204, 628, 2523, 1657} \begin {gather*} \frac {1}{5} x \log \left (\frac {x}{x^2-x+2}\right )-\frac {1}{5} \log \left (x^2-x+2\right )+\frac {\log (x)}{5} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 618

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

Rule 628

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

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), 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 1628

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 1657

Int[(Pq_)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x + c*x^2)^p, x
], x] /; FreeQ[{a, b, c}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 2523

Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.), x_Symbol] :> Simp[x*(a + b*Log[c*RFx^p])^n, x] - Dist[b*n*p
, Int[SimplifyIntegrand[(x*(a + b*Log[c*RFx^p])^(n - 1)*D[RFx, x])/RFx, x], x], x] /; FreeQ[{a, b, c, p}, x] &
& RationalFunctionQ[RFx, x] && IGtQ[n, 0]

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 {2+2 x-x^2-x^3+\left (2 x-x^2+x^3\right ) \log \left (\frac {x}{2-x+x^2}\right )}{x \left (10-5 x+5 x^2\right )} \, dx\\ &=\int \left (\frac {2+2 x-x^2-x^3}{5 x \left (2-x+x^2\right )}+\frac {1}{5} \log \left (\frac {x}{2-x+x^2}\right )\right ) \, dx\\ &=\frac {1}{5} \int \frac {2+2 x-x^2-x^3}{x \left (2-x+x^2\right )} \, dx+\frac {1}{5} \int \log \left (\frac {x}{2-x+x^2}\right ) \, dx\\ &=\frac {1}{5} x \log \left (\frac {x}{2-x+x^2}\right )-\frac {1}{5} \int \frac {2-x^2}{2-x+x^2} \, dx+\frac {1}{5} \int \left (-1+\frac {1}{x}+\frac {5-3 x}{2-x+x^2}\right ) \, dx\\ &=-\frac {x}{5}+\frac {\log (x)}{5}+\frac {1}{5} x \log \left (\frac {x}{2-x+x^2}\right )+\frac {1}{5} \int \frac {5-3 x}{2-x+x^2} \, dx-\frac {1}{5} \int \left (-1+\frac {4-x}{2-x+x^2}\right ) \, dx\\ &=\frac {\log (x)}{5}+\frac {1}{5} x \log \left (\frac {x}{2-x+x^2}\right )-\frac {1}{5} \int \frac {4-x}{2-x+x^2} \, dx-\frac {3}{10} \int \frac {-1+2 x}{2-x+x^2} \, dx+\frac {7}{10} \int \frac {1}{2-x+x^2} \, dx\\ &=\frac {\log (x)}{5}+\frac {1}{5} x \log \left (\frac {x}{2-x+x^2}\right )-\frac {3}{10} \log \left (2-x+x^2\right )+\frac {1}{10} \int \frac {-1+2 x}{2-x+x^2} \, dx-\frac {7}{10} \int \frac {1}{2-x+x^2} \, dx-\frac {7}{5} \operatorname {Subst}\left (\int \frac {1}{-7-x^2} \, dx,x,-1+2 x\right )\\ &=-\frac {1}{5} \sqrt {7} \tan ^{-1}\left (\frac {1-2 x}{\sqrt {7}}\right )+\frac {\log (x)}{5}+\frac {1}{5} x \log \left (\frac {x}{2-x+x^2}\right )-\frac {1}{5} \log \left (2-x+x^2\right )+\frac {7}{5} \operatorname {Subst}\left (\int \frac {1}{-7-x^2} \, dx,x,-1+2 x\right )\\ &=\frac {\log (x)}{5}+\frac {1}{5} x \log \left (\frac {x}{2-x+x^2}\right )-\frac {1}{5} \log \left (2-x+x^2\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 33, normalized size = 1.50 \begin {gather*} \frac {1}{5} \left (\log (x)+x \log \left (\frac {x}{2-x+x^2}\right )-\log \left (2-x+x^2\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.77, size = 18, normalized size = 0.82 \begin {gather*} \frac {1}{5} \, {\left (x + 1\right )} \log \left (\frac {x}{x^{2} - x + 2}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.16, size = 32, normalized size = 1.45 \begin {gather*} \frac {1}{5} \, x \log \left (\frac {x}{x^{2} - x + 2}\right ) - \frac {1}{5} \, \log \left (x^{2} - x + 2\right ) + \frac {1}{5} \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.06, size = 33, normalized size = 1.50




method result size



default \(-\frac {\ln \left (x^{2}-x +2\right )}{5}+\frac {\ln \relax (x )}{5}+\frac {\ln \left (\frac {x}{x^{2}-x +2}\right ) x}{5}\) \(33\)
norman \(\frac {\ln \left (\frac {x}{x^{2}-x +2}\right )}{5}+\frac {\ln \left (\frac {x}{x^{2}-x +2}\right ) x}{5}\) \(33\)
risch \(-\frac {\ln \left (x^{2}-x +2\right )}{5}+\frac {\ln \relax (x )}{5}+\frac {\ln \left (\frac {x}{x^{2}-x +2}\right ) x}{5}\) \(33\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/5*ln(x^2-x+2)+1/5*ln(x)+1/5*ln(x/(x^2-x+2))*x

________________________________________________________________________________________

maxima [B]  time = 0.58, size = 37, normalized size = 1.68 \begin {gather*} -\frac {1}{10} \, {\left (2 \, x - 1\right )} \log \left (x^{2} - x + 2\right ) + \frac {1}{5} \, x \log \relax (x) - \frac {3}{10} \, \log \left (x^{2} - x + 2\right ) + \frac {1}{5} \, \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.24, size = 33, normalized size = 1.50 \begin {gather*} \frac {\ln \relax (x)}{5}-\frac {\ln \left (x^2-x+2\right )}{5}-\frac {x\,\ln \left (x^2-x+2\right )}{5}+\frac {x\,\ln \relax (x)}{5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x)/5 - log(x^2 - x + 2)/5 - (x*log(x^2 - x + 2))/5 + (x*log(x))/5

________________________________________________________________________________________

sympy [A]  time = 0.19, size = 27, normalized size = 1.23 \begin {gather*} \frac {x \log {\left (\frac {x}{x^{2} - x + 2} \right )}}{5} + \frac {\log {\relax (x )}}{5} - \frac {\log {\left (x^{2} - x + 2 \right )}}{5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________