3.7.93 \(\int \frac {(2 e^{9-5 x+x^2}+4 x-2 x^2) \log (x)+(-2 x+e^{9-5 x+x^2} (-2-5 x+2 x^2)) \log ^2(x)}{x^3} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 0.27, antiderivative size = 69, normalized size of antiderivative = 2.65, number of steps used = 11, number of rules used = 8, integrand size = 59, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {14, 43, 2304, 6742, 2334, 2301, 2305, 2288} \begin {gather*} \frac {e^{x^2-5 x+9} \left (5 x \log (x)-2 x^2 \log (x)\right ) \log (x)}{(5-2 x) x^3}+\frac {2 \log ^2(x)}{x}+\log ^2(x)-2 \left (\frac {2}{x}+\log (x)\right ) \log (x)+\frac {4 \log (x)}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

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 2288

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = (v*y)/(Log[F]*D[u, x])}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

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

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

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

________________________________________________________________________________________

Mathematica [A]  time = 0.32, size = 32, normalized size = 1.23 \begin {gather*} \frac {e^{-5 x} \left (e^{9+x^2}-e^{5 x} (-2+x) x\right ) \log ^2(x)}{x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.64, size = 27, normalized size = 1.04 \begin {gather*} -\frac {{\left (x^{2} - 2 \, x - e^{\left (x^{2} - 5 \, x + 9\right )}\right )} \log \relax (x)^{2}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.42, size = 36, normalized size = 1.38 \begin {gather*} -\frac {x^{2} \log \relax (x)^{2} - 2 \, x \log \relax (x)^{2} - e^{\left (x^{2} - 5 \, x + 9\right )} \log \relax (x)^{2}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.05, size = 28, normalized size = 1.08




method result size



risch \(-\frac {\left (x^{2}-2 x -{\mathrm e}^{x^{2}-5 x +9}\right ) \ln \relax (x )^{2}}{x^{2}}\) \(28\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int((((2*x^2-5*x-2)*exp(x^2-5*x+9)-2*x)*ln(x)^2+(2*exp(x^2-5*x+9)-2*x^2+4*x)*ln(x))/x^3,x,method=_RETURNVERBOS
E)

[Out]

-(x^2-2*x-exp(x^2-5*x+9))/x^2*ln(x)^2

________________________________________________________________________________________

maxima [B]  time = 0.62, size = 60, normalized size = 2.31 \begin {gather*} -\log \relax (x)^{2} + \frac {{\left (e^{\left (x^{2} + 9\right )} \log \relax (x)^{2} + 2 \, {\left (x \log \relax (x)^{2} + 2 \, x \log \relax (x) + 2 \, x\right )} e^{\left (5 \, x\right )}\right )} e^{\left (-5 \, x\right )}}{x^{2}} - \frac {4 \, \log \relax (x)}{x} - \frac {4}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.69, size = 26, normalized size = 1.00 \begin {gather*} \frac {{\ln \relax (x)}^2\,\left (2\,x+{\mathrm {e}}^{x^2-5\,x+9}-x^2\right )}{x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(log(x)^2*(2*x + exp(x^2 - 5*x + 9)*(5*x - 2*x^2 + 2)) - log(x)*(4*x + 2*exp(x^2 - 5*x + 9) - 2*x^2))/x^3
,x)

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((((2*x**2-5*x-2)*exp(x**2-5*x+9)-2*x)*ln(x)**2+(2*exp(x**2-5*x+9)-2*x**2+4*x)*ln(x))/x**3,x)

[Out]

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

________________________________________________________________________________________