3.91.30 \(\int \frac {36-42 x+16 x^2-16 x^3+6 x^4-x^5+e^x (-9 x^3+6 x^4-x^5)+(-36+33 x-10 x^2+x^3) \log (x^2)}{9 x^3-6 x^4+x^5} \, dx\)

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

________________________________________________________________________________________

Rubi [A]  time = 0.73, antiderivative size = 42, normalized size of antiderivative = 1.35, number of steps used = 19, number of rules used = 9, integrand size = 80, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.112, Rules used = {1594, 27, 6742, 2194, 44, 43, 37, 2334, 12} \begin {gather*} \frac {(4-x)^2 \log \left (x^2\right )}{8 x^2}-e^x-x-\frac {5}{3-x}-\frac {\log (x)}{4} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(36 - 42*x + 16*x^2 - 16*x^3 + 6*x^4 - x^5 + E^x*(-9*x^3 + 6*x^4 - x^5) + (-36 + 33*x - 10*x^2 + x^3)*Log[
x^2])/(9*x^3 - 6*x^4 + x^5),x]

[Out]

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

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 37

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((a + b*x)^(m + 1)*(c + d*x)^(n +
1))/((b*c - a*d)*(m + 1)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[m + n + 2, 0] && NeQ
[m, -1]

Rule 43

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 44

Int[((a_) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d*
x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0] && ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && L
tQ[m + n + 2, 0])

Rule 1594

Int[(u_.)*((a_.)*(x_)^(p_.) + (b_.)*(x_)^(q_.) + (c_.)*(x_)^(r_.))^(n_.), x_Symbol] :> Int[u*x^(n*p)*(a + b*x^
(q - p) + c*x^(r - p))^n, x] /; FreeQ[{a, b, c, p, q, r}, x] && IntegerQ[n] && PosQ[q - p] && PosQ[r - p]

Rule 2194

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]

Rule 2334

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*(x_)^(m_.)*((d_) + (e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = I
ntHide[x^m*(d + e*x^r)^q, x]}, Simp[u*(a + b*Log[c*x^n]), x] - Dist[b*n, Int[SimplifyIntegrand[u/x, x], x], x]
] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[q, 0] && IntegerQ[m] &&  !(EqQ[q, 1] && EqQ[m, -1])

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 {36-42 x+16 x^2-16 x^3+6 x^4-x^5+e^x \left (-9 x^3+6 x^4-x^5\right )+\left (-36+33 x-10 x^2+x^3\right ) \log \left (x^2\right )}{x^3 \left (9-6 x+x^2\right )} \, dx\\ &=\int \frac {36-42 x+16 x^2-16 x^3+6 x^4-x^5+e^x \left (-9 x^3+6 x^4-x^5\right )+\left (-36+33 x-10 x^2+x^3\right ) \log \left (x^2\right )}{(-3+x)^2 x^3} \, dx\\ &=\int \left (-e^x-\frac {16}{(-3+x)^2}+\frac {36}{(-3+x)^2 x^3}-\frac {42}{(-3+x)^2 x^2}+\frac {16}{(-3+x)^2 x}+\frac {6 x}{(-3+x)^2}-\frac {x^2}{(-3+x)^2}+\frac {(-4+x) \log \left (x^2\right )}{x^3}\right ) \, dx\\ &=-\frac {16}{3-x}+6 \int \frac {x}{(-3+x)^2} \, dx+16 \int \frac {1}{(-3+x)^2 x} \, dx+36 \int \frac {1}{(-3+x)^2 x^3} \, dx-42 \int \frac {1}{(-3+x)^2 x^2} \, dx-\int e^x \, dx-\int \frac {x^2}{(-3+x)^2} \, dx+\int \frac {(-4+x) \log \left (x^2\right )}{x^3} \, dx\\ &=-e^x-\frac {16}{3-x}+\frac {(4-x)^2 \log \left (x^2\right )}{8 x^2}-2 \int \frac {(4-x)^2}{8 x^3} \, dx+6 \int \left (\frac {3}{(-3+x)^2}+\frac {1}{-3+x}\right ) \, dx+16 \int \left (\frac {1}{3 (-3+x)^2}-\frac {1}{9 (-3+x)}+\frac {1}{9 x}\right ) \, dx+36 \int \left (\frac {1}{27 (-3+x)^2}-\frac {1}{27 (-3+x)}+\frac {1}{9 x^3}+\frac {2}{27 x^2}+\frac {1}{27 x}\right ) \, dx-42 \int \left (\frac {1}{9 (-3+x)^2}-\frac {2}{27 (-3+x)}+\frac {1}{9 x^2}+\frac {2}{27 x}\right ) \, dx-\int \left (1+\frac {9}{(-3+x)^2}+\frac {6}{-3+x}\right ) \, dx\\ &=-e^x-\frac {5}{3-x}-\frac {2}{x^2}+\frac {2}{x}-x+\frac {(4-x)^2 \log \left (x^2\right )}{8 x^2}-\frac {1}{4} \int \frac {(4-x)^2}{x^3} \, dx\\ &=-e^x-\frac {5}{3-x}-\frac {2}{x^2}+\frac {2}{x}-x+\frac {(4-x)^2 \log \left (x^2\right )}{8 x^2}-\frac {1}{4} \int \left (\frac {16}{x^3}-\frac {8}{x^2}+\frac {1}{x}\right ) \, dx\\ &=-e^x-\frac {5}{3-x}-x-\frac {\log (x)}{4}+\frac {(4-x)^2 \log \left (x^2\right )}{8 x^2}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.21, size = 28, normalized size = 0.90 \begin {gather*} -e^x+\frac {5}{-3+x}-x-\frac {(-2+x) \log \left (x^2\right )}{x^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(36 - 42*x + 16*x^2 - 16*x^3 + 6*x^4 - x^5 + E^x*(-9*x^3 + 6*x^4 - x^5) + (-36 + 33*x - 10*x^2 + x^3
)*Log[x^2])/(9*x^3 - 6*x^4 + x^5),x]

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.48, size = 52, normalized size = 1.68 \begin {gather*} -\frac {x^{4} - 3 \, x^{3} - 5 \, x^{2} + {\left (x^{3} - 3 \, x^{2}\right )} e^{x} + {\left (x^{2} - 5 \, x + 6\right )} \log \left (x^{2}\right )}{x^{3} - 3 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^3-10*x^2+33*x-36)*log(x^2)+(-x^5+6*x^4-9*x^3)*exp(x)-x^5+6*x^4-16*x^3+16*x^2-42*x+36)/(x^5-6*x^4
+9*x^3),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [B]  time = 0.81, size = 61, normalized size = 1.97 \begin {gather*} -\frac {x^{4} + x^{3} e^{x} - 3 \, x^{3} - 3 \, x^{2} e^{x} + x^{2} \log \left (x^{2}\right ) - 5 \, x^{2} - 5 \, x \log \left (x^{2}\right ) + 6 \, \log \left (x^{2}\right )}{x^{3} - 3 \, x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^3-10*x^2+33*x-36)*log(x^2)+(-x^5+6*x^4-9*x^3)*exp(x)-x^5+6*x^4-16*x^3+16*x^2-42*x+36)/(x^5-6*x^4
+9*x^3),x, algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.10, size = 34, normalized size = 1.10




