\(\int \frac {1}{3} (3+6 x+e^{x^2} (1+2 x^2)) \, dx\) [6648]

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

[Out]

1/3*x*(3*x+3+exp(x^2))+1/3*ln(5)+8/3

Rubi [A] (verified)

Time = 0.03 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.75, number of steps used = 7, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {12, 2258, 2235, 2243} \[ \int \frac {1}{3} \left (3+6 x+e^{x^2} \left (1+2 x^2\right )\right ) \, dx=x^2+\frac {e^{x^2} x}{3}+x \]

[In]

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

[Out]

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

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

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.75 \[ \int \frac {1}{3} \left (3+6 x+e^{x^2} \left (1+2 x^2\right )\right ) \, dx=x+\frac {e^{x^2} x}{3}+x^2 \]

[In]

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

[Out]

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

Maple [A] (verified)

Time = 0.02 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.65

method result size
default \(x +\frac {{\mathrm e}^{x^{2}} x}{3}+x^{2}\) \(13\)
norman \(x +\frac {{\mathrm e}^{x^{2}} x}{3}+x^{2}\) \(13\)
risch \(x +\frac {{\mathrm e}^{x^{2}} x}{3}+x^{2}\) \(13\)
parallelrisch \(x +\frac {{\mathrm e}^{x^{2}} x}{3}+x^{2}\) \(13\)
parts \(x +\frac {{\mathrm e}^{x^{2}} x}{3}+x^{2}\) \(13\)

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

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

[In]

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

[Out]

x^2 + 1/3*x*e^(x^2) + x

Sympy [A] (verification not implemented)

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

[In]

integrate(1/3*(2*x**2+1)*exp(x**2)+2*x+1,x)

[Out]

x**2 + x*exp(x**2)/3 + x

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.60 \[ \int \frac {1}{3} \left (3+6 x+e^{x^2} \left (1+2 x^2\right )\right ) \, dx=x^{2} + \frac {1}{3} \, x e^{\left (x^{2}\right )} + x \]

[In]

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

[Out]

x^2 + 1/3*x*e^(x^2) + x

Giac [A] (verification not implemented)

none

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

[In]

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

[Out]

x^2 + 1/3*x*e^(x^2) + x

Mupad [B] (verification not implemented)

Time = 11.61 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.60 \[ \int \frac {1}{3} \left (3+6 x+e^{x^2} \left (1+2 x^2\right )\right ) \, dx=\frac {x\,\left (3\,x+{\mathrm {e}}^{x^2}+3\right )}{3} \]

[In]

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

[Out]

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