3.13.48 \(\int (e^x (-4-4 x)+2 x+20 e^{10 x^2} x+e^{5 x^2} (-2-20 x^2)) \, dx\) [1248]

Optimal. Leaf size=21 \[ 3-4 e^x x+\left (-e^{5 x^2}+x\right )^2 \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 34, normalized size of antiderivative = 1.62, number of steps used = 9, number of rules used = 6, integrand size = 38, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.158, Rules used = {2207, 2225, 2240, 2258, 2235, 2243} \begin {gather*} x^2-2 e^{5 x^2} x+e^{10 x^2}+4 e^x-4 e^x (x+1) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[E^x*(-4 - 4*x) + 2*x + 20*E^(10*x^2)*x + E^(5*x^2)*(-2 - 20*x^2),x]

[Out]

4*E^x + E^(10*x^2) - 2*E^(5*x^2)*x + x^2 - 4*E^x*(1 + x)

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 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 2240

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

________________________________________________________________________________________

Mathematica [A]
time = 0.06, size = 27, normalized size = 1.29 \begin {gather*} e^{10 x^2}-4 e^x x-2 e^{5 x^2} x+x^2 \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[E^x*(-4 - 4*x) + 2*x + 20*E^(10*x^2)*x + E^(5*x^2)*(-2 - 20*x^2),x]

[Out]

E^(10*x^2) - 4*E^x*x - 2*E^(5*x^2)*x + x^2

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 27, normalized size = 1.29

method result size
risch \(x^{2}+{\mathrm e}^{10 x^{2}}-2 x \,{\mathrm e}^{5 x^{2}}-4 \,{\mathrm e}^{x} x\) \(25\)
default \(x^{2}+{\mathrm e}^{10 x^{2}}-2 x \,{\mathrm e}^{5 x^{2}}-4 \,{\mathrm e}^{x} x\) \(27\)
norman \(x^{2}+{\mathrm e}^{10 x^{2}}-2 x \,{\mathrm e}^{5 x^{2}}-4 \,{\mathrm e}^{x} x\) \(27\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(20*x*exp(5*x^2)^2+(-20*x^2-2)*exp(5*x^2)+(-4*x-4)*exp(x)+2*x,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 30, normalized size = 1.43 \begin {gather*} x^{2} - 2 \, x e^{\left (5 \, x^{2}\right )} - 4 \, {\left (x - 1\right )} e^{x} + e^{\left (10 \, x^{2}\right )} - 4 \, e^{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2 - 2*x*e^(5*x^2) - 4*(x - 1)*e^x + e^(10*x^2) - 4*e^x

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 24, normalized size = 1.14 \begin {gather*} x^{2} - 2 \, x e^{\left (5 \, x^{2}\right )} - 4 \, x e^{x} + e^{\left (10 \, x^{2}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2 - 2*x*e^(5*x^2) - 4*x*e^x + e^(10*x^2)

________________________________________________________________________________________

Sympy [A]
time = 0.08, size = 26, normalized size = 1.24 \begin {gather*} x^{2} - 4 x e^{x} - 2 x e^{5 x^{2}} + e^{10 x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(20*x*exp(5*x**2)**2+(-20*x**2-2)*exp(5*x**2)+(-4*x-4)*exp(x)+2*x,x)

[Out]

x**2 - 4*x*exp(x) - 2*x*exp(5*x**2) + exp(10*x**2)

________________________________________________________________________________________

Giac [A]
time = 0.39, size = 24, normalized size = 1.14 \begin {gather*} x^{2} - 2 \, x e^{\left (5 \, x^{2}\right )} - 4 \, x e^{x} + e^{\left (10 \, x^{2}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

x^2 - 2*x*e^(5*x^2) - 4*x*e^x + e^(10*x^2)

________________________________________________________________________________________

Mupad [B]
time = 0.09, size = 24, normalized size = 1.14 \begin {gather*} {\mathrm {e}}^{10\,x^2}-2\,x\,{\mathrm {e}}^{5\,x^2}-4\,x\,{\mathrm {e}}^x+x^2 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(2*x - exp(x)*(4*x + 4) + 20*x*exp(10*x^2) - exp(5*x^2)*(20*x^2 + 2),x)

[Out]

exp(10*x^2) - 2*x*exp(5*x^2) - 4*x*exp(x) + x^2

________________________________________________________________________________________