3.52.56 \(\int \frac {-20 x^2+12 x^3-2 x^4+e^{\frac {-6+x^2}{x}} (-162+162 x-81 x^2+33 x^3-9 x^4+x^5)+(-18 x^2-48 x^3+54 x^4-18 x^5+2 x^6) \log (2 x)+(-54 x^3+54 x^4-18 x^5+2 x^6) \log ^2(2 x)}{-27 x^2+27 x^3-9 x^4+x^5} \, dx\) [5156]

Optimal. Leaf size=25 \[ e^{-\frac {6}{x}+x}+\left (\frac {1}{-3+x}-x \log (2 x)\right )^2 \]

[Out]

(1/(-3+x)-x*ln(2*x))^2+exp(x-6/x)

________________________________________________________________________________________

Rubi [A]
time = 0.47, antiderivative size = 41, normalized size of antiderivative = 1.64, number of steps used = 12, number of rules used = 8, integrand size = 132, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.061, Rules used = {6820, 6838, 697, 2404, 2351, 31, 2341, 2342} \begin {gather*} x^2 \log ^2(2 x)+e^{x-\frac {6}{x}}+\frac {1}{(3-x)^2}+\frac {2 x \log (2 x)}{3-x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-20*x^2 + 12*x^3 - 2*x^4 + E^((-6 + x^2)/x)*(-162 + 162*x - 81*x^2 + 33*x^3 - 9*x^4 + x^5) + (-18*x^2 - 4
8*x^3 + 54*x^4 - 18*x^5 + 2*x^6)*Log[2*x] + (-54*x^3 + 54*x^4 - 18*x^5 + 2*x^6)*Log[2*x]^2)/(-27*x^2 + 27*x^3
- 9*x^4 + x^5),x]

[Out]

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

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 697

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
 e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[2*c*d - b*e,
 0] && IGtQ[p, 0] &&  !(EqQ[m, 3] && NeQ[p, 1])

Rule 2341

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 2342

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 2351

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

Rule 2404

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 6820

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

Rule 6838

Int[(F_)^(v_)*(u_), x_Symbol] :> With[{q = DerivativeDivides[v, u, x]}, Simp[q*(F^v/Log[F]), x] /;  !FalseQ[q]
] /; FreeQ[F, x]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (e^{-\frac {6}{x}+x} \left (1+\frac {6}{x^2}\right )-\frac {2 \left (10-6 x+x^2\right )}{(-3+x)^3}+\frac {2 \left (3+9 x-6 x^2+x^3\right ) \log (2 x)}{(-3+x)^2}+2 x \log ^2(2 x)\right ) \, dx\\ &=-\left (2 \int \frac {10-6 x+x^2}{(-3+x)^3} \, dx\right )+2 \int \frac {\left (3+9 x-6 x^2+x^3\right ) \log (2 x)}{(-3+x)^2} \, dx+2 \int x \log ^2(2 x) \, dx+\int e^{-\frac {6}{x}+x} \left (1+\frac {6}{x^2}\right ) \, dx\\ &=e^{-\frac {6}{x}+x}+x^2 \log ^2(2 x)-2 \int \left (\frac {1}{(-3+x)^3}+\frac {1}{-3+x}\right ) \, dx-2 \int x \log (2 x) \, dx+2 \int \left (\frac {3 \log (2 x)}{(-3+x)^2}+x \log (2 x)\right ) \, dx\\ &=e^{-\frac {6}{x}+x}+\frac {1}{(3-x)^2}+\frac {x^2}{2}-2 \log (3-x)-x^2 \log (2 x)+x^2 \log ^2(2 x)+2 \int x \log (2 x) \, dx+6 \int \frac {\log (2 x)}{(-3+x)^2} \, dx\\ &=e^{-\frac {6}{x}+x}+\frac {1}{(3-x)^2}-2 \log (3-x)+\frac {2 x \log (2 x)}{3-x}+x^2 \log ^2(2 x)+2 \int \frac {1}{-3+x} \, dx\\ &=e^{-\frac {6}{x}+x}+\frac {1}{(3-x)^2}+\frac {2 x \log (2 x)}{3-x}+x^2 \log ^2(2 x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(56\) vs. \(2(25)=50\).
time = 0.11, size = 56, normalized size = 2.24 \begin {gather*} e^{-\frac {6}{x}+x}+\frac {1}{(-3+x)^2}+2 \log (3-x)-2 \log (-3+x)-2 \log (x)+\frac {6 \log (2 x)}{3-x}+x^2 \log ^2(2 x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-20*x^2 + 12*x^3 - 2*x^4 + E^((-6 + x^2)/x)*(-162 + 162*x - 81*x^2 + 33*x^3 - 9*x^4 + x^5) + (-18*x
^2 - 48*x^3 + 54*x^4 - 18*x^5 + 2*x^6)*Log[2*x] + (-54*x^3 + 54*x^4 - 18*x^5 + 2*x^6)*Log[2*x]^2)/(-27*x^2 + 2
7*x^3 - 9*x^4 + x^5),x]

