3.87.72 \(\int \frac {-4+2 x+11 x^3+(1-2 x^3) \log (x)+(-1-2 x-x^3) \log (\frac {2+4 x+2 x^3}{x})}{x+2 x^2+x^4} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.76, antiderivative size = 31, normalized size of antiderivative = 1.41, number of steps used = 20, number of rules used = 7, integrand size = 59, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.119, Rules used = {1594, 6742, 1587, 2357, 2301, 2524, 1593} \begin {gather*} 5 \log \left (x^3+2 x+1\right )-\log \left (2 \left (x^2+\frac {1}{x}+2\right )\right ) \log (x)-4 \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 1587

Int[(Pp_)/(Qq_), x_Symbol] :> With[{p = Expon[Pp, x], q = Expon[Qq, x]}, Simp[(Coeff[Pp, x, p]*Log[RemoveConte
nt[Qq, x]])/(q*Coeff[Qq, x, q]), x] /; EqQ[p, q - 1] && EqQ[Pp, Simplify[(Coeff[Pp, x, p]*D[Qq, x])/(q*Coeff[Q
q, x, q])]]] /; PolyQ[Pp, x] && PolyQ[Qq, x]

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

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

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

________________________________________________________________________________________

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

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x^3-2*x-1)*log((2*x^3+4*x+2)/x)+(-2*x^3+1)*log(x)+11*x^3+2*x-4)/(x^4+2*x^2+x),x, algorithm="frica
s")

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.49, size = 40, normalized size = 1.82




method result size



default \(5 \ln \left (x^{3}+2 x +1\right )-4 \ln \relax (x )-\ln \relax (x ) \ln \left (\frac {x^{3}+2 x +1}{x}\right )-\ln \relax (2) \ln \relax (x )\) \(40\)
risch \(-\ln \relax (x ) \ln \left (x^{3}+2 x +1\right )+\ln \relax (x )^{2}+\frac {i \pi \ln \left (\left (59 \pi \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (x^{3}+2 x +1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )-59 \pi \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{2}-59 \pi \,\mathrm {csgn}\left (i \left (x^{3}+2 x +1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{2}+59 \pi \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{3}+118 i \ln \relax (2)+1062 i\right ) x \right ) \mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (x^{3}+2 x +1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )}{2}-\frac {i \pi \ln \left (\left (59 \pi \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (x^{3}+2 x +1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )-59 \pi \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{2}-59 \pi \,\mathrm {csgn}\left (i \left (x^{3}+2 x +1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{2}+59 \pi \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{3}+118 i \ln \relax (2)+1062 i\right ) x \right ) \mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{2}}{2}-\frac {i \pi \ln \left (\left (59 \pi \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (x^{3}+2 x +1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )-59 \pi \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{2}-59 \pi \,\mathrm {csgn}\left (i \left (x^{3}+2 x +1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{2}+59 \pi \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{3}+118 i \ln \relax (2)+1062 i\right ) x \right ) \mathrm {csgn}\left (i \left (x^{3}+2 x +1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{2}}{2}+\frac {i \pi \ln \left (\left (59 \pi \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (x^{3}+2 x +1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )-59 \pi \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{2}-59 \pi \,\mathrm {csgn}\left (i \left (x^{3}+2 x +1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{2}+59 \pi \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{3}+118 i \ln \relax (2)+1062 i\right ) x \right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{3}}{2}-\ln \relax (2) \ln \left (\left (59 \pi \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (x^{3}+2 x +1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )-59 \pi \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{2}-59 \pi \,\mathrm {csgn}\left (i \left (x^{3}+2 x +1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{2}+59 \pi \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{3}+118 i \ln \relax (2)+1062 i\right ) x \right )-4 \ln \left (\left (59 \pi \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (i \left (x^{3}+2 x +1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )-59 \pi \,\mathrm {csgn}\left (\frac {i}{x}\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{2}-59 \pi \,\mathrm {csgn}\left (i \left (x^{3}+2 x +1\right )\right ) \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{2}+59 \pi \mathrm {csgn}\left (\frac {i \left (x^{3}+2 x +1\right )}{x}\right )^{3}+118 i \ln \relax (2)+1062 i\right ) x \right )+5 \ln \left (x^{3}+2 x +1\right )\) \(918\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.44, size = 28, normalized size = 1.27 \begin {gather*} -{\left (\log \relax (x) - 5\right )} \log \left (x^{3} + 2 \, x + 1\right ) - {\left (\log \relax (2) + 4\right )} \log \relax (x) + \log \relax (x)^{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x^3-2*x-1)*log((2*x^3+4*x+2)/x)+(-2*x^3+1)*log(x)+11*x^3+2*x-4)/(x^4+2*x^2+x),x, algorithm="maxim
a")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 5.80, size = 35, normalized size = 1.59 \begin {gather*} 5\,\ln \left (x^3+2\,x+1\right )-4\,\ln \relax (x)-\ln \left (\frac {2\,x^3+4\,x+2}{x}\right )\,\ln \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(log((4*x + 2*x^3 + 2)/x)*(2*x + x^3 + 1) - 2*x - 11*x^3 + log(x)*(2*x^3 - 1) + 4)/(x + 2*x^2 + x^4),x)

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-x**3-2*x-1)*ln((2*x**3+4*x+2)/x)+(-2*x**3+1)*ln(x)+11*x**3+2*x-4)/(x**4+2*x**2+x),x)

[Out]

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

________________________________________________________________________________________