3.58.79 \(\int \frac {-5+2 x+5 x^2+3 x^3+4 x^4-x^5+e^{x^2} (10 x^3+8 x^4-12 x^5-8 x^6+2 x^7)+(5+4 x-11 x^2+2 x^3) \log (\frac {5 x-6 x^2+x^3}{e^2})}{5 x^2+4 x^3-6 x^4-4 x^5+x^6} \, dx\)

Optimal. Leaf size=34 \[ e^{x^2}-\log (x)-\frac {\log \left (\frac {(-5+x) \left (-x+x^2\right )}{e^2}\right )}{x+x^2} \]

________________________________________________________________________________________

Rubi [A]  time = 1.85, antiderivative size = 51, normalized size of antiderivative = 1.50, number of steps used = 24, number of rules used = 10, integrand size = 117, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.085, Rules used = {6741, 6728, 2209, 72, 180, 148, 2528, 2525, 1628, 6742} \begin {gather*} e^{x^2}+\frac {2-\log \left (x \left (x^2-6 x+5\right )\right )}{x}-\frac {2-\log \left (x \left (x^2-6 x+5\right )\right )}{x+1}-\log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-5 + 2*x + 5*x^2 + 3*x^3 + 4*x^4 - x^5 + E^x^2*(10*x^3 + 8*x^4 - 12*x^5 - 8*x^6 + 2*x^7) + (5 + 4*x - 11*
x^2 + 2*x^3)*Log[(5*x - 6*x^2 + x^3)/E^2])/(5*x^2 + 4*x^3 - 6*x^4 - 4*x^5 + x^6),x]

[Out]

E^x^2 - Log[x] + (2 - Log[x*(5 - 6*x + x^2)])/x - (2 - Log[x*(5 - 6*x + x^2)])/(1 + x)

Rule 72

Int[((e_.) + (f_.)*(x_))^(p_.)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Int[ExpandIntegrand[(
e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[p]

Rule 148

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)), x_Symb
ol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p*(g + h*x), x], x] /; FreeQ[{a, b, c, d, e, f, g
, h, m}, x] && (IntegersQ[m, n, p] || (IGtQ[n, 0] && IGtQ[p, 0]))

Rule 180

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_))^(q_), x
_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p*(g + h*x)^q, x], x] /; FreeQ[{a, b, c, d,
e, f, g, h, m, n}, x] && IntegersQ[p, q]

Rule 1628

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

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 2525

Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.)*((d_.) + (e_.)*(x_))^(m_.), x_Symbol] :> Simp[((d + e*x)^(m
+ 1)*(a + b*Log[c*RFx^p])^n)/(e*(m + 1)), x] - Dist[(b*n*p)/(e*(m + 1)), Int[SimplifyIntegrand[((d + e*x)^(m +
 1)*(a + b*Log[c*RFx^p])^(n - 1)*D[RFx, x])/RFx, x], x], x] /; FreeQ[{a, b, c, d, e, m, p}, x] && RationalFunc
tionQ[RFx, x] && IGtQ[n, 0] && (EqQ[n, 1] || IntegerQ[m]) && NeQ[m, -1]

Rule 2528

Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.)*(RGx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*
RFx^p])^n, RGx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, p}, x] && RationalFunctionQ[RFx, x] && RationalF
unctionQ[RGx, x] && IGtQ[n, 0]

Rule 6728

