3.50.80 \(\int \frac {1}{8} (10+9 x-18 x^2+e^2 (-2+4 x)+e^{-4+x} (-2-14 x-6 x^2+e^2 (2+2 x))) \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 0.08, antiderivative size = 77, normalized size of antiderivative = 2.14, number of steps used = 12, number of rules used = 4, integrand size = 48, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {12, 2196, 2194, 2176} \begin {gather*} -\frac {3 x^3}{4}-\frac {3}{4} e^{x-4} x^2+\frac {9 x^2}{16}-\frac {1}{4} e^{x-4} x+\frac {5 x}{4}-\frac {e^{x-2}}{4}+\frac {1}{16} e^2 (1-2 x)^2+\frac {1}{4} e^{x-2} (x+1) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(10 + 9*x - 18*x^2 + E^2*(-2 + 4*x) + E^(-4 + x)*(-2 - 14*x - 6*x^2 + E^2*(2 + 2*x)))/8,x]

[Out]

-1/4*E^(-2 + x) + (E^2*(1 - 2*x)^2)/16 + (5*x)/4 - (E^(-4 + x)*x)/4 + (9*x^2)/16 - (3*E^(-4 + x)*x^2)/4 - (3*x
^3)/4 + (E^(-2 + x)*(1 + x))/4

Rule 12

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

Rule 2176

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[((c + d*x)^m
*(b*F^(g*(e + f*x)))^n)/(f*g*n*Log[F]), x] - Dist[(d*m)/(f*g*n*Log[F]), Int[(c + d*x)^(m - 1)*(b*F^(g*(e + f*x
)))^n, x], x] /; FreeQ[{F, b, c, d, e, f, g, n}, x] && GtQ[m, 0] && IntegerQ[2*m] &&  !$UseGamma === True

Rule 2194

