3.59.28 \(\int \frac {24 x-16 x^2+e^{\frac {-4+4 x-x^2}{4 x}} (4+4 x-x^2)}{4 x} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 0.09, antiderivative size = 63, normalized size of antiderivative = 3.00, number of steps used = 4, number of rules used = 3, integrand size = 46, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {12, 14, 2288} \begin {gather*} \frac {e^{-\frac {(2-x)^2}{4 x}} \left (4-x^2\right )}{\left (\frac {(2-x)^2}{x^2}+\frac {2 (2-x)}{x}\right ) x}-\frac {1}{2} (3-2 x)^2 \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(24*x - 16*x^2 + E^((-4 + 4*x - x^2)/(4*x))*(4 + 4*x - x^2))/(4*x),x]

[Out]

-1/2*(3 - 2*x)^2 + (4 - x^2)/(E^((2 - x)^2/(4*x))*((2 - x)^2/x^2 + (2*(2 - x))/x)*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 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]

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.05, size = 21, normalized size = 1.00 \begin {gather*} \left (6+e^{1-\frac {1}{x}-\frac {x}{4}}-2 x\right ) x \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(24*x - 16*x^2 + E^((-4 + 4*x - x^2)/(4*x))*(4 + 4*x - x^2))/(4*x),x]

[Out]

(6 + E^(1 - x^(-1) - x/4) - 2*x)*x

________________________________________________________________________________________

fricas [A]  time = 0.57, size = 25, normalized size = 1.19 \begin {gather*} -2 \, x^{2} + x e^{\left (-\frac {x^{2} - 4 \, x + 4}{4 \, x}\right )} + 6 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/4*((-x^2+4*x+4)*exp(1/4*(-x^2+4*x-4)/x)-16*x^2+24*x)/x,x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.17, size = 25, normalized size = 1.19 \begin {gather*} -2 \, x^{2} + x e^{\left (-\frac {x^{2} - 4 \, x + 4}{4 \, x}\right )} + 6 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/4*((-x^2+4*x+4)*exp(1/4*(-x^2+4*x-4)/x)-16*x^2+24*x)/x,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.16, size = 23, normalized size = 1.10




method result size



risch \(x \,{\mathrm e}^{-\frac {\left (x -2\right )^{2}}{4 x}}+6 x -2 x^{2}\) \(23\)
norman \(x \,{\mathrm e}^{\frac {-x^{2}+4 x -4}{4 x}}+6 x -2 x^{2}\) \(28\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/4*((-x^2+4*x+4)*exp(1/4*(-x^2+4*x-4)/x)-16*x^2+24*x)/x,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.43, size = 22, normalized size = 1.05 \begin {gather*} -2 \, x^{2} + x e^{\left (-\frac {1}{4} \, x - \frac {1}{x} + 1\right )} + 6 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/4*((-x^2+4*x+4)*exp(1/4*(-x^2+4*x-4)/x)-16*x^2+24*x)/x,x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 3.99, size = 18, normalized size = 0.86 \begin {gather*} x\,\left ({\mathrm {e}}^{1-\frac {1}{x}-\frac {x}{4}}-2\,x+6\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((6*x + (exp(-(x^2/4 - x + 1)/x)*(4*x - x^2 + 4))/4 - 4*x^2)/x,x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 20, normalized size = 0.95 \begin {gather*} - 2 x^{2} + x e^{\frac {- \frac {x^{2}}{4} + x - 1}{x}} + 6 x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/4*((-x**2+4*x+4)*exp(1/4*(-x**2+4*x-4)/x)-16*x**2+24*x)/x,x)

[Out]

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

________________________________________________________________________________________