3.48.30 \(\int \frac {8-5 x^2-e x^2+4 e^{-e^2} x^2-2 x^3}{2 x^2} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.03, antiderivative size = 30, normalized size of antiderivative = 1.03, number of steps used = 5, number of rules used = 3, integrand size = 37, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.081, Rules used = {6, 12, 14} \begin {gather*} -\frac {x^2}{2}-\frac {1}{2} \left (5+e-4 e^{-e^2}\right ) x-\frac {4}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-4/x - ((5 + E - 4/E^E^2)*x)/2 - x^2/2

Rule 6

Int[(u_.)*((w_.) + (a_.)*(v_) + (b_.)*(v_))^(p_.), x_Symbol] :> Int[u*((a + b)*v + w)^p, x] /; FreeQ[{a, b}, x
] &&  !FreeQ[v, 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]]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.04, size = 34, normalized size = 1.17 \begin {gather*} -\frac {4}{x}-\frac {5 x}{2}-\frac {e x}{2}+2 e^{-e^2} x-\frac {x^2}{2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-4/x - (5*x)/2 - (E*x)/2 + (2*x)/E^E^2 - x^2/2

________________________________________________________________________________________

fricas [A]  time = 0.54, size = 36, normalized size = 1.24 \begin {gather*} -\frac {x^{3} + x^{2} e - x^{2} e^{\left (-e^{2} + 2 \, \log \relax (2)\right )} + 5 \, x^{2} + 8}{2 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.19, size = 32, normalized size = 1.10 \begin {gather*} -\frac {1}{2} \, x^{2} - \frac {1}{2} \, x e + \frac {1}{2} \, x e^{\left (-e^{2} + 2 \, \log \relax (2)\right )} - \frac {5}{2} \, x - \frac {4}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.07, size = 33, normalized size = 1.14




method result size



default \(-\frac {x^{2}}{2}-\frac {x \,{\mathrm e}}{2}+\frac {x \,{\mathrm e}^{2 \ln \relax (2)-{\mathrm e}^{2}}}{2}-\frac {5 x}{2}-\frac {4}{x}\) \(33\)
norman \(\frac {-4-\frac {x^{3}}{2}-\frac {{\mathrm e}^{-{\mathrm e}^{2}} \left ({\mathrm e} \,{\mathrm e}^{{\mathrm e}^{2}}+5 \,{\mathrm e}^{{\mathrm e}^{2}}-4\right ) x^{2}}{2}}{x}\) \(35\)
gosper \(-\frac {x^{2} {\mathrm e}-x^{2} {\mathrm e}^{2 \ln \relax (2)-{\mathrm e}^{2}}+x^{3}+5 x^{2}+8}{2 x}\) \(37\)
risch \(-\frac {{\mathrm e}^{{\mathrm e}^{2}} {\mathrm e}^{-{\mathrm e}^{2}} x^{2}}{2}-\frac {{\mathrm e}^{{\mathrm e}^{2}+1} {\mathrm e}^{-{\mathrm e}^{2}} x}{2}-\frac {5 \,{\mathrm e}^{{\mathrm e}^{2}} {\mathrm e}^{-{\mathrm e}^{2}} x}{2}+2 \,{\mathrm e}^{-{\mathrm e}^{2}} x -\frac {4}{x}\) \(52\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.36, size = 33, normalized size = 1.14 \begin {gather*} -\frac {1}{2} \, {\left (x^{2} e^{\left (e^{2}\right )} + {\left ({\left (e + 5\right )} e^{\left (e^{2}\right )} - 4\right )} x\right )} e^{\left (-e^{2}\right )} - \frac {4}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.10, size = 31, normalized size = 1.07 \begin {gather*} -\frac {4}{x}-\frac {x^2}{2}-\frac {x\,{\mathrm {e}}^{-{\mathrm {e}}^2}\,\left ({\mathrm {e}}^{{\mathrm {e}}^2+1}+5\,{\mathrm {e}}^{{\mathrm {e}}^2}-4\right )}{2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 42, normalized size = 1.45 \begin {gather*} \frac {- x^{2} e^{e^{2}} - x \left (-4 + e e^{e^{2}} + 5 e^{e^{2}}\right ) - \frac {8 e^{e^{2}}}{x}}{2 e^{e^{2}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(-x**2*exp(exp(2)) - x*(-4 + E*exp(exp(2)) + 5*exp(exp(2))) - 8*exp(exp(2))/x)*exp(-exp(2))/2

________________________________________________________________________________________