Int[((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.), x_Symbol] :> Simp[(F^(c*(a + b*x)))^n/(b*c*n*Log[F]), x] /; Fre
eQ[{F, a, b, c, n}, x]

Rule 2196

Int[(F_)^((c_.)*(v_))*(u_), x_Symbol] :> Int[ExpandIntegrand[F^(c*ExpandToSum[v, x]), u, x], x] /; FreeQ[{F, c
}, x] && PolynomialQ[u, x] && LinearQ[v, x] &&  !$UseGamma === True

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 58, normalized size = 1.61 \begin {gather*} \frac {1}{8} \left (10 x-2 e^2 x+\frac {9 x^2}{2}+2 e^2 x^2-6 x^3+2 e^x \left (\frac {\left (-1+e^2\right ) x}{e^4}-\frac {3 x^2}{e^4}\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(10 + 9*x - 18*x^2 + E^2*(-2 + 4*x) + E^(-4 + x)*(-2 - 14*x - 6*x^2 + E^2*(2 + 2*x)))/8,x]

[Out]

(10*x - 2*E^2*x + (9*x^2)/2 + 2*E^2*x^2 - 6*x^3 + 2*E^x*(((-1 + E^2)*x)/E^4 - (3*x^2)/E^4))/8

________________________________________________________________________________________

fricas [A]  time = 0.87, size = 43, normalized size = 1.19 \begin {gather*} -\frac {3}{4} \, x^{3} + \frac {9}{16} \, x^{2} + \frac {1}{4} \, {\left (x^{2} - x\right )} e^{2} - \frac {1}{4} \, {\left (3 \, x^{2} - x e^{2} + x\right )} e^{\left (x - 4\right )} + \frac {5}{4} \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/8*((2*x+2)*exp(2)-6*x^2-14*x-2)*exp(x-4)+1/8*(4*x-2)*exp(2)-9/4*x^2+9/8*x+5/4,x, algorithm="fricas
")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.12, size = 45, normalized size = 1.25 \begin {gather*} -\frac {3}{4} \, x^{3} + \frac {9}{16} \, x^{2} + \frac {1}{4} \, {\left (x^{2} - x\right )} e^{2} + \frac {1}{4} \, x e^{\left (x - 2\right )} - \frac {1}{4} \, {\left (3 \, x^{2} + x\right )} e^{\left (x - 4\right )} + \frac {5}{4} \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/8*((2*x+2)*exp(2)-6*x^2-14*x-2)*exp(x-4)+1/8*(4*x-2)*exp(2)-9/4*x^2+9/8*x+5/4,x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.06, size = 46, normalized size = 1.28




method result size



norman \(\left (\frac {5}{4}-\frac {{\mathrm e}^{2}}{4}\right ) x +\left (\frac {{\mathrm e}^{2}}{4}+\frac {9}{16}\right ) x^{2}+\left (\frac {{\mathrm e}^{2}}{4}-\frac {1}{4}\right ) x \,{\mathrm e}^{x -4}-\frac {3 x^{3}}{4}-\frac {3 x^{2} {\mathrm e}^{x -4}}{4}\) \(46\)
risch \(\frac {\left (2 \,{\mathrm e}^{2} x -6 x^{2}-2 x \right ) {\mathrm e}^{x -4}}{8}+\frac {x^{2} {\mathrm e}^{2}}{4}-\frac {{\mathrm e}^{2} x}{4}-\frac {3 x^{3}}{4}+\frac {9 x^{2}}{16}+\frac {5 x}{4}\) \(47\)
default \(\frac {5 x}{4}+\frac {9 x^{2}}{16}-\frac {3 x^{3}}{4}+\frac {{\mathrm e}^{2} \left (2 x^{2}-2 x \right )}{8}-\frac {25 \,{\mathrm e}^{x -4} \left (x -4\right )}{4}-13 \,{\mathrm e}^{x -4}-\frac {3 \,{\mathrm e}^{x -4} \left (x -4\right )^{2}}{4}+\frac {5 \,{\mathrm e}^{x -4} {\mathrm e}^{2}}{4}+\frac {{\mathrm e}^{2} \left ({\mathrm e}^{x -4} \left (x -4\right )-{\mathrm e}^{x -4}\right )}{4}\) \(81\)
derivativedivides \(\frac {23 x}{4}-23+\frac {9 \left (x -4\right )^{2}}{16}-\frac {3 x^{3}}{4}+\frac {{\mathrm e}^{2} \left (2 \left (x -4\right )^{2}+14 x -56\right )}{8}-\frac {25 \,{\mathrm e}^{x -4} \left (x -4\right )}{4}-13 \,{\mathrm e}^{x -4}-\frac {3 \,{\mathrm e}^{x -4} \left (x -4\right )^{2}}{4}+\frac {5 \,{\mathrm e}^{x -4} {\mathrm e}^{2}}{4}+\frac {{\mathrm e}^{2} \left ({\mathrm e}^{x -4} \left (x -4\right )-{\mathrm e}^{x -4}\right )}{4}\) \(87\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/8*((2*x+2)*exp(2)-6*x^2-14*x-2)*exp(x-4)+1/8*(4*x-2)*exp(2)-9/4*x^2+9/8*x+5/4,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.35, size = 44, normalized size = 1.22 \begin {gather*} -\frac {3}{4} \, x^{3} + \frac {9}{16} \, x^{2} + \frac {1}{4} \, {\left (x^{2} - x\right )} e^{2} - \frac {1}{4} \, {\left (3 \, x^{2} - x {\left (e^{2} - 1\right )}\right )} e^{\left (x - 4\right )} + \frac {5}{4} \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/8*((2*x+2)*exp(2)-6*x^2-14*x-2)*exp(x-4)+1/8*(4*x-2)*exp(2)-9/4*x^2+9/8*x+5/4,x, algorithm="maxima
")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.07, size = 47, normalized size = 1.31 \begin {gather*} x^2\,\left (\frac {{\mathrm {e}}^2}{4}+\frac {9}{16}\right )-\frac {3\,x^2\,{\mathrm {e}}^{x-4}}{4}-\frac {3\,x^3}{4}-x\,\left (\frac {{\mathrm {e}}^2}{4}-\frac {5}{4}\right )+\frac {x\,{\mathrm {e}}^{x-4}\,\left (2\,{\mathrm {e}}^2-2\right )}{8} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((9*x)/8 - (exp(x - 4)*(14*x + 6*x^2 - exp(2)*(2*x + 2) + 2))/8 - (9*x^2)/4 + (exp(2)*(4*x - 2))/8 + 5/4,x)

[Out]

x^2*(exp(2)/4 + 9/16) - (3*x^2*exp(x - 4))/4 - (3*x^3)/4 - x*(exp(2)/4 - 5/4) + (x*exp(x - 4)*(2*exp(2) - 2))/
8

________________________________________________________________________________________

sympy [A]  time = 0.14, size = 46, normalized size = 1.28 \begin {gather*} - \frac {3 x^{3}}{4} + x^{2} \left (\frac {9}{16} + \frac {e^{2}}{4}\right ) + x \left (\frac {5}{4} - \frac {e^{2}}{4}\right ) + \frac {\left (- 3 x^{2} - x + x e^{2}\right ) e^{x - 4}}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/8*((2*x+2)*exp(2)-6*x**2-14*x-2)*exp(x-4)+1/8*(4*x-2)*exp(2)-9/4*x**2+9/8*x+5/4,x)

[Out]

-3*x**3/4 + x**2*(9/16 + exp(2)/4) + x*(5/4 - exp(2)/4) + (-3*x**2 - x + x*exp(2))*exp(x - 4)/4

________________________________________________________________________________________