3.1.77 \(\int \frac {e^{x^2} (1+4 x^2+x^3+5 x^4+2 x^6)}{(1+x^2)^2} \, dx\) [77]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.18, antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 6, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {6874, 2235, 2243, 6847, 2208, 2209} \begin {gather*} e^{x^2} x+\frac {e^{x^2}}{2 \left (x^2+1\right )} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2208

Int[((b_.)*(F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[(c + d*x)^(m
+ 1)*((b*F^(g*(e + f*x)))^n/(d*(m + 1))), x] - Dist[f*g*n*(Log[F]/(d*(m + 1))), 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] && LtQ[m, -1] && IntegerQ[2*m] &&  !TrueQ[$UseGamm
a]

Rule 2209

Int[(F_)^((g_.)*((e_.) + (f_.)*(x_)))/((c_.) + (d_.)*(x_)), x_Symbol] :> Simp[(F^(g*(e - c*(f/d)))/d)*ExpInteg
ralEi[f*g*(c + d*x)*(Log[F]/d)], x] /; FreeQ[{F, c, d, e, f, g}, x] &&  !TrueQ[$UseGamma]

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

Int[(u_)*(x_)^(m_.), x_Symbol] :> Dist[1/(m + 1), Subst[Int[SubstFor[x^(m + 1), u, x], x], x, x^(m + 1)], x] /
; FreeQ[m, x] && NeQ[m, -1] && FunctionOfQ[x^(m + 1), u, x]

Rule 6874

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.22, size = 20, normalized size = 0.83 \begin {gather*} \frac {1}{2} e^{x^2} \left (2 x+\frac {1}{1+x^2}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Mathics [A]
time = 1.84, size = 19, normalized size = 0.79 \begin {gather*} \frac {\left (\frac {1}{2}+x+x^3\right ) E^{x^2}}{1+x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.04, size = 24, normalized size = 1.00

method result size
gosper \(\frac {\left (2 x^{3}+2 x +1\right ) {\mathrm e}^{x^{2}}}{2 x^{2}+2}\) \(24\)
risch \(\frac {\left (2 x^{3}+2 x +1\right ) {\mathrm e}^{x^{2}}}{2 x^{2}+2}\) \(24\)
norman \(\frac {x^{3} {\mathrm e}^{x^{2}}+{\mathrm e}^{x^{2}} x +\frac {{\mathrm e}^{x^{2}}}{2}}{x^{2}+1}\) \(30\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.31, size = 23, normalized size = 0.96 \begin {gather*} \frac {{\left (2 \, x^{3} + 2 \, x + 1\right )} e^{\left (x^{2}\right )}}{2 \, {\left (x^{2} + 1\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.06, size = 20, normalized size = 0.83 \begin {gather*} \frac {\left (2 x^{3} + 2 x + 1\right ) e^{x^{2}}}{2 x^{2} + 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Giac [A]
time = 0.00, size = 30, normalized size = 1.25 \begin {gather*} \frac {2 x^{3} \mathrm {e}^{x^{2}}+2 x \mathrm {e}^{x^{2}}+\mathrm {e}^{x^{2}}}{2 x^{2}+2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.22, size = 24, normalized size = 1.00 \begin {gather*} \frac {{\mathrm {e}}^{x^2}\,\left (2\,x^3+2\,x+1\right )}{2\,\left (x^2+1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________