3.55.72 \(\int \frac {16 x^2-8 x^3+x^4+e^{4/x} (-64+32 x-4 x^2)+(16 x^5-4 x^6) \log (x^2)+(16 x^5-3 x^6) \log ^2(x^2)}{16 x^2-8 x^3+x^4} \, dx\)

Optimal. Leaf size=26 \[ e^{4/x}+x+\frac {x^4 \log ^2\left (x^2\right )}{4-x} \]

________________________________________________________________________________________

Rubi [B]  time = 0.66, antiderivative size = 56, normalized size of antiderivative = 2.15, number of steps used = 23, number of rules used = 14, integrand size = 83, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.169, Rules used = {1594, 27, 6688, 2209, 43, 2351, 2295, 2317, 2391, 2304, 2357, 2296, 2318, 2305} \begin {gather*} -4 x^2 \log ^2\left (x^2\right )+\frac {64 x \log ^2\left (x^2\right )}{4-x}-16 x \log ^2\left (x^2\right )+x^3 \left (-\log ^2\left (x^2\right )\right )+x+e^{4/x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^(4/x) + x - 16*x*Log[x^2]^2 + (64*x*Log[x^2]^2)/(4 - x) - 4*x^2*Log[x^2]^2 - x^3*Log[x^2]^2

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

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

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Simp[((e + f*x)^n*
F^(a + b*(c + d*x)^n))/(b*f*n*(c + d*x)^n*Log[F]), x] /; FreeQ[{F, a, b, c, d, e, f, n}, x] && EqQ[m, n - 1] &
& EqQ[d*e - c*f, 0]

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

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 0]

Rule 2317

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

Rule 2318

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

