3.15.3 \(\int \frac {315-105 x-140 x^2+(-420 x+140 x^2+140 x^3) \log (9-6 x+x^2)+(105 x^2-35 x^3) \log ^2(9-6 x+x^2)}{-3 x^4+x^5} \, dx\)

Optimal. Leaf size=21 \[ \frac {35 \left (\frac {1}{x}-\log \left ((3-x)^2\right )\right )^2}{x} \]

________________________________________________________________________________________

Rubi [B]  time = 0.44, antiderivative size = 49, normalized size of antiderivative = 2.33, number of steps used = 17, number of rules used = 11, integrand size = 69, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.159, Rules used = {1593, 6742, 893, 2418, 2390, 2301, 2395, 44, 2394, 2315, 2397} \begin {gather*} \frac {35}{x^3}-\frac {70 \log \left ((x-3)^2\right )}{x^2}+\frac {35 (3-x) \log ^2\left ((x-3)^2\right )}{3 x}+\frac {35}{3} \log ^2\left ((x-3)^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(315 - 105*x - 140*x^2 + (-420*x + 140*x^2 + 140*x^3)*Log[9 - 6*x + x^2] + (105*x^2 - 35*x^3)*Log[9 - 6*x
+ x^2]^2)/(-3*x^4 + x^5),x]

[Out]

