3.8.18 \(\int (1-27 x^2+5 x^4+e^{x^2} (-9 x^2+4 x^3-6 x^4+2 x^5)) \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.13, antiderivative size = 29, normalized size of antiderivative = 1.04, number of steps used = 13, number of rules used = 4, integrand size = 39, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {2226, 2212, 2204, 2209} \begin {gather*} x^5-9 x^3+e^{x^2} x^4-3 e^{x^2} x^3+x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x - 9*x^3 - 3*E^x^2*x^3 + E^x^2*x^4 + x^5

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 2209

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^(n_))*((e_.) + (f_.)*(x_))^(m_.), x_Symbol] :> Simp[((e + f*x)^n*
F^(a + b*(c + d*x)^n))/(b*f*n*(c + d*x)^n*Log[F]), x] /; FreeQ[{F, a, b, c, d, e, f, n}, x] && EqQ[m, n - 1] &
& EqQ[d*e - c*f, 0]

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} &=x-9 x^3+x^5+\int e^{x^2} \left (-9 x^2+4 x^3-6 x^4+2 x^5\right ) \, dx\\ &=x-9 x^3+x^5+\int \left (-9 e^{x^2} x^2+4 e^{x^2} x^3-6 e^{x^2} x^4+2 e^{x^2} x^5\right ) \, dx\\ &=x-9 x^3+x^5+2 \int e^{x^2} x^5 \, dx+4 \int e^{x^2} x^3 \, dx-6 \int e^{x^2} x^4 \, dx-9 \int e^{x^2} x^2 \, dx\\ &=x-\frac {9 e^{x^2} x}{2}+2 e^{x^2} x^2-9 x^3-3 e^{x^2} x^3+e^{x^2} x^4+x^5-4 \int e^{x^2} x \, dx-4 \int e^{x^2} x^3 \, dx+\frac {9}{2} \int e^{x^2} \, dx+9 \int e^{x^2} x^2 \, dx\\ &=-2 e^{x^2}+x-9 x^3-3 e^{x^2} x^3+e^{x^2} x^4+x^5+\frac {9}{4} \sqrt {\pi } \text {erfi}(x)+4 \int e^{x^2} x \, dx-\frac {9}{2} \int e^{x^2} \, dx\\ &=x-9 x^3-3 e^{x^2} x^3+e^{x^2} x^4+x^5\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 29, normalized size = 1.04 \begin {gather*} x-9 x^3-3 e^{x^2} x^3+e^{x^2} x^4+x^5 \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

x - 9*x^3 - 3*E^x^2*x^3 + E^x^2*x^4 + x^5

________________________________________________________________________________________

fricas [A]  time = 0.76, size = 24, normalized size = 0.86 \begin {gather*} x^{5} - 9 \, x^{3} + {\left (x^{4} - 3 \, x^{3}\right )} e^{\left (x^{2}\right )} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.23, size = 24, normalized size = 0.86 \begin {gather*} x^{5} - 9 \, x^{3} + {\left (x^{4} - 3 \, x^{3}\right )} e^{\left (x^{2}\right )} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.03, size = 25, normalized size = 0.89




method result size



risch \(\left (x^{4}-3 x^{3}\right ) {\mathrm e}^{x^{2}}+x^{5}-9 x^{3}+x\) \(25\)
default \(x +x^{4} {\mathrm e}^{x^{2}}-3 x^{3} {\mathrm e}^{x^{2}}-9 x^{3}+x^{5}\) \(28\)
norman \(x +x^{4} {\mathrm e}^{x^{2}}-3 x^{3} {\mathrm e}^{x^{2}}-9 x^{3}+x^{5}\) \(28\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [A]  time = 0.53, size = 24, normalized size = 0.86 \begin {gather*} x^{5} - 9 \, x^{3} + {\left (x^{4} - 3 \, x^{3}\right )} e^{\left (x^{2}\right )} + x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 0.52, size = 27, normalized size = 0.96 \begin {gather*} x-3\,x^3\,{\mathrm {e}}^{x^2}+x^4\,{\mathrm {e}}^{x^2}-9\,x^3+x^5 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(5*x^4 - 27*x^2 - exp(x^2)*(9*x^2 - 4*x^3 + 6*x^4 - 2*x^5) + 1,x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.10, size = 22, normalized size = 0.79 \begin {gather*} x^{5} - 9 x^{3} + x + \left (x^{4} - 3 x^{3}\right ) e^{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((2*x**5-6*x**4+4*x**3-9*x**2)*exp(x**2)+5*x**4-27*x**2+1,x)

[Out]

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

________________________________________________________________________________________