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

Optimal. Leaf size=20 \[ \frac {1}{3} \left (8+x \left (3+e^{x^2}+3 x\right )+\log (5)\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 15, normalized size of antiderivative = 0.75, number of steps used = 7, number of rules used = 4, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {12, 2226, 2204, 2212} \begin {gather*} x^2+\frac {e^{x^2} x}{3}+x \end {gather*}

Antiderivative was successfully verified.

[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 2204

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 2212

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 2226

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 {gather*} \begin {aligned} \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 {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.01, size = 15, normalized size = 0.75 \begin {gather*} x+\frac {e^{x^2} x}{3}+x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.47, size = 12, normalized size = 0.60 \begin {gather*} x^{2} + \frac {1}{3} \, x e^{\left (x^{2}\right )} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

giac [A]  time = 0.25, size = 12, normalized size = 0.60 \begin {gather*} x^{2} + \frac {1}{3} \, x e^{\left (x^{2}\right )} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

maple [A]  time = 0.02, size = 13, normalized size = 0.65




method result size



default \(x^{2}+x +\frac {{\mathrm e}^{x^{2}} x}{3}\) \(13\)
norman \(x^{2}+x +\frac {{\mathrm e}^{x^{2}} x}{3}\) \(13\)
risch \(x^{2}+x +\frac {{\mathrm e}^{x^{2}} x}{3}\) \(13\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.37, size = 12, normalized size = 0.60 \begin {gather*} x^{2} + \frac {1}{3} \, x e^{\left (x^{2}\right )} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

mupad [B]  time = 0.06, size = 12, normalized size = 0.60 \begin {gather*} \frac {x\,\left (3\,x+{\mathrm {e}}^{x^2}+3\right )}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.09, size = 12, normalized size = 0.60 \begin {gather*} x^{2} + \frac {x e^{x^{2}}}{3} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________