[Out]

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

________________________________________________________________________________________

Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(54\) vs. \(2(24)=48\).
time = 0.35, size = 55, normalized size = 2.20

method result size
default \({\mathrm e}^{\frac {x^{2}-6}{x}}+x^{2} \ln \left (2 x \right )^{2}-2 \ln \left (x -3\right )+\frac {1}{\left (x -3\right )^{2}}+2 \ln \left (2 x -6\right )-\frac {4 \ln \left (2 x \right ) x}{2 x -6}\) \(55\)
risch \(x^{2} \ln \left (2 x \right )^{2}-\frac {6 \ln \left (2 x \right )}{x -3}-\frac {2 x^{2} \ln \left (x \right )-{\mathrm e}^{\frac {x^{2}-6}{x}} x^{2}-12 x \ln \left (x \right )+6 \,{\mathrm e}^{\frac {x^{2}-6}{x}} x +18 \ln \left (x \right )-9 \,{\mathrm e}^{\frac {x^{2}-6}{x}}-1}{\left (x -3\right )^{2}}\) \(88\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((2*x^6-18*x^5+54*x^4-54*x^3)*ln(2*x)^2+(2*x^6-18*x^5+54*x^4-48*x^3-18*x^2)*ln(2*x)+(x^5-9*x^4+33*x^3-81*x
^2+162*x-162)*exp((x^2-6)/x)-2*x^4+12*x^3-20*x^2)/(x^5-9*x^4+27*x^3-27*x^2),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 122 vs. \(2 (25) = 50\).
time = 0.53, size = 122, normalized size = 4.88 \begin {gather*} \frac {3 \, {\left (4 \, x - 9\right )}}{x^{2} - 6 \, x + 9} - \frac {6 \, {\left (2 \, x - 3\right )}}{x^{2} - 6 \, x + 9} + \frac {x^{3} \log \left (2\right )^{2} - 3 \, x^{2} \log \left (2\right )^{2} + {\left (x^{3} - 3 \, x^{2}\right )} \log \left (x\right )^{2} + {\left (x - 3\right )} e^{\left (x - \frac {6}{x}\right )} + 2 \, {\left (x^{3} \log \left (2\right ) - 3 \, x^{2} \log \left (2\right ) - x\right )} \log \left (x\right ) - 6 \, \log \left (2\right )}{x - 3} + \frac {10}{x^{2} - 6 \, x + 9} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^6-18*x^5+54*x^4-54*x^3)*log(2*x)^2+(2*x^6-18*x^5+54*x^4-48*x^3-18*x^2)*log(2*x)+(x^5-9*x^4+33*
x^3-81*x^2+162*x-162)*exp((x^2-6)/x)-2*x^4+12*x^3-20*x^2)/(x^5-9*x^4+27*x^3-27*x^2),x, algorithm="maxima")

[Out]

3*(4*x - 9)/(x^2 - 6*x + 9) - 6*(2*x - 3)/(x^2 - 6*x + 9) + (x^3*log(2)^2 - 3*x^2*log(2)^2 + (x^3 - 3*x^2)*log
(x)^2 + (x - 3)*e^(x - 6/x) + 2*(x^3*log(2) - 3*x^2*log(2) - x)*log(x) - 6*log(2))/(x - 3) + 10/(x^2 - 6*x + 9
)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 66 vs. \(2 (25) = 50\).
time = 0.38, size = 66, normalized size = 2.64 \begin {gather*} \frac {{\left (x^{4} - 6 \, x^{3} + 9 \, x^{2}\right )} \log \left (2 \, x\right )^{2} + {\left (x^{2} - 6 \, x + 9\right )} e^{\left (\frac {x^{2} - 6}{x}\right )} - 2 \, {\left (x^{2} - 3 \, x\right )} \log \left (2 \, x\right ) + 1}{x^{2} - 6 \, x + 9} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^6-18*x^5+54*x^4-54*x^3)*log(2*x)^2+(2*x^6-18*x^5+54*x^4-48*x^3-18*x^2)*log(2*x)+(x^5-9*x^4+33*
x^3-81*x^2+162*x-162)*exp((x^2-6)/x)-2*x^4+12*x^3-20*x^2)/(x^5-9*x^4+27*x^3-27*x^2),x, algorithm="fricas")

