3.62.52 \(\int \frac {e^{-4+x^2} (2 x-3 x^2+4 x^3-3 x^4+2 x^5-2 x^6)}{1+2 x^2+x^4} \, dx\)

Optimal. Leaf size=20 \[ e^{-4+x^2} \left (1-x+\frac {1}{\frac {1}{x}+x}\right ) \]

________________________________________________________________________________________

Rubi [C]  time = 0.77, antiderivative size = 56, normalized size of antiderivative = 2.80, number of steps used = 18, number of rules used = 8, integrand size = 49, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.163, Rules used = {28, 6741, 6742, 2204, 2209, 2212, 2220, 6725} \begin {gather*} -e^{x^2-4} x+e^{x^2-4}-\frac {e^{x^2-4}}{2 (-x+i)}+\frac {e^{x^2-4}}{2 (x+i)} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

E^(-4 + x^2) - E^(-4 + x^2)/(2*(I - x)) - E^(-4 + x^2)*x + E^(-4 + x^2)/(2*(I + x))

Rule 28

Int[(u_.)*((a_) + (c_.)*(x_)^(n2_.) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Dist[1/c^p, Int[u*(b/2 + c*x^n)^(2*
p), x], x] /; FreeQ[{a, b, c, n}, x] && EqQ[n2, 2*n] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

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 2220

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

Rule 6725

Int[(u_)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a + b*x^n), x]}, Int[v, x]
 /; SumQ[v]] /; FreeQ[{a, b}, x] && IGtQ[n, 0]

Rule 6741

Int[u_, x_Symbol] :> With[{v = NormalizeIntegrand[u, x]}, Int[v, x] /; v =!= u]