method result size



default \(-\frac {\ln \left (x^{2}\right )}{x}+\frac {2 \ln \left (x^{2}\right )}{x^{2}}-x +\frac {5}{x -3}-{\mathrm e}^{x}\) \(34\)
risch \(-\frac {2 \left (x -2\right ) \ln \relax (x )}{x^{2}}-\frac {-i \pi \,x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )+2 i \pi \,x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}-i \pi \,x^{2} \mathrm {csgn}\left (i x^{2}\right )^{3}+5 i \pi x \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )-10 i \pi x \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}+5 i \pi x \mathrm {csgn}\left (i x^{2}\right )^{3}-6 i \pi \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )+12 i \pi \,\mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2}-6 i \pi \mathrm {csgn}\left (i x^{2}\right )^{3}+2 x^{4}+2 \,{\mathrm e}^{x} x^{3}-6 x^{3}-6 \,{\mathrm e}^{x} x^{2}-10 x^{2}}{2 x^{2} \left (x -3\right )}\) \(211\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x^3-10*x^2+33*x-36)*ln(x^2)+(-x^5+6*x^4-9*x^3)*exp(x)-x^5+6*x^4-16*x^3+16*x^2-42*x+36)/(x^5-6*x^4+9*x^3)
,x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x^3-10*x^2+33*x-36)*log(x^2)+(-x^5+6*x^4-9*x^3)*exp(x)-x^5+6*x^4-16*x^3+16*x^2-42*x+36)/(x^5-6*x^4
+9*x^3),x, algorithm="maxima")

[Out]

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

________________________________________________________________________________________

mupad [B]  time = 8.71, size = 27, normalized size = 0.87 \begin {gather*} \frac {5}{x-3}-{\mathrm {e}}^x-x-\frac {\ln \left (x^2\right )\,\left (x-2\right )}{x^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(42*x - 16*x^2 + 16*x^3 - 6*x^4 + x^5 + exp(x)*(9*x^3 - 6*x^4 + x^5) - log(x^2)*(33*x - 10*x^2 + x^3 - 36
) - 36)/(9*x^3 - 6*x^4 + x^5),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.38, size = 20, normalized size = 0.65 \begin {gather*} - x - e^{x} + \frac {5}{x - 3} + \frac {\left (2 - x\right ) \log {\left (x^{2} \right )}}{x^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x**3-10*x**2+33*x-36)*ln(x**2)+(-x**5+6*x**4-9*x**3)*exp(x)-x**5+6*x**4-16*x**3+16*x**2-42*x+36)/(
x**5-6*x**4+9*x**3),x)

[Out]

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

________________________________________________________________________________________