[Out]

((x^4 - 6*x^3 + 9*x^2)*log(2*x)^2 + (x^2 - 6*x + 9)*e^((x^2 - 6)/x) - 2*(x^2 - 3*x)*log(2*x) + 1)/(x^2 - 6*x +
 9)

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 42 vs. \(2 (19) = 38\).
time = 0.31, size = 42, normalized size = 1.68 \begin {gather*} x^{2} \log {\left (2 x \right )}^{2} + e^{\frac {x^{2} - 6}{x}} - 2 \log {\left (x \right )} + \frac {1}{x^{2} - 6 x + 9} - \frac {6 \log {\left (2 x \right )}}{x - 3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x**6-18*x**5+54*x**4-54*x**3)*ln(2*x)**2+(2*x**6-18*x**5+54*x**4-48*x**3-18*x**2)*ln(2*x)+(x**5-
9*x**4+33*x**3-81*x**2+162*x-162)*exp((x**2-6)/x)-2*x**4+12*x**3-20*x**2)/(x**5-9*x**4+27*x**3-27*x**2),x)

[Out]

x**2*log(2*x)**2 + exp((x**2 - 6)/x) - 2*log(x) + 1/(x**2 - 6*x + 9) - 6*log(2*x)/(x - 3)

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 113 vs. \(2 (25) = 50\).
time = 0.41, size = 113, normalized size = 4.52 \begin {gather*} \frac {x^{4} \log \left (2 \, x\right )^{2} - 6 \, x^{3} \log \left (2 \, x\right )^{2} + 9 \, x^{2} \log \left (2 \, x\right )^{2} + x^{2} e^{\left (\frac {x^{2} - 6}{x}\right )} - 2 \, x^{2} \log \left (x\right ) - 6 \, x e^{\left (\frac {x^{2} - 6}{x}\right )} - 6 \, x \log \left (2 \, x\right ) + 12 \, x \log \left (x\right ) + 9 \, e^{\left (\frac {x^{2} - 6}{x}\right )} + 18 \, \log \left (2 \, x\right ) - 18 \, \log \left (x\right ) + 1}{x^{2} - 6 \, x + 9} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^6-18*x^5+54*x^4-54*x^3)*log(2*x)^2+(2*x^6-18*x^5+54*x^4-48*x^3-18*x^2)*log(2*x)+(x^5-9*x^4+33*
x^3-81*x^2+162*x-162)*exp((x^2-6)/x)-2*x^4+12*x^3-20*x^2)/(x^5-9*x^4+27*x^3-27*x^2),x, algorithm="giac")

[Out]

(x^4*log(2*x)^2 - 6*x^3*log(2*x)^2 + 9*x^2*log(2*x)^2 + x^2*e^((x^2 - 6)/x) - 2*x^2*log(x) - 6*x*e^((x^2 - 6)/
x) - 6*x*log(2*x) + 12*x*log(x) + 9*e^((x^2 - 6)/x) + 18*log(2*x) - 18*log(x) + 1)/(x^2 - 6*x + 9)

________________________________________________________________________________________

Mupad [B]
time = 3.49, size = 44, normalized size = 1.76 \begin {gather*} {\mathrm {e}}^{x-\frac {6}{x}}-2\,\ln \left (x\right )+\frac {1}{x^2-6\,x+9}-\frac {6\,\ln \left (2\,x\right )}{x-3}+x^2\,{\ln \left (2\,x\right )}^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((log(2*x)*(18*x^2 + 48*x^3 - 54*x^4 + 18*x^5 - 2*x^6) + log(2*x)^2*(54*x^3 - 54*x^4 + 18*x^5 - 2*x^6) + 20
*x^2 - 12*x^3 + 2*x^4 - exp((x^2 - 6)/x)*(162*x - 81*x^2 + 33*x^3 - 9*x^4 + x^5 - 162))/(27*x^2 - 27*x^3 + 9*x
^4 - x^5),x)

[Out]

exp(x - 6/x) - 2*log(x) + 1/(x^2 - 6*x + 9) - (6*log(2*x))/(x - 3) + x^2*log(2*x)^2

________________________________________________________________________________________