35/x^3 - (70*Log[(-3 + x)^2])/x^2 + (35*Log[(-3 + x)^2]^2)/3 + (35*(3 - x)*Log[(-3 + x)^2]^2)/(3*x)

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 893

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :
> Int[ExpandIntegrand[(d + e*x)^m*(f + g*x)^n*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] &
& NeQ[e*f - d*g, 0] && NeQ[b^2 - 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && I
ntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rule 1593

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

Rule 2301

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2315

Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> -Simp[PolyLog[2, 1 - c*x]/e, x] /; FreeQ[{c, d, e}, x] &
& EqQ[e + c*d, 0]

Rule 2390

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_.)*(x_))^(q_.), x_Symbol] :> Dist[1/
e, Subst[Int[((f*x)/d)^q*(a + b*Log[c*x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p, q}, x]
 && EqQ[e*f - d*g, 0]

Rule 2394

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(Log[(e*(f +
g*x))/(e*f - d*g)]*(a + b*Log[c*(d + e*x)^n]))/g, x] - Dist[(b*e*n)/g, Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2395

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_))^(q_.), x_Symbol] :> Simp[((f + g
*x)^(q + 1)*(a + b*Log[c*(d + e*x)^n]))/(g*(q + 1)), x] - Dist[(b*e*n)/(g*(q + 1)), Int[(f + g*x)^(q + 1)/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]

Rule 2397

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_)/((f_.) + (g_.)*(x_))^2, x_Symbol] :> Simp[((d +
e*x)*(a + b*Log[c*(d + e*x)^n])^p)/((e*f - d*g)*(f + g*x)), x] - Dist[(b*e*n*p)/(e*f - d*g), Int[(a + b*Log[c*
(d + e*x)^n])^(p - 1)/(f + g*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0] && GtQ[p, 0
]

Rule 2418

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[
(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunct
ionQ[RFx, x] && IntegerQ[p]

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 {315-105 x-140 x^2+\left (-420 x+140 x^2+140 x^3\right ) \log \left (9-6 x+x^2\right )+\left (105 x^2-35 x^3\right ) \log ^2\left (9-6 x+x^2\right )}{(-3+x) x^4} \, dx\\ &=\int \left (-\frac {35 \left (-9+3 x+4 x^2\right )}{(-3+x) x^4}+\frac {140 \left (-3+x+x^2\right ) \log \left ((-3+x)^2\right )}{(-3+x) x^3}-\frac {35 \log ^2\left ((-3+x)^2\right )}{x^2}\right ) \, dx\\ &=-\left (35 \int \frac {-9+3 x+4 x^2}{(-3+x) x^4} \, dx\right )-35 \int \frac {\log ^2\left ((-3+x)^2\right )}{x^2} \, dx+140 \int \frac {\left (-3+x+x^2\right ) \log \left ((-3+x)^2\right )}{(-3+x) x^3} \, dx\\ &=\frac {35 (3-x) \log ^2\left ((-3+x)^2\right )}{3 x}-35 \int \left (\frac {4}{9 (-3+x)}+\frac {3}{x^4}-\frac {4}{3 x^2}-\frac {4}{9 x}\right ) \, dx+\frac {140}{3} \int \frac {\log \left ((-3+x)^2\right )}{x} \, dx+140 \int \left (\frac {\log \left ((-3+x)^2\right )}{3 (-3+x)}+\frac {\log \left ((-3+x)^2\right )}{x^3}-\frac {\log \left ((-3+x)^2\right )}{3 x}\right ) \, dx\\ &=\frac {35}{x^3}-\frac {140}{3 x}-\frac {140}{9} \log (3-x)+\frac {35 (3-x) \log ^2\left ((-3+x)^2\right )}{3 x}+\frac {140}{3} \log \left ((-3+x)^2\right ) \log \left (\frac {x}{3}\right )+\frac {140 \log (x)}{9}+\frac {140}{3} \int \frac {\log \left ((-3+x)^2\right )}{-3+x} \, dx-\frac {140}{3} \int \frac {\log \left ((-3+x)^2\right )}{x} \, dx-\frac {280}{3} \int \frac {\log \left (\frac {x}{3}\right )}{-3+x} \, dx+140 \int \frac {\log \left ((-3+x)^2\right )}{x^3} \, dx\\ &=\frac {35}{x^3}-\frac {140}{3 x}-\frac {140}{9} \log (3-x)-\frac {70 \log \left ((-3+x)^2\right )}{x^2}+\frac {35 (3-x) \log ^2\left ((-3+x)^2\right )}{3 x}+\frac {140 \log (x)}{9}+\frac {280}{3} \text {Li}_2\left (1-\frac {x}{3}\right )+\frac {140}{3} \operatorname {Subst}\left (\int \frac {\log \left (x^2\right )}{x} \, dx,x,-3+x\right )+\frac {280}{3} \int \frac {\log \left (\frac {x}{3}\right )}{-3+x} \, dx+140 \int \frac {1}{(-3+x) x^2} \, dx\\ &=\frac {35}{x^3}-\frac {140}{3 x}-\frac {140}{9} \log (3-x)-\frac {70 \log \left ((-3+x)^2\right )}{x^2}+\frac {35}{3} \log ^2\left ((-3+x)^2\right )+\frac {35 (3-x) \log ^2\left ((-3+x)^2\right )}{3 x}+\frac {140 \log (x)}{9}+140 \int \left (\frac {1}{9 (-3+x)}-\frac {1}{3 x^2}-\frac {1}{9 x}\right ) \, dx\\ &=\frac {35}{x^3}-\frac {70 \log \left ((-3+x)^2\right )}{x^2}+\frac {35}{3} \log ^2\left ((-3+x)^2\right )+\frac {35 (3-x) \log ^2\left ((-3+x)^2\right )}{3 x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [B]  time = 0.10, size = 68, normalized size = 3.24 \begin {gather*} -35 \left (-\frac {1}{x^3}-\frac {4}{9} \log (3-x)+\frac {2}{9} \log \left ((-3+x)^2\right )+\frac {2 \log \left ((-3+x)^2\right )}{x^2}-\frac {\log ^2\left ((-3+x)^2\right )}{x}-\frac {4}{9} \log \left (\frac {x}{3}\right )+\frac {4 \log (x)}{9}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(315 - 105*x - 140*x^2 + (-420*x + 140*x^2 + 140*x^3)*Log[9 - 6*x + x^2] + (105*x^2 - 35*x^3)*Log[9
- 6*x + x^2]^2)/(-3*x^4 + x^5),x]

[Out]

-35*(-x^(-3) - (4*Log[3 - x])/9 + (2*Log[(-3 + x)^2])/9 + (2*Log[(-3 + x)^2])/x^2 - Log[(-3 + x)^2]^2/x - (4*L
og[x/3])/9 + (4*Log[x])/9)

________________________________________________________________________________________

fricas [A]  time = 0.99, size = 34, normalized size = 1.62 \begin {gather*} \frac {35 \, {\left (x^{2} \log \left (x^{2} - 6 \, x + 9\right )^{2} - 2 \, x \log \left (x^{2} - 6 \, x + 9\right ) + 1\right )}}{x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-35*x^3+105*x^2)*log(x^2-6*x+9)^2+(140*x^3+140*x^2-420*x)*log(x^2-6*x+9)-140*x^2-105*x+315)/(x^5-3
*x^4),x, algorithm="fricas")

[Out]

35*(x^2*log(x^2 - 6*x + 9)^2 - 2*x*log(x^2 - 6*x + 9) + 1)/x^3

________________________________________________________________________________________

giac [A]  time = 0.66, size = 36, normalized size = 1.71 \begin {gather*} \frac {35 \, \log \left (x^{2} - 6 \, x + 9\right )^{2}}{x} - \frac {70 \, \log \left (x^{2} - 6 \, x + 9\right )}{x^{2}} + \frac {35}{x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-35*x^3+105*x^2)*log(x^2-6*x+9)^2+(140*x^3+140*x^2-420*x)*log(x^2-6*x+9)-140*x^2-105*x+315)/(x^5-3
*x^4),x, algorithm="giac")

[Out]

35*log(x^2 - 6*x + 9)^2/x - 70*log(x^2 - 6*x + 9)/x^2 + 35/x^3

________________________________________________________________________________________

maple [A]  time = 0.27, size = 35, normalized size = 1.67




method result size



norman \(\frac {35-70 \ln \left (x^{2}-6 x +9\right ) x +35 \ln \left (x^{2}-6 x +9\right )^{2} x^{2}}{x^{3}}\) \(35\)
risch \(\frac {35 \ln \left (x^{2}-6 x +9\right )^{2}}{x}-\frac {70 \ln \left (x^{2}-6 x +9\right )}{x^{2}}+\frac {35}{x^{3}}\) \(37\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-35*x^3+105*x^2)*ln(x^2-6*x+9)^2+(140*x^3+140*x^2-420*x)*ln(x^2-6*x+9)-140*x^2-105*x+315)/(x^5-3*x^4),x,
method=_RETURNVERBOSE)