Int[(u_)/((a_.) + (b_.)*(x_)^(n_.) + (c_.)*(x_)^(n2_.)), x_Symbol] :> With[{v = RationalFunctionExpand[u/(a +
b*x^n + c*x^(2*n)), x]}, Int[v, x] /; SumQ[v]] /; FreeQ[{a, b, c}, x] && EqQ[n2, 2*n] && 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 {-5+2 x+5 x^2+3 x^3+4 x^4-x^5+e^{x^2} \left (10 x^3+8 x^4-12 x^5-8 x^6+2 x^7\right )+\left (5+4 x-11 x^2+2 x^3\right ) \log \left (\frac {5 x-6 x^2+x^3}{e^2}\right )}{x^2 (1+x)^2 \left (5-6 x+x^2\right )} \, dx\\ &=\int \left (2 e^{x^2} x+\frac {5}{(-5+x) (-1+x) (1+x)^2}-\frac {5}{(-5+x) (-1+x) x^2 (1+x)^2}+\frac {2}{(-5+x) (-1+x) x (1+x)^2}+\frac {3 x}{(-5+x) (-1+x) (1+x)^2}+\frac {4 x^2}{(-5+x) (-1+x) (1+x)^2}-\frac {x^3}{(-5+x) (-1+x) (1+x)^2}+\frac {(1+2 x) \left (-2+\log \left (x \left (5-6 x+x^2\right )\right )\right )}{x^2 (1+x)^2}\right ) \, dx\\ &=2 \int e^{x^2} x \, dx+2 \int \frac {1}{(-5+x) (-1+x) x (1+x)^2} \, dx+3 \int \frac {x}{(-5+x) (-1+x) (1+x)^2} \, dx+4 \int \frac {x^2}{(-5+x) (-1+x) (1+x)^2} \, dx+5 \int \frac {1}{(-5+x) (-1+x) (1+x)^2} \, dx-5 \int \frac {1}{(-5+x) (-1+x) x^2 (1+x)^2} \, dx-\int \frac {x^3}{(-5+x) (-1+x) (1+x)^2} \, dx+\int \frac {(1+2 x) \left (-2+\log \left (x \left (5-6 x+x^2\right )\right )\right )}{x^2 (1+x)^2} \, dx\\ &=e^{x^2}+2 \int \left (\frac {1}{720 (-5+x)}-\frac {1}{16 (-1+x)}+\frac {1}{5 x}-\frac {1}{12 (1+x)^2}-\frac {5}{36 (1+x)}\right ) \, dx+3 \int \left (\frac {5}{144 (-5+x)}-\frac {1}{16 (-1+x)}-\frac {1}{12 (1+x)^2}+\frac {1}{36 (1+x)}\right ) \, dx+4 \int \left (\frac {25}{144 (-5+x)}-\frac {1}{16 (-1+x)}+\frac {1}{12 (1+x)^2}-\frac {1}{9 (1+x)}\right ) \, dx+5 \int \left (\frac {1}{144 (-5+x)}-\frac {1}{16 (-1+x)}+\frac {1}{12 (1+x)^2}+\frac {1}{18 (1+x)}\right ) \, dx-5 \int \left (\frac {1}{3600 (-5+x)}-\frac {1}{16 (-1+x)}+\frac {1}{5 x^2}-\frac {4}{25 x}+\frac {1}{12 (1+x)^2}+\frac {2}{9 (1+x)}\right ) \, dx-\int \left (\frac {125}{144 (-5+x)}-\frac {1}{16 (-1+x)}-\frac {1}{12 (1+x)^2}+\frac {7}{36 (1+x)}\right ) \, dx+\int \left (\frac {-2+\log \left (x \left (5-6 x+x^2\right )\right )}{x^2}-\frac {-2+\log \left (x \left (5-6 x+x^2\right )\right )}{(1+x)^2}\right ) \, dx\\ &=e^{x^2}+\frac {1}{x}-\frac {1}{2} \log (1-x)-\frac {1}{30} \log (5-x)+\frac {6 \log (x)}{5}-\frac {5}{3} \log (1+x)+\int \frac {-2+\log \left (x \left (5-6 x+x^2\right )\right )}{x^2} \, dx-\int \frac {-2+\log \left (x \left (5-6 x+x^2\right )\right )}{(1+x)^2} \, dx\\ &=e^{x^2}+\frac {1}{x}-\frac {1}{2} \log (1-x)-\frac {1}{30} \log (5-x)+\frac {6 \log (x)}{5}-\frac {5}{3} \log (1+x)+\frac {2-\log \left (x \left (5-6 x+x^2\right )\right )}{x}-\frac {2-\log \left (x \left (5-6 x+x^2\right )\right )}{1+x}+\int \frac {5-12 x+3 x^2}{x^2 \left (5-6 x+x^2\right )} \, dx-\int \frac {5-12 x+3 x^2}{x \left (5-x-5 x^2+x^3\right )} \, dx\\ &=e^{x^2}+\frac {1}{x}-\frac {1}{2} \log (1-x)-\frac {1}{30} \log (5-x)+\frac {6 \log (x)}{5}-\frac {5}{3} \log (1+x)+\frac {2-\log \left (x \left (5-6 x+x^2\right )\right )}{x}-\frac {2-\log \left (x \left (5-6 x+x^2\right )\right )}{1+x}+\int \left (\frac {1}{5 (-5+x)}+\frac {1}{-1+x}+\frac {1}{x^2}-\frac {6}{5 x}\right ) \, dx-\int \left (\frac {1}{6 (-5+x)}+\frac {1}{2 (-1+x)}+\frac {1}{x}-\frac {5}{3 (1+x)}\right ) \, dx\\ &=e^{x^2}-\log (x)+\frac {2-\log \left (x \left (5-6 x+x^2\right )\right )}{x}-\frac {2-\log \left (x \left (5-6 x+x^2\right )\right )}{1+x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.12, size = 39, normalized size = 1.15 \begin {gather*} -\log (x)+\frac {2+e^{x^2} x (1+x)-\log \left (x \left (5-6 x+x^2\right )\right )}{x (1+x)} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-5 + 2*x + 5*x^2 + 3*x^3 + 4*x^4 - x^5 + E^x^2*(10*x^3 + 8*x^4 - 12*x^5 - 8*x^6 + 2*x^7) + (5 + 4*x
 - 11*x^2 + 2*x^3)*Log[(5*x - 6*x^2 + x^3)/E^2])/(5*x^2 + 4*x^3 - 6*x^4 - 4*x^5 + x^6),x]

