3.15 \(\int (2 e^x+e^{2 x}+x^2) \, dx\)

Optimal. Leaf size=22 \[ \frac{x^3}{3}+2 e^x+\frac{e^{2 x}}{2} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.004773, antiderivative size = 22, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 1, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.071, Rules used = {2194} \[ \frac{x^3}{3}+2 e^x+\frac{e^{2 x}}{2} \]

Antiderivative was successfully verified.

[In]

Int[2*E^x + E^(2*x) + x^2,x]

[Out]

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

Rule 2194

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]

Rubi steps

\begin{align*} \int \left (2 e^x+e^{2 x}+x^2\right ) \, dx &=\frac{x^3}{3}+2 \int e^x \, dx+\int e^{2 x} \, dx\\ &=2 e^x+\frac{e^{2 x}}{2}+\frac{x^3}{3}\\ \end{align*}

Mathematica [A]  time = 0.0023558, size = 22, normalized size = 1. \[ \frac{x^3}{3}+2 e^x+\frac{e^{2 x}}{2} \]

Antiderivative was successfully verified.

[In]

Integrate[2*E^x + E^(2*x) + x^2,x]

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.001, size = 17, normalized size = 0.8 \begin{align*} 2\,{{\rm e}^{x}}+{\frac{{{\rm e}^{2\,x}}}{2}}+{\frac{{x}^{3}}{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(2*exp(x)+exp(2*x)+x^2,x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.933384, size = 22, normalized size = 1. \begin{align*} \frac{1}{3} \, x^{3} + \frac{1}{2} \, e^{\left (2 \, x\right )} + 2 \, e^{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.87782, size = 42, normalized size = 1.91 \begin{align*} \frac{1}{3} \, x^{3} + \frac{1}{2} \, e^{\left (2 \, x\right )} + 2 \, e^{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.082634, size = 15, normalized size = 0.68 \begin{align*} \frac{x^{3}}{3} + \frac{e^{2 x}}{2} + 2 e^{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(2*exp(x)+exp(2*x)+x**2,x)

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.07362, size = 22, normalized size = 1. \begin{align*} \frac{1}{3} \, x^{3} + \frac{1}{2} \, e^{\left (2 \, x\right )} + 2 \, e^{x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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