3.22.45 \(\int \frac {e^{x^2} (1+4 x-2 x^2)+(63-36 x+9 x^2) \log (4)}{(36-36 x+9 x^2) \log (4)} \, dx\)

Optimal. Leaf size=26 \[ 5+x-\frac {1+x+\frac {e^{x^2}}{9 \log (4)}}{-2+x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.20, antiderivative size = 43, normalized size of antiderivative = 1.65, number of steps used = 8, number of rules used = 5, integrand size = 47, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.106, Rules used = {12, 27, 6742, 2288, 683} \begin {gather*} \frac {e^{x^2} \left (2 x-x^2\right )}{9 (2-x)^2 x \log (4)}+x+\frac {3}{2-x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(E^x^2*(1 + 4*x - 2*x^2) + (63 - 36*x + 9*x^2)*Log[4])/((36 - 36*x + 9*x^2)*Log[4]),x]

[Out]

3/(2 - x) + x + (E^x^2*(2*x - x^2))/(9*(2 - x)^2*x*Log[4])

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 27

Int[(u_.)*((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[u*Cancel[(b/2 + c*x)^(2*p)/c^p], x] /; Fr
eeQ[{a, b, c}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[p]

Rule 683

Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(d +
 e*x)^m*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && NeQ[b^2 - 4*a*c, 0] && EqQ[2*c*d - b*e,
 0] && IGtQ[p, 0] &&  !(EqQ[m, 3] && NeQ[p, 1])

Rule 2288

Int[(y_.)*(F_)^(u_)*((v_) + (w_)), x_Symbol] :> With[{z = (v*y)/(Log[F]*D[u, x])}, Simp[F^u*z, x] /; EqQ[D[z,
x], w*y]] /; FreeQ[F, x]

Rule 6742

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\frac {\int \frac {e^{x^2} \left (1+4 x-2 x^2\right )+\left (63-36 x+9 x^2\right ) \log (4)}{36-36 x+9 x^2} \, dx}{\log (4)}\\ &=\frac {\int \frac {e^{x^2} \left (1+4 x-2 x^2\right )+\left (63-36 x+9 x^2\right ) \log (4)}{9 (-2+x)^2} \, dx}{\log (4)}\\ &=\frac {\int \frac {e^{x^2} \left (1+4 x-2 x^2\right )+\left (63-36 x+9 x^2\right ) \log (4)}{(-2+x)^2} \, dx}{9 \log (4)}\\ &=\frac {\int \left (-\frac {e^{x^2} \left (-1-4 x+2 x^2\right )}{(-2+x)^2}+\frac {9 \left (7-4 x+x^2\right ) \log (4)}{(-2+x)^2}\right ) \, dx}{9 \log (4)}\\ &=-\frac {\int \frac {e^{x^2} \left (-1-4 x+2 x^2\right )}{(-2+x)^2} \, dx}{9 \log (4)}+\int \frac {7-4 x+x^2}{(-2+x)^2} \, dx\\ &=\frac {e^{x^2} \left (2 x-x^2\right )}{9 (2-x)^2 x \log (4)}+\int \left (1+\frac {3}{(-2+x)^2}\right ) \, dx\\ &=\frac {3}{2-x}+x+\frac {e^{x^2} \left (2 x-x^2\right )}{9 (2-x)^2 x \log (4)}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.08, size = 33, normalized size = 1.27 \begin {gather*} \frac {-e^{x^2}+9 \left (-3-2 x+x^2\right ) \log (4)}{9 (-2+x) \log (4)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(E^x^2*(1 + 4*x - 2*x^2) + (63 - 36*x + 9*x^2)*Log[4])/((36 - 36*x + 9*x^2)*Log[4]),x]

[Out]

(-E^x^2 + 9*(-3 - 2*x + x^2)*Log[4])/(9*(-2 + x)*Log[4])

________________________________________________________________________________________

fricas [A]  time = 1.65, size = 30, normalized size = 1.15 \begin {gather*} \frac {18 \, {\left (x^{2} - 2 \, x - 3\right )} \log \relax (2) - e^{\left (x^{2}\right )}}{18 \, {\left (x - 2\right )} \log \relax (2)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*((-2*x^2+4*x+1)*exp(x^2)+2*(9*x^2-36*x+63)*log(2))/(9*x^2-36*x+36)/log(2),x, algorithm="fricas")

[Out]

1/18*(18*(x^2 - 2*x - 3)*log(2) - e^(x^2))/((x - 2)*log(2))

________________________________________________________________________________________

giac [A]  time = 0.24, size = 34, normalized size = 1.31 \begin {gather*} \frac {18 \, x^{2} \log \relax (2) - 36 \, x \log \relax (2) - e^{\left (x^{2}\right )} - 54 \, \log \relax (2)}{18 \, {\left (x - 2\right )} \log \relax (2)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*((-2*x^2+4*x+1)*exp(x^2)+2*(9*x^2-36*x+63)*log(2))/(9*x^2-36*x+36)/log(2),x, algorithm="giac")

[Out]

1/18*(18*x^2*log(2) - 36*x*log(2) - e^(x^2) - 54*log(2))/((x - 2)*log(2))

________________________________________________________________________________________

maple [A]  time = 0.45, size = 22, normalized size = 0.85




method result size



norman \(\frac {x^{2}-\frac {{\mathrm e}^{x^{2}}}{18 \ln \relax (2)}-7}{x -2}\) \(22\)
risch \(x -\frac {3}{x -2}-\frac {{\mathrm e}^{x^{2}}}{18 \ln \relax (2) \left (x -2\right )}\) \(25\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(1/2*((-2*x^2+4*x+1)*exp(x^2)+2*(9*x^2-36*x+63)*ln(2))/(9*x^2-36*x+36)/ln(2),x,method=_RETURNVERBOSE)

[Out]

(x^2-1/18*exp(x^2)/ln(2)-7)/(x-2)

________________________________________________________________________________________

maxima [B]  time = 0.62, size = 64, normalized size = 2.46 \begin {gather*} \frac {18 \, {\left (x - \frac {4}{x - 2} + 4 \, \log \left (x - 2\right )\right )} \log \relax (2) + 72 \, {\left (\frac {2}{x - 2} - \log \left (x - 2\right )\right )} \log \relax (2) - \frac {e^{\left (x^{2}\right )}}{x - 2} - \frac {126 \, \log \relax (2)}{x - 2}}{18 \, \log \relax (2)} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*((-2*x^2+4*x+1)*exp(x^2)+2*(9*x^2-36*x+63)*log(2))/(9*x^2-36*x+36)/log(2),x, algorithm="maxima")

[Out]

1/18*(18*(x - 4/(x - 2) + 4*log(x - 2))*log(2) + 72*(2/(x - 2) - log(x - 2))*log(2) - e^(x^2)/(x - 2) - 126*lo
g(2)/(x - 2))/log(2)

________________________________________________________________________________________

mupad [B]  time = 0.15, size = 22, normalized size = 0.85 \begin {gather*} x-\frac {\frac {{\mathrm {e}}^{x^2}}{18}+\ln \relax (8)}{\ln \relax (2)\,\left (x-2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((exp(x^2)*(4*x - 2*x^2 + 1))/2 + log(2)*(9*x^2 - 36*x + 63))/(log(2)*(9*x^2 - 36*x + 36)),x)

[Out]

x - (exp(x^2)/18 + log(8))/(log(2)*(x - 2))

________________________________________________________________________________________

sympy [A]  time = 0.17, size = 22, normalized size = 0.85 \begin {gather*} x - \frac {e^{x^{2}}}{18 x \log {\relax (2 )} - 36 \log {\relax (2 )}} - \frac {3}{x - 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(1/2*((-2*x**2+4*x+1)*exp(x**2)+2*(9*x**2-36*x+63)*ln(2))/(9*x**2-36*x+36)/ln(2),x)

[Out]

x - exp(x**2)/(18*x*log(2) - 36*log(2)) - 3/(x - 2)

________________________________________________________________________________________