[Out]

-Log[x] + (2 + E^x^2*x*(1 + x) - Log[x*(5 - 6*x + x^2)])/(x*(1 + x))

________________________________________________________________________________________

fricas [A]  time = 0.55, size = 46, normalized size = 1.35 \begin {gather*} \frac {{\left (x^{2} + x\right )} e^{\left (x^{2}\right )} - {\left (x^{2} + x\right )} \log \relax (x) - \log \left ({\left (x^{3} - 6 \, x^{2} + 5 \, x\right )} e^{\left (-2\right )}\right )}{x^{2} + x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^3-11*x^2+4*x+5)*log((x^3-6*x^2+5*x)/exp(2))+(2*x^7-8*x^6-12*x^5+8*x^4+10*x^3)*exp(x^2)-x^5+4*x
^4+3*x^3+5*x^2+2*x-5)/(x^6-4*x^5-6*x^4+4*x^3+5*x^2),x, algorithm="fricas")

[Out]

((x^2 + x)*e^(x^2) - (x^2 + x)*log(x) - log((x^3 - 6*x^2 + 5*x)*e^(-2)))/(x^2 + x)

________________________________________________________________________________________

giac [A]  time = 0.17, size = 51, normalized size = 1.50 \begin {gather*} \frac {x^{2} e^{\left (x^{2}\right )} - x^{2} \log \relax (x) + x e^{\left (x^{2}\right )} - x \log \relax (x) - \log \left (x^{3} - 6 \, x^{2} + 5 \, x\right ) + 2}{x^{2} + x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^3-11*x^2+4*x+5)*log((x^3-6*x^2+5*x)/exp(2))+(2*x^7-8*x^6-12*x^5+8*x^4+10*x^3)*exp(x^2)-x^5+4*x
^4+3*x^3+5*x^2+2*x-5)/(x^6-4*x^5-6*x^4+4*x^3+5*x^2),x, algorithm="giac")

[Out]

(x^2*e^(x^2) - x^2*log(x) + x*e^(x^2) - x*log(x) - log(x^3 - 6*x^2 + 5*x) + 2)/(x^2 + x)

________________________________________________________________________________________

maple [C]  time = 0.30, size = 173, normalized size = 5.09




method result size



risch \(-\frac {\ln \left (x^{2}-6 x +5\right )}{x \left (x +1\right )}-\frac {i \pi \,\mathrm {csgn}\left (i \left (x^{2}-6 x +5\right )\right ) \mathrm {csgn}\left (i x \left (x^{2}-6 x +5\right )\right )^{2}-i \pi \,\mathrm {csgn}\left (i \left (x^{2}-6 x +5\right )\right ) \mathrm {csgn}\left (i x \left (x^{2}-6 x +5\right )\right ) \mathrm {csgn}\left (i x \right )-4+i \pi \mathrm {csgn}\left (i x \left (x^{2}-6 x +5\right )\right )^{2} \mathrm {csgn}\left (i x \right )-i \pi \mathrm {csgn}\left (i x \left (x^{2}-6 x +5\right )\right )^{3}+2 x^{2} \ln \relax (x )-2 x^{2} {\mathrm e}^{x^{2}}+2 x \ln \relax (x )-2 \,{\mathrm e}^{x^{2}} x +2 \ln \relax (x )}{2 \left (x +1\right ) x}\) \(173\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((2*x^3-11*x^2+4*x+5)*ln((x^3-6*x^2+5*x)/exp(2))+(2*x^7-8*x^6-12*x^5+8*x^4+10*x^3)*exp(x^2)-x^5+4*x^4+3*x^
3+5*x^2+2*x-5)/(x^6-4*x^5-6*x^4+4*x^3+5*x^2),x,method=_RETURNVERBOSE)

