\(\int \frac {1}{2} (1+4 x+e^{-6+2 x} (-2 x-2 x^2)) \, dx\) [5077]

   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 = 26, antiderivative size = 22 \[ \int \frac {1}{2} \left (1+4 x+e^{-6+2 x} \left (-2 x-2 x^2\right )\right ) \, dx=x+x \left (x-\frac {1}{2} \left (e^{-6+2 x}+\frac {1}{x}\right ) x\right ) \]

[Out]

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

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.05, number of steps used = 10, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.192, Rules used = {12, 1607, 2227, 2207, 2225} \[ \int \frac {1}{2} \left (1+4 x+e^{-6+2 x} \left (-2 x-2 x^2\right )\right ) \, dx=-\frac {1}{2} e^{2 x-6} x^2+x^2+\frac {x}{2} \]

[In]

Int[(1 + 4*x + E^(-6 + 2*x)*(-2*x - 2*x^2))/2,x]

[Out]

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

Rule 12

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

Rule 1607

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^(q - p))^n, x] /; F
reeQ[{a, b, p, q}, x] && IntegerQ[n] && PosQ[q - p]

Rule 2207

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] &&  !TrueQ[$UseGamma]

Rule 2225

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 2227

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] &&  !TrueQ[$UseGamma]

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

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.05 \[ \int \frac {1}{2} \left (1+4 x+e^{-6+2 x} \left (-2 x-2 x^2\right )\right ) \, dx=\frac {x}{2}+x^2-\frac {1}{2} e^{-6+2 x} x^2 \]

[In]

Integrate[(1 + 4*x + E^(-6 + 2*x)*(-2*x - 2*x^2))/2,x]

[Out]

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

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.86

method result size
norman \(x^{2}+\frac {x}{2}-\frac {{\mathrm e}^{2 x -6} x^{2}}{2}\) \(19\)
risch \(x^{2}+\frac {x}{2}-\frac {{\mathrm e}^{2 x -6} x^{2}}{2}\) \(19\)
parallelrisch \(x^{2}+\frac {x}{2}-\frac {{\mathrm e}^{2 x -6} x^{2}}{2}\) \(19\)
default \(\frac {x}{2}-\frac {3 \,{\mathrm e}^{2 x -6} \left (2 x -6\right )}{2}-\frac {9 \,{\mathrm e}^{2 x -6}}{2}-\frac {{\mathrm e}^{2 x -6} \left (2 x -6\right )^{2}}{8}+x^{2}\) \(44\)
parts \(\frac {x}{2}-\frac {3 \,{\mathrm e}^{2 x -6} \left (2 x -6\right )}{2}-\frac {9 \,{\mathrm e}^{2 x -6}}{2}-\frac {{\mathrm e}^{2 x -6} \left (2 x -6\right )^{2}}{8}+x^{2}\) \(44\)
derivativedivides \(\frac {13 x}{2}-\frac {39}{2}+\frac {\left (2 x -6\right )^{2}}{4}-\frac {3 \,{\mathrm e}^{2 x -6} \left (2 x -6\right )}{2}-\frac {9 \,{\mathrm e}^{2 x -6}}{2}-\frac {{\mathrm e}^{2 x -6} \left (2 x -6\right )^{2}}{8}\) \(51\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.82 \[ \int \frac {1}{2} \left (1+4 x+e^{-6+2 x} \left (-2 x-2 x^2\right )\right ) \, dx=-\frac {1}{2} \, x^{2} e^{\left (2 \, x - 6\right )} + x^{2} + \frac {1}{2} \, x \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.77 \[ \int \frac {1}{2} \left (1+4 x+e^{-6+2 x} \left (-2 x-2 x^2\right )\right ) \, dx=- \frac {x^{2} e^{2 x - 6}}{2} + x^{2} + \frac {x}{2} \]

[In]

integrate(1/2*(-2*x**2-2*x)*exp(2*x-6)+2*x+1/2,x)

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.82 \[ \int \frac {1}{2} \left (1+4 x+e^{-6+2 x} \left (-2 x-2 x^2\right )\right ) \, dx=-\frac {1}{2} \, x^{2} e^{\left (2 \, x - 6\right )} + x^{2} + \frac {1}{2} \, x \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.82 \[ \int \frac {1}{2} \left (1+4 x+e^{-6+2 x} \left (-2 x-2 x^2\right )\right ) \, dx=-\frac {1}{2} \, x^{2} e^{\left (2 \, x - 6\right )} + x^{2} + \frac {1}{2} \, x \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 18, normalized size of antiderivative = 0.82 \[ \int \frac {1}{2} \left (1+4 x+e^{-6+2 x} \left (-2 x-2 x^2\right )\right ) \, dx=\frac {x}{2}+x^2-\frac {x^2\,{\mathrm {e}}^{2\,x}\,{\mathrm {e}}^{-6}}{2} \]

[In]

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

[Out]

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