Rule 6742

Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v]]

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \frac {e^{-4+x^2} \left (2 x-3 x^2+4 x^3-3 x^4+2 x^5-2 x^6\right )}{\left (1+x^2\right )^2} \, dx\\ &=\int \frac {e^{-4+x^2} x \left (2-3 x+4 x^2-3 x^3+2 x^4-2 x^5\right )}{\left (1+x^2\right )^2} \, dx\\ &=\int \left (e^{-4+x^2}+2 e^{-4+x^2} x-2 e^{-4+x^2} x^2+\frac {2 e^{-4+x^2}}{\left (1+x^2\right )^2}-\frac {3 e^{-4+x^2}}{1+x^2}\right ) \, dx\\ &=2 \int e^{-4+x^2} x \, dx-2 \int e^{-4+x^2} x^2 \, dx+2 \int \frac {e^{-4+x^2}}{\left (1+x^2\right )^2} \, dx-3 \int \frac {e^{-4+x^2}}{1+x^2} \, dx+\int e^{-4+x^2} \, dx\\ &=e^{-4+x^2}-e^{-4+x^2} x+\frac {\sqrt {\pi } \text {erfi}(x)}{2 e^4}+2 \int \left (-\frac {e^{-4+x^2}}{4 (i-x)^2}-\frac {e^{-4+x^2}}{4 (i+x)^2}-\frac {e^{-4+x^2}}{2 \left (-1-x^2\right )}\right ) \, dx-3 \int \left (\frac {i e^{-4+x^2}}{2 (i-x)}+\frac {i e^{-4+x^2}}{2 (i+x)}\right ) \, dx+\int e^{-4+x^2} \, dx\\ &=e^{-4+x^2}-e^{-4+x^2} x+\frac {\sqrt {\pi } \text {erfi}(x)}{e^4}-\frac {3}{2} i \int \frac {e^{-4+x^2}}{i-x} \, dx-\frac {3}{2} i \int \frac {e^{-4+x^2}}{i+x} \, dx-\frac {1}{2} \int \frac {e^{-4+x^2}}{(i-x)^2} \, dx-\frac {1}{2} \int \frac {e^{-4+x^2}}{(i+x)^2} \, dx-\int \frac {e^{-4+x^2}}{-1-x^2} \, dx\\ &=e^{-4+x^2}-\frac {e^{-4+x^2}}{2 (i-x)}-e^{-4+x^2} x+\frac {e^{-4+x^2}}{2 (i+x)}+\frac {\sqrt {\pi } \text {erfi}(x)}{e^4}+i \int \frac {e^{-4+x^2}}{i-x} \, dx+i \int \frac {e^{-4+x^2}}{i+x} \, dx-\frac {3}{2} i \int \frac {e^{-4+x^2}}{i-x} \, dx-\frac {3}{2} i \int \frac {e^{-4+x^2}}{i+x} \, dx-2 \int e^{-4+x^2} \, dx-\int \left (-\frac {i e^{-4+x^2}}{2 (i-x)}-\frac {i e^{-4+x^2}}{2 (i+x)}\right ) \, dx\\ &=e^{-4+x^2}-\frac {e^{-4+x^2}}{2 (i-x)}-e^{-4+x^2} x+\frac {e^{-4+x^2}}{2 (i+x)}+\frac {1}{2} i \int \frac {e^{-4+x^2}}{i-x} \, dx+\frac {1}{2} i \int \frac {e^{-4+x^2}}{i+x} \, dx+i \int \frac {e^{-4+x^2}}{i-x} \, dx+i \int \frac {e^{-4+x^2}}{i+x} \, dx-\frac {3}{2} i \int \frac {e^{-4+x^2}}{i-x} \, dx-\frac {3}{2} i \int \frac {e^{-4+x^2}}{i+x} \, dx\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.18, size = 26, normalized size = 1.30 \begin {gather*} -\frac {e^{-4+x^2} \left (-1-x^2+x^3\right )}{1+x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

-((E^(-4 + x^2)*(-1 - x^2 + x^3))/(1 + x^2))

________________________________________________________________________________________

fricas [A]  time = 0.64, size = 25, normalized size = 1.25 \begin {gather*} -\frac {{\left (x^{3} - x^{2} - 1\right )} e^{\left (x^{2} - 4\right )}}{x^{2} + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.16, size = 37, normalized size = 1.85 \begin {gather*} -\frac {x^{3} e^{\left (x^{2}\right )} - x^{2} e^{\left (x^{2}\right )} - e^{\left (x^{2}\right )}}{x^{2} e^{4} + e^{4}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(x^3*e^(x^2) - x^2*e^(x^2) - e^(x^2))/(x^2*e^4 + e^4)

________________________________________________________________________________________

maple [A]  time = 0.14, size = 26, normalized size = 1.30




method result size



gosper \(-\frac {\left (x^{3}-x^{2}-1\right ) {\mathrm e}^{x^{2}-4}}{x^{2}+1}\) \(26\)
risch \(-\frac {\left (x^{3}-x^{2}-1\right ) {\mathrm e}^{\left (x -2\right ) \left (2+x \right )}}{x^{2}+1}\) \(28\)
norman \(\frac {{\mathrm e}^{x^{2}-4} x^{2}-x^{3} {\mathrm e}^{x^{2}-4}+{\mathrm e}^{x^{2}-4}}{x^{2}+1}\) \(37\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} -\frac {{\left (x^{5} - x^{4} + x^{3} - 2 \, x^{2}\right )} e^{\left (x^{2}\right )}}{x^{4} e^{4} + 2 \, x^{2} e^{4} + e^{4}} - \frac {e^{\left (-5\right )} E_{2}\left (-x^{2} - 1\right )}{x^{2} + 1} - 4 \, \int \frac {x e^{\left (x^{2}\right )}}{x^{6} e^{4} + 3 \, x^{4} e^{4} + 3 \, x^{2} e^{4} + e^{4}}\,{d x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-(x^5 - x^4 + x^3 - 2*x^2)*e^(x^2)/(x^4*e^4 + 2*x^2*e^4 + e^4) - e^(-5)*exp_integral_e(2, -x^2 - 1)/(x^2 + 1)
- 4*integrate(x*e^(x^2)/(x^6*e^4 + 3*x^4*e^4 + 3*x^2*e^4 + e^4), x)

________________________________________________________________________________________

mupad [B]  time = 0.15, size = 24, normalized size = 1.20 \begin {gather*} \frac {{\mathrm {e}}^{x^2-4}\,\left (-x^3+x^2+1\right )}{x^2+1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 19, normalized size = 0.95 \begin {gather*} \frac {\left (- x^{3} + x^{2} + 1\right ) e^{x^{2} - 4}}{x^{2} + 1} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(-x**3 + x**2 + 1)*exp(x**2 - 4)/(x**2 + 1)

________________________________________________________________________________________