[Out]

-1/x/(x+1)*ln(x^2-6*x+5)-1/2*(I*Pi*csgn(I*(x^2-6*x+5))*csgn(I*x*(x^2-6*x+5))^2-I*Pi*csgn(I*(x^2-6*x+5))*csgn(I
*x*(x^2-6*x+5))*csgn(I*x)-4+I*Pi*csgn(I*x*(x^2-6*x+5))^2*csgn(I*x)-I*Pi*csgn(I*x*(x^2-6*x+5))^3+2*x^2*ln(x)-2*
x^2*exp(x^2)+2*x*ln(x)-2*exp(x^2)*x+2*ln(x))/(x+1)/x

________________________________________________________________________________________

maxima [B]  time = 0.43, size = 90, normalized size = 2.65 \begin {gather*} \frac {30 \, {\left (x^{2} + x\right )} e^{\left (x^{2}\right )} + 15 \, {\left (x^{2} + x - 2\right )} \log \left (x - 1\right ) + {\left (x^{2} + x - 30\right )} \log \left (x - 5\right ) - 30 \, x - 30 \, \log \relax (x) + 30}{30 \, {\left (x^{2} + x\right )}} + \frac {17 \, x + 12}{12 \, {\left (x^{2} + x\right )}} - \frac {5}{12 \, {\left (x + 1\right )}} - \frac {1}{2} \, \log \left (x - 1\right ) - \frac {1}{30} \, \log \left (x - 5\right ) - \log \relax (x) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^3-11*x^2+4*x+5)*log((x^3-6*x^2+5*x)/exp(2))+(2*x^7-8*x^6-12*x^5+8*x^4+10*x^3)*exp(x^2)-x^5+4*x
^4+3*x^3+5*x^2+2*x-5)/(x^6-4*x^5-6*x^4+4*x^3+5*x^2),x, algorithm="maxima")

[Out]

1/30*(30*(x^2 + x)*e^(x^2) + 15*(x^2 + x - 2)*log(x - 1) + (x^2 + x - 30)*log(x - 5) - 30*x - 30*log(x) + 30)/
(x^2 + x) + 1/12*(17*x + 12)/(x^2 + x) - 5/12/(x + 1) - 1/2*log(x - 1) - 1/30*log(x - 5) - log(x)

________________________________________________________________________________________

mupad [B]  time = 4.36, size = 34, normalized size = 1.00 \begin {gather*} {\mathrm {e}}^{x^2}-\ln \relax (x)-\frac {\ln \left ({\mathrm {e}}^{-2}\,\left (x^3-6\,x^2+5\,x\right )\right )}{x^2+x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((2*x + exp(x^2)*(10*x^3 + 8*x^4 - 12*x^5 - 8*x^6 + 2*x^7) + log(exp(-2)*(5*x - 6*x^2 + x^3))*(4*x - 11*x^2
 + 2*x^3 + 5) + 5*x^2 + 3*x^3 + 4*x^4 - x^5 - 5)/(5*x^2 + 4*x^3 - 6*x^4 - 4*x^5 + x^6),x)

[Out]

exp(x^2) - log(x) - log(exp(-2)*(5*x - 6*x^2 + x^3))/(x + x^2)

________________________________________________________________________________________

sympy [A]  time = 0.53, size = 29, normalized size = 0.85 \begin {gather*} e^{x^{2}} - \log {\relax (x )} - \frac {\log {\left (\frac {x^{3} - 6 x^{2} + 5 x}{e^{2}} \right )}}{x^{2} + x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x**3-11*x**2+4*x+5)*ln((x**3-6*x**2+5*x)/exp(2))+(2*x**7-8*x**6-12*x**5+8*x**4+10*x**3)*exp(x**2
)-x**5+4*x**4+3*x**3+5*x**2+2*x-5)/(x**6-4*x**5-6*x**4+4*x**3+5*x**2),x)

[Out]

exp(x**2) - log(x) - log((x**3 - 6*x**2 + 5*x)*exp(-2))/(x**2 + x)

________________________________________________________________________________________