\(\int \frac {-3+5 x^2+e^x (-x+4 x^2)+(x^2-e^x x^2) \log (x)}{4 x^2} \, dx\) [9122]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 42, antiderivative size = 28 \[ \int \frac {-3+5 x^2+e^x \left (-x+4 x^2\right )+\left (x^2-e^x x^2\right ) \log (x)}{4 x^2} \, dx=-\frac {3}{2}+e^x+x+\frac {1}{4} \left (\frac {3}{x}+\left (-e^x+x\right ) \log (x)\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.25, number of steps used = 9, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {12, 14, 2326, 2332} \[ \int \frac {-3+5 x^2+e^x \left (-x+4 x^2\right )+\left (x^2-e^x x^2\right ) \log (x)}{4 x^2} \, dx=x+\frac {3}{4 x}+\frac {1}{4} x \log (x)+\frac {e^x (4 x-x \log (x))}{4 x} \]

[In]

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

[Out]

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

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

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 2326

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 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {1}{4} \int \frac {-3+5 x^2+e^x \left (-x+4 x^2\right )+\left (x^2-e^x x^2\right ) \log (x)}{x^2} \, dx \\ & = \frac {1}{4} \int \left (-\frac {e^x (1-4 x+x \log (x))}{x}+\frac {-3+5 x^2+x^2 \log (x)}{x^2}\right ) \, dx \\ & = -\left (\frac {1}{4} \int \frac {e^x (1-4 x+x \log (x))}{x} \, dx\right )+\frac {1}{4} \int \frac {-3+5 x^2+x^2 \log (x)}{x^2} \, dx \\ & = \frac {e^x (4 x-x \log (x))}{4 x}+\frac {1}{4} \int \left (\frac {-3+5 x^2}{x^2}+\log (x)\right ) \, dx \\ & = \frac {e^x (4 x-x \log (x))}{4 x}+\frac {1}{4} \int \frac {-3+5 x^2}{x^2} \, dx+\frac {1}{4} \int \log (x) \, dx \\ & = -\frac {x}{4}+\frac {1}{4} x \log (x)+\frac {e^x (4 x-x \log (x))}{4 x}+\frac {1}{4} \int \left (5-\frac {3}{x^2}\right ) \, dx \\ & = \frac {3}{4 x}+x+\frac {1}{4} x \log (x)+\frac {e^x (4 x-x \log (x))}{4 x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.06 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.04 \[ \int \frac {-3+5 x^2+e^x \left (-x+4 x^2\right )+\left (x^2-e^x x^2\right ) \log (x)}{4 x^2} \, dx=\frac {1}{4} \left (4 e^x+\frac {3}{x}+4 x-e^x \log (x)+x \log (x)\right ) \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 21, normalized size of antiderivative = 0.75

method result size
default \(-\frac {{\mathrm e}^{x} \ln \left (x \right )}{4}+{\mathrm e}^{x}+x +\frac {3}{4 x}+\frac {x \ln \left (x \right )}{4}\) \(21\)
parts \(-\frac {{\mathrm e}^{x} \ln \left (x \right )}{4}+{\mathrm e}^{x}+x +\frac {3}{4 x}+\frac {x \ln \left (x \right )}{4}\) \(21\)
norman \(\frac {\frac {3}{4}+x^{2}+{\mathrm e}^{x} x +\frac {x^{2} \ln \left (x \right )}{4}-\frac {x \,{\mathrm e}^{x} \ln \left (x \right )}{4}}{x}\) \(28\)
risch \(\frac {\left (x -{\mathrm e}^{x}\right ) \ln \left (x \right )}{4}+\frac {4 x^{2}+4 \,{\mathrm e}^{x} x +3}{4 x}\) \(29\)
parallelrisch \(-\frac {x \,{\mathrm e}^{x} \ln \left (x \right )-x^{2} \ln \left (x \right )-4 \,{\mathrm e}^{x} x -4 x^{2}-3}{4 x}\) \(31\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 29, normalized size of antiderivative = 1.04 \[ \int \frac {-3+5 x^2+e^x \left (-x+4 x^2\right )+\left (x^2-e^x x^2\right ) \log (x)}{4 x^2} \, dx=\frac {4 \, x^{2} + 4 \, x e^{x} + {\left (x^{2} - x e^{x}\right )} \log \left (x\right ) + 3}{4 \, x} \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.79 \[ \int \frac {-3+5 x^2+e^x \left (-x+4 x^2\right )+\left (x^2-e^x x^2\right ) \log (x)}{4 x^2} \, dx=\frac {x \log {\left (x \right )}}{4} + x + \frac {\left (4 - \log {\left (x \right )}\right ) e^{x}}{4} + \frac {3}{4 x} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 20, normalized size of antiderivative = 0.71 \[ \int \frac {-3+5 x^2+e^x \left (-x+4 x^2\right )+\left (x^2-e^x x^2\right ) \log (x)}{4 x^2} \, dx=\frac {1}{4} \, x \log \left (x\right ) - \frac {1}{4} \, e^{x} \log \left (x\right ) + x + \frac {3}{4 \, x} + e^{x} \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.07 \[ \int \frac {-3+5 x^2+e^x \left (-x+4 x^2\right )+\left (x^2-e^x x^2\right ) \log (x)}{4 x^2} \, dx=\frac {x^{2} \log \left (x\right ) - x e^{x} \log \left (x\right ) + 4 \, x^{2} + 4 \, x e^{x} + 3}{4 \, x} \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 14.27 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.79 \[ \int \frac {-3+5 x^2+e^x \left (-x+4 x^2\right )+\left (x^2-e^x x^2\right ) \log (x)}{4 x^2} \, dx={\mathrm {e}}^x-\frac {{\mathrm {e}}^x\,\ln \left (x\right )}{4}+x\,\left (\frac {\ln \left (x\right )}{4}+1\right )+\frac {3}{4\,x} \]

[In]

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

[Out]

exp(x) - (exp(x)*log(x))/4 + x*(log(x)/4 + 1) + 3/(4*x)