[Out]

(35-70*ln(x^2-6*x+9)*x+35*ln(x^2-6*x+9)^2*x^2)/x^3

________________________________________________________________________________________

maxima [B]  time = 0.46, size = 65, normalized size = 3.10 \begin {gather*} \frac {140 \, {\left (9 \, x \log \left (x - 3\right )^{2} + {\left (x^{2} - 9\right )} \log \left (x - 3\right ) + 3 \, x\right )}}{9 \, x^{2}} - \frac {35 \, {\left (2 \, x + 3\right )}}{6 \, x^{2}} - \frac {140}{3 \, x} + \frac {35 \, {\left (2 \, x^{2} + 3 \, x + 6\right )}}{6 \, x^{3}} - \frac {140}{9} \, \log \left (x - 3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-35*x^3+105*x^2)*log(x^2-6*x+9)^2+(140*x^3+140*x^2-420*x)*log(x^2-6*x+9)-140*x^2-105*x+315)/(x^5-3
*x^4),x, algorithm="maxima")

[Out]

140/9*(9*x*log(x - 3)^2 + (x^2 - 9)*log(x - 3) + 3*x)/x^2 - 35/6*(2*x + 3)/x^2 - 140/3/x + 35/6*(2*x^2 + 3*x +
 6)/x^3 - 140/9*log(x - 3)

________________________________________________________________________________________

mupad [B]  time = 1.11, size = 20, normalized size = 0.95 \begin {gather*} \frac {35\,{\left (x\,\ln \left (x^2-6\,x+9\right )-1\right )}^2}{x^3} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(log(x^2 - 6*x + 9)^2*(105*x^2 - 35*x^3) - 105*x + log(x^2 - 6*x + 9)*(140*x^2 - 420*x + 140*x^3) - 140*x
^2 + 315)/(3*x^4 - x^5),x)

[Out]

(35*(x*log(x^2 - 6*x + 9) - 1)^2)/x^3

________________________________________________________________________________________

sympy [B]  time = 0.17, size = 34, normalized size = 1.62 \begin {gather*} \frac {35 \log {\left (x^{2} - 6 x + 9 \right )}^{2}}{x} - \frac {70 \log {\left (x^{2} - 6 x + 9 \right )}}{x^{2}} + \frac {35}{x^{3}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-35*x**3+105*x**2)*ln(x**2-6*x+9)**2+(140*x**3+140*x**2-420*x)*ln(x**2-6*x+9)-140*x**2-105*x+315)/
(x**5-3*x**4),x)

[Out]

35*log(x**2 - 6*x + 9)**2/x - 70*log(x**2 - 6*x + 9)/x**2 + 35/x**3

________________________________________________________________________________________