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

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

[Out]

(exp(2*x^2)-1-exp(2*(3+x)*x)-3*x)*x

Rubi [A] (verified)

Time = 0.05 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.96, number of steps used = 7, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2326, 2258, 2235, 2243} \[ \int \left (-1-6 x+e^{6 x+2 x^2} \left (-1-6 x-4 x^2\right )+e^{2 x^2} \left (1+4 x^2\right )\right ) \, dx=-3 x^2+e^{2 x^2} x-\frac {e^{2 x^2+6 x} \left (2 x^2+3 x\right )}{2 x+3}-x \]

[In]

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

[Out]

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

Rule 2235

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt[Pi]*(Erfi[(c + d*x)*Rt[b*Log[F], 2
]]/(2*d*Rt[b*Log[F], 2])), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2243

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(c + d*x)^(m
- n + 1)*(F^(a + b*(c + d*x)^n)/(b*d*n*Log[F])), x] - Dist[(m - n + 1)/(b*n*Log[F]), Int[(c + d*x)^(m - n)*F^(
a + b*(c + d*x)^n), x], x] /; FreeQ[{F, a, b, c, d}, x] && IntegerQ[2*((m + 1)/n)] && LtQ[0, (m + 1)/n, 5] &&
IntegerQ[n] && (LtQ[0, n, m + 1] || LtQ[m, n, 0])

Rule 2258

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*(u_), x_Symbol] :> Int[ExpandLinearProduct[F^(a + b*(c + d*
x)^n), u, c, d, x], x] /; FreeQ[{F, a, b, c, d, n}, x] && PolynomialQ[u, x]

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]

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

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 25, normalized size of antiderivative = 1.04 \[ \int \left (-1-6 x+e^{6 x+2 x^2} \left (-1-6 x-4 x^2\right )+e^{2 x^2} \left (1+4 x^2\right )\right ) \, dx=-x \left (1-e^{2 x^2}+e^{2 x (3+x)}+3 x\right ) \]

[In]

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

[Out]

-(x*(1 - E^(2*x^2) + E^(2*x*(3 + x)) + 3*x))

Maple [A] (verified)

Time = 0.06 (sec) , antiderivative size = 28, normalized size of antiderivative = 1.17

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

[In]

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

[Out]

x*exp(2*x^2)-x-3*x^2-exp(2*(3+x)*x)*x

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.25 \[ \int \left (-1-6 x+e^{6 x+2 x^2} \left (-1-6 x-4 x^2\right )+e^{2 x^2} \left (1+4 x^2\right )\right ) \, dx=-3 \, x^{2} + x e^{\left (2 \, x^{2}\right )} - x e^{\left (2 \, x^{2} + 6 \, x\right )} - x \]

[In]

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

[Out]

-3*x^2 + x*e^(2*x^2) - x*e^(2*x^2 + 6*x) - x

Sympy [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 26, normalized size of antiderivative = 1.08 \[ \int \left (-1-6 x+e^{6 x+2 x^2} \left (-1-6 x-4 x^2\right )+e^{2 x^2} \left (1+4 x^2\right )\right ) \, dx=- 3 x^{2} + x e^{2 x^{2}} - x e^{2 x^{2} + 6 x} - x \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

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

[In]

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

[Out]

-3*x^2 + x*e^(2*x^2) - x*e^(2*x^2 + 6*x) - x

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.25 \[ \int \left (-1-6 x+e^{6 x+2 x^2} \left (-1-6 x-4 x^2\right )+e^{2 x^2} \left (1+4 x^2\right )\right ) \, dx=-3 \, x^{2} + x e^{\left (2 \, x^{2}\right )} - x e^{\left (2 \, x^{2} + 6 \, x\right )} - x \]

[In]

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

[Out]

-3*x^2 + x*e^(2*x^2) - x*e^(2*x^2 + 6*x) - x

Mupad [B] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.25 \[ \int \left (-1-6 x+e^{6 x+2 x^2} \left (-1-6 x-4 x^2\right )+e^{2 x^2} \left (1+4 x^2\right )\right ) \, dx=x\,{\mathrm {e}}^{2\,x^2}-x-3\,x^2-x\,{\mathrm {e}}^{6\,x}\,{\mathrm {e}}^{2\,x^2} \]

[In]

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

[Out]

x*exp(2*x^2) - x - 3*x^2 - x*exp(6*x)*exp(2*x^2)