3.1.15 \(\int (2 e^x+e^{2 x}+x^2) \, dx\) [15]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.00, antiderivative size = 22, normalized size of antiderivative = 1.00, 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 = {2225} \begin {gather*} \frac {x^3}{3}+2 e^x+\frac {e^{2 x}}{2} \end {gather*}

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

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.01, size = 22, normalized size = 1.00 \begin {gather*} 2 e^x+\frac {e^{2 x}}{2}+\frac {x^3}{3} \end {gather*}

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

________________________________________________________________________________________

Mathics [A]
time = 1.84, size = 18, normalized size = 0.82 \begin {gather*} \frac {x^3}{3}+\frac {E^{2 x}}{2}+2 E^x \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.01, size = 17, normalized size = 0.77

method result size
default \(2 \,{\mathrm e}^{x}+\frac {{\mathrm e}^{2 x}}{2}+\frac {x^{3}}{3}\) \(17\)
norman \(2 \,{\mathrm e}^{x}+\frac {{\mathrm e}^{2 x}}{2}+\frac {x^{3}}{3}\) \(17\)
risch \(2 \,{\mathrm e}^{x}+\frac {{\mathrm e}^{2 x}}{2}+\frac {x^{3}}{3}\) \(17\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 16, normalized size = 0.73 \begin {gather*} \frac {1}{3} \, x^{3} + \frac {1}{2} \, e^{\left (2 \, x\right )} + 2 \, e^{x} \end {gather*}

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 = 0.32, size = 16, normalized size = 0.73 \begin {gather*} \frac {1}{3} \, x^{3} + \frac {1}{2} \, e^{\left (2 \, x\right )} + 2 \, e^{x} \end {gather*}

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.05, size = 15, normalized size = 0.68 \begin {gather*} \frac {x^{3}}{3} + \frac {e^{2 x}}{2} + 2 e^{x} \end {gather*}

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 = 0.00, size = 18, normalized size = 0.82 \begin {gather*} 2 \mathrm {e}^{x}+\frac {\mathrm {e}^{2 x}}{2}+\frac {x^{3}}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.05, size = 16, normalized size = 0.73 \begin {gather*} \frac {{\mathrm {e}}^{2\,x}}{2}+2\,{\mathrm {e}}^x+\frac {x^3}{3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________