Rule 2351

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> Wit
h[{u = ExpandIntegrand[a + b*Log[c*x^n], (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c,
d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[m] && IntegerQ[r]))

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 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

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 {16 x^2-8 x^3+x^4+e^{4/x} \left (-64+32 x-4 x^2\right )+\left (16 x^5-4 x^6\right ) \log \left (x^2\right )+\left (16 x^5-3 x^6\right ) \log ^2\left (x^2\right )}{x^2 \left (16-8 x+x^2\right )} \, dx\\ &=\int \frac {16 x^2-8 x^3+x^4+e^{4/x} \left (-64+32 x-4 x^2\right )+\left (16 x^5-4 x^6\right ) \log \left (x^2\right )+\left (16 x^5-3 x^6\right ) \log ^2\left (x^2\right )}{(-4+x)^2 x^2} \, dx\\ &=\int \left (1-\frac {4 e^{4/x}}{x^2}-\frac {4 x^3 \log \left (x^2\right )}{-4+x}+\frac {(16-3 x) x^3 \log ^2\left (x^2\right )}{(-4+x)^2}\right ) \, dx\\ &=x-4 \int \frac {e^{4/x}}{x^2} \, dx-4 \int \frac {x^3 \log \left (x^2\right )}{-4+x} \, dx+\int \frac {(16-3 x) x^3 \log ^2\left (x^2\right )}{(-4+x)^2} \, dx\\ &=e^{4/x}+x-4 \int \left (16 \log \left (x^2\right )+\frac {64 \log \left (x^2\right )}{-4+x}+4 x \log \left (x^2\right )+x^2 \log \left (x^2\right )\right ) \, dx+\int \left (-16 \log ^2\left (x^2\right )+\frac {256 \log ^2\left (x^2\right )}{(-4+x)^2}-8 x \log ^2\left (x^2\right )-3 x^2 \log ^2\left (x^2\right )\right ) \, dx\\ &=e^{4/x}+x-3 \int x^2 \log ^2\left (x^2\right ) \, dx-4 \int x^2 \log \left (x^2\right ) \, dx-8 \int x \log ^2\left (x^2\right ) \, dx-16 \int x \log \left (x^2\right ) \, dx-16 \int \log ^2\left (x^2\right ) \, dx-64 \int \log \left (x^2\right ) \, dx-256 \int \frac {\log \left (x^2\right )}{-4+x} \, dx+256 \int \frac {\log ^2\left (x^2\right )}{(-4+x)^2} \, dx\\ &=e^{4/x}+129 x+8 x^2+\frac {8 x^3}{9}-64 x \log \left (x^2\right )-8 x^2 \log \left (x^2\right )-\frac {4}{3} x^3 \log \left (x^2\right )-256 \log \left (1-\frac {x}{4}\right ) \log \left (x^2\right )-16 x \log ^2\left (x^2\right )+\frac {64 x \log ^2\left (x^2\right )}{4-x}-4 x^2 \log ^2\left (x^2\right )-x^3 \log ^2\left (x^2\right )+4 \int x^2 \log \left (x^2\right ) \, dx+16 \int x \log \left (x^2\right ) \, dx+64 \int \log \left (x^2\right ) \, dx+256 \int \frac {\log \left (x^2\right )}{-4+x} \, dx+512 \int \frac {\log \left (1-\frac {x}{4}\right )}{x} \, dx\\ &=e^{4/x}+x-16 x \log ^2\left (x^2\right )+\frac {64 x \log ^2\left (x^2\right )}{4-x}-4 x^2 \log ^2\left (x^2\right )-x^3 \log ^2\left (x^2\right )-512 \text {Li}_2\left (\frac {x}{4}\right )-512 \int \frac {\log \left (1-\frac {x}{4}\right )}{x} \, dx\\ &=e^{4/x}+x-16 x \log ^2\left (x^2\right )+\frac {64 x \log ^2\left (x^2\right )}{4-x}-4 x^2 \log ^2\left (x^2\right )-x^3 \log ^2\left (x^2\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.07, size = 25, normalized size = 0.96 \begin {gather*} e^{4/x}+x-\frac {x^4 \log ^2\left (x^2\right )}{-4+x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.99, size = 37, normalized size = 1.42 \begin {gather*} -\frac {x^{4} \log \left (x^{2}\right )^{2} - x^{2} - {\left (x - 4\right )} e^{\frac {4}{x}} + 4 \, x}{x - 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(x^4*log(x^2)^2 - x^2 - (x - 4)*e^(4/x) + 4*x)/(x - 4)

________________________________________________________________________________________

giac [A]  time = 0.16, size = 36, normalized size = 1.38 \begin {gather*} -{\left (x^{3} + 4 \, x^{2} + 16 \, x + \frac {256}{x - 4} + 64\right )} \log \left (x^{2}\right )^{2} + x + e^{\frac {4}{x}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(x^3 + 4*x^2 + 16*x + 256/(x - 4) + 64)*log(x^2)^2 + x + e^(4/x)

________________________________________________________________________________________

maple [C]  time = 0.32, size = 599, normalized size = 23.04




method result size



risch \(-\frac {4 x^{4} \ln \relax (x )^{2}}{x -4}+\frac {2 i \pi \,\mathrm {csgn}\left (i x^{2}\right ) \left (x^{4} \mathrm {csgn}\left (i x \right )^{2}-2 x^{4} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )+x^{4} \mathrm {csgn}\left (i x^{2}\right )^{2}-64 x \mathrm {csgn}\left (i x \right )^{2}+128 x \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )-64 x \mathrm {csgn}\left (i x^{2}\right )^{2}+256 \mathrm {csgn}\left (i x \right )^{2}-512 \,\mathrm {csgn}\left (i x^{2}\right ) \mathrm {csgn}\left (i x \right )+256 \mathrm {csgn}\left (i x^{2}\right )^{2}\right ) \ln \relax (x )}{x -4}+\frac {-16 x -16 \,{\mathrm e}^{\frac {4}{x}}+4 x^{2}+512 i \pi \ln \relax (x ) \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right ) x +6 \pi ^{2} x^{4} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )^{4}-4 \pi ^{2} x^{4} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{5}-2048 i \pi \ln \relax (x ) \mathrm {csgn}\left (i x^{2}\right )^{3}-64 \pi ^{2} x \mathrm {csgn}\left (i x \right )^{4} \mathrm {csgn}\left (i x^{2}\right )^{2}+256 \pi ^{2} x \mathrm {csgn}\left (i x \right )^{3} \mathrm {csgn}\left (i x^{2}\right )^{3}-384 \pi ^{2} x \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )^{4}+256 \pi ^{2} x \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{5}+\pi ^{2} x^{4} \mathrm {csgn}\left (i x \right )^{4} \mathrm {csgn}\left (i x^{2}\right )^{2}-4 \pi ^{2} x^{4} \mathrm {csgn}\left (i x \right )^{3} \mathrm {csgn}\left (i x^{2}\right )^{3}+4 x \,{\mathrm e}^{\frac {4}{x}}+4096 i \pi \ln \relax (x ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}-1024 i \pi \ln \relax (x ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2} x +256 \pi ^{2} \mathrm {csgn}\left (i x^{2}\right )^{6}+256 \pi ^{2} \mathrm {csgn}\left (i x \right )^{4} \mathrm {csgn}\left (i x^{2}\right )^{2}-1024 \pi ^{2} \mathrm {csgn}\left (i x \right )^{3} \mathrm {csgn}\left (i x^{2}\right )^{3}+1536 \pi ^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )^{4}-1024 \pi ^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{5}+\pi ^{2} x^{4} \mathrm {csgn}\left (i x^{2}\right )^{6}-64 \pi ^{2} x \mathrm {csgn}\left (i x^{2}\right )^{6}+512 i \pi \ln \relax (x ) \mathrm {csgn}\left (i x^{2}\right )^{3} x -2048 i \pi \ln \relax (x ) \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )}{4 x -16}\) \(599\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-4*x^4/(x-4)*ln(x)^2+2*I*Pi*csgn(I*x^2)*(x^4*csgn(I*x)^2-2*x^4*csgn(I*x)*csgn(I*x^2)+x^4*csgn(I*x^2)^2-64*x*cs
gn(I*x)^2+128*x*csgn(I*x)*csgn(I*x^2)-64*x*csgn(I*x^2)^2+256*csgn(I*x)^2-512*csgn(I*x^2)*csgn(I*x)+256*csgn(I*
x^2)^2)/(x-4)*ln(x)+1/4*(-16*x+256*Pi^2*csgn(I*x)^4*csgn(I*x^2)^2-1024*Pi^2*csgn(I*x)^3*csgn(I*x^2)^3+1536*Pi^
2*csgn(I*x)^2*csgn(I*x^2)^4-1024*Pi^2*csgn(I*x)*csgn(I*x^2)^5-16*exp(4/x)+4*x^2-1024*I*Pi*ln(x)*csgn(I*x)*csgn
(I*x^2)^2*x+512*I*Pi*ln(x)*csgn(I*x)^2*csgn(I*x^2)*x+Pi^2*x^4*csgn(I*x)^4*csgn(I*x^2)^2-4*Pi^2*x^4*csgn(I*x)^3
*csgn(I*x^2)^3+6*Pi^2*x^4*csgn(I*x)^2*csgn(I*x^2)^4-4*Pi^2*x^4*csgn(I*x)*csgn(I*x^2)^5-2048*I*Pi*ln(x)*csgn(I*
x^2)^3+4*x*exp(4/x)+Pi^2*x^4*csgn(I*x^2)^6+256*Pi^2*csgn(I*x^2)^6-64*Pi^2*x*csgn(I*x^2)^6+4096*I*Pi*ln(x)*csgn
(I*x)*csgn(I*x^2)^2+512*I*Pi*ln(x)*csgn(I*x^2)^3*x-2048*I*Pi*ln(x)*csgn(I*x)^2*csgn(I*x^2)-64*Pi^2*x*csgn(I*x)
^4*csgn(I*x^2)^2+256*Pi^2*x*csgn(I*x)^3*csgn(I*x^2)^3-384*Pi^2*x*csgn(I*x)^2*csgn(I*x^2)^4+256*Pi^2*x*csgn(I*x
)*csgn(I*x^2)^5)/(x-4)

________________________________________________________________________________________

maxima [A]  time = 0.45, size = 30, normalized size = 1.15 \begin {gather*} x - \frac {4 \, x^{4} \log \relax (x)^{2} - {\left (x - 4\right )} e^{\frac {4}{x}}}{x - 4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x - (4*x^4*log(x)^2 - (x - 4)*e^(4/x))/(x - 4)

________________________________________________________________________________________

mupad [B]  time = 3.65, size = 24, normalized size = 0.92 \begin {gather*} x+{\mathrm {e}}^{4/x}-\frac {x^4\,{\ln \left (x^2\right )}^2}{x-4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x + exp(4/x) - (x^4*log(x^2)^2)/(x - 4)

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________