3.32.73 \(\int \frac {-108+72 x-18 x^2-4 x^3+x^4+(-54+36 x-9 x^2+x^3) \log (4)+(-108 x+72 x^2-18 x^3+2 x^4) \log (\frac {-18+6 x-x^2}{-3+x})}{-54+36 x-9 x^2+x^3} \, dx\)

Optimal. Leaf size=22 \[ x \left (2+\log (4)+x \log \left (6+\frac {x^2}{3-x}\right )\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.49, antiderivative size = 29, normalized size of antiderivative = 1.32, number of steps used = 29, number of rules used = 10, integrand size = 87, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.115, Rules used = {6742, 681, 31, 628, 800, 634, 617, 204, 1628, 2525} \begin {gather*} x^2 \log \left (\frac {x^2-6 x+18}{3-x}\right )+2 x+x \log (4) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-108 + 72*x - 18*x^2 - 4*x^3 + x^4 + (-54 + 36*x - 9*x^2 + x^3)*Log[4] + (-108*x + 72*x^2 - 18*x^3 + 2*x^
4)*Log[(-18 + 6*x - x^2)/(-3 + x)])/(-54 + 36*x - 9*x^2 + x^3),x]

[Out]

2*x + x*Log[4] + x^2*Log[(18 - 6*x + x^2)/(3 - x)]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 204

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> -Simp[ArcTan[(Rt[-b, 2]*x)/Rt[-a, 2]]/(Rt[-a, 2]*Rt[-b, 2]), x] /
; FreeQ[{a, b}, x] && PosQ[a/b] && (LtQ[a, 0] || LtQ[b, 0])

Rule 617

Int[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> With[{q = 1 - 4*Simplify[(a*c)/b^2]}, Dist[-2/b, Sub
st[Int[1/(q - x^2), x], x, 1 + (2*c*x)/b], x] /; RationalQ[q] && (EqQ[q^2, 1] ||  !RationalQ[b^2 - 4*a*c])] /;
 FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 628

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

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 681

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

Rule 800

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Int[Exp
andIntegrand[((d + e*x)^m*(f + g*x))/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b^2 -
 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[m]

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

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

Rubi steps

\begin {gather*} \begin {aligned} \text {integral} &=\int \left (-\frac {108}{(-3+x) \left (18-6 x+x^2\right )}+\frac {72 x}{(-3+x) \left (18-6 x+x^2\right )}-\frac {18 x^2}{(-3+x) \left (18-6 x+x^2\right )}-\frac {4 x^3}{(-3+x) \left (18-6 x+x^2\right )}+\frac {x^4}{(-3+x) \left (18-6 x+x^2\right )}+\log (4)+2 x \log \left (-\frac {18-6 x+x^2}{-3+x}\right )\right ) \, dx\\ &=x \log (4)+2 \int x \log \left (-\frac {18-6 x+x^2}{-3+x}\right ) \, dx-4 \int \frac {x^3}{(-3+x) \left (18-6 x+x^2\right )} \, dx-18 \int \frac {x^2}{(-3+x) \left (18-6 x+x^2\right )} \, dx+72 \int \frac {x}{(-3+x) \left (18-6 x+x^2\right )} \, dx-108 \int \frac {1}{(-3+x) \left (18-6 x+x^2\right )} \, dx+\int \frac {x^4}{(-3+x) \left (18-6 x+x^2\right )} \, dx\\ &=x \log (4)+x^2 \log \left (\frac {18-6 x+x^2}{3-x}\right )-4 \int \left (1+\frac {3}{-3+x}+\frac {6 x}{18-6 x+x^2}\right ) \, dx+12 \int \frac {-3+x}{18-6 x+x^2} \, dx-18 \int \left (\frac {1}{-3+x}+\frac {6}{18-6 x+x^2}\right ) \, dx-24 \int \frac {1}{-6+2 x} \, dx+72 \int \left (\frac {1}{3 (-3+x)}+\frac {6-x}{3 \left (18-6 x+x^2\right )}\right ) \, dx-\int \frac {(6-x) x^3}{(3-x) \left (18-6 x+x^2\right )} \, dx+\int \left (9+\frac {9}{-3+x}+x+\frac {36 (-3+x)}{18-6 x+x^2}\right ) \, dx\\ &=5 x+\frac {x^2}{2}+x \log (4)-9 \log (3-x)+6 \log \left (18-6 x+x^2\right )+x^2 \log \left (\frac {18-6 x+x^2}{3-x}\right )+24 \int \frac {6-x}{18-6 x+x^2} \, dx-24 \int \frac {x}{18-6 x+x^2} \, dx+36 \int \frac {-3+x}{18-6 x+x^2} \, dx-108 \int \frac {1}{18-6 x+x^2} \, dx-\int \left (3-\frac {9}{-3+x}+x-\frac {108}{18-6 x+x^2}\right ) \, dx\\ &=2 x+x \log (4)+24 \log \left (18-6 x+x^2\right )+x^2 \log \left (\frac {18-6 x+x^2}{3-x}\right )-2 \left (12 \int \frac {-6+2 x}{18-6 x+x^2} \, dx\right )-36 \operatorname {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\frac {x}{3}\right )+108 \int \frac {1}{18-6 x+x^2} \, dx\\ &=2 x+36 \tan ^{-1}\left (1-\frac {x}{3}\right )+x \log (4)+x^2 \log \left (\frac {18-6 x+x^2}{3-x}\right )+36 \operatorname {Subst}\left (\int \frac {1}{-1-x^2} \, dx,x,1-\frac {x}{3}\right )\\ &=2 x+x \log (4)+x^2 \log \left (\frac {18-6 x+x^2}{3-x}\right )\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [B]  time = 0.05, size = 47, normalized size = 2.14 \begin {gather*} 36 \tan ^{-1}\left (\frac {3}{-3+x}\right )+36 \tan ^{-1}\left (\frac {1}{3} (-3+x)\right )+x (2+\log (4))+x^2 \log \left (-\frac {18-6 x+x^2}{-3+x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-108 + 72*x - 18*x^2 - 4*x^3 + x^4 + (-54 + 36*x - 9*x^2 + x^3)*Log[4] + (-108*x + 72*x^2 - 18*x^3
+ 2*x^4)*Log[(-18 + 6*x - x^2)/(-3 + x)])/(-54 + 36*x - 9*x^2 + x^3),x]

[Out]

36*ArcTan[3/(-3 + x)] + 36*ArcTan[(-3 + x)/3] + x*(2 + Log[4]) + x^2*Log[-((18 - 6*x + x^2)/(-3 + x))]

________________________________________________________________________________________

fricas [A]  time = 0.67, size = 29, normalized size = 1.32 \begin {gather*} x^{2} \log \left (-\frac {x^{2} - 6 \, x + 18}{x - 3}\right ) + 2 \, x \log \relax (2) + 2 \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^4-18*x^3+72*x^2-108*x)*log((-x^2+6*x-18)/(x-3))+2*(x^3-9*x^2+36*x-54)*log(2)+x^4-4*x^3-18*x^2+
72*x-108)/(x^3-9*x^2+36*x-54),x, algorithm="fricas")

[Out]

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

________________________________________________________________________________________

giac [A]  time = 0.26, size = 32, normalized size = 1.45 \begin {gather*} x^{2} \log \left (-x^{2} + 6 \, x - 18\right ) - x^{2} \log \left (x - 3\right ) + 2 \, x {\left (\log \relax (2) + 1\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^4-18*x^3+72*x^2-108*x)*log((-x^2+6*x-18)/(x-3))+2*(x^3-9*x^2+36*x-54)*log(2)+x^4-4*x^3-18*x^2+
72*x-108)/(x^3-9*x^2+36*x-54),x, algorithm="giac")

[Out]

x^2*log(-x^2 + 6*x - 18) - x^2*log(x - 3) + 2*x*(log(2) + 1)

________________________________________________________________________________________

maple [A]  time = 0.07, size = 31, normalized size = 1.41




method result size



default \(2 x +x^{2} \ln \left (\frac {-x^{2}+6 x -18}{x -3}\right )+2 x \ln \relax (2)\) \(31\)
norman \(x^{2} \ln \left (\frac {-x^{2}+6 x -18}{x -3}\right )+\left (2+2 \ln \relax (2)\right ) x\) \(31\)
risch \(2 x +x^{2} \ln \left (\frac {-x^{2}+6 x -18}{x -3}\right )+2 x \ln \relax (2)\) \(31\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((2*x^4-18*x^3+72*x^2-108*x)*ln((-x^2+6*x-18)/(x-3))+2*(x^3-9*x^2+36*x-54)*ln(2)+x^4-4*x^3-18*x^2+72*x-108
)/(x^3-9*x^2+36*x-54),x,method=_RETURNVERBOSE)

[Out]

2*x+x^2*ln((-x^2+6*x-18)/(x-3))+2*x*ln(2)

________________________________________________________________________________________

maxima [B]  time = 1.50, size = 134, normalized size = 6.09 \begin {gather*} x^{2} \log \left (-x^{2} + 6 \, x - 18\right ) + 2 \, {\left (x + 6 \, \arctan \left (\frac {1}{3} \, x - 1\right ) + 3 \, \log \left (x^{2} - 6 \, x + 18\right ) + 3 \, \log \left (x - 3\right )\right )} \log \relax (2) + 12 \, {\left (2 \, \arctan \left (\frac {1}{3} \, x - 1\right ) - \log \left (x^{2} - 6 \, x + 18\right ) + 2 \, \log \left (x - 3\right )\right )} \log \relax (2) - 18 \, {\left (2 \, \arctan \left (\frac {1}{3} \, x - 1\right ) + \log \left (x - 3\right )\right )} \log \relax (2) + 6 \, {\left (\log \left (x^{2} - 6 \, x + 18\right ) - 2 \, \log \left (x - 3\right )\right )} \log \relax (2) - {\left (x^{2} - 9\right )} \log \left (x - 3\right ) + 2 \, x - 9 \, \log \left (x - 3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x^4-18*x^3+72*x^2-108*x)*log((-x^2+6*x-18)/(x-3))+2*(x^3-9*x^2+36*x-54)*log(2)+x^4-4*x^3-18*x^2+
72*x-108)/(x^3-9*x^2+36*x-54),x, algorithm="maxima")

[Out]

x^2*log(-x^2 + 6*x - 18) + 2*(x + 6*arctan(1/3*x - 1) + 3*log(x^2 - 6*x + 18) + 3*log(x - 3))*log(2) + 12*(2*a
rctan(1/3*x - 1) - log(x^2 - 6*x + 18) + 2*log(x - 3))*log(2) - 18*(2*arctan(1/3*x - 1) + log(x - 3))*log(2) +
 6*(log(x^2 - 6*x + 18) - 2*log(x - 3))*log(2) - (x^2 - 9)*log(x - 3) + 2*x - 9*log(x - 3)

________________________________________________________________________________________

mupad [B]  time = 2.10, size = 27, normalized size = 1.23 \begin {gather*} x^2\,\ln \left (-\frac {x^2-6\,x+18}{x-3}\right )+x\,\left (\ln \relax (4)+2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(log(-(x^2 - 6*x + 18)/(x - 3))*(108*x - 72*x^2 + 18*x^3 - 2*x^4) - 2*log(2)*(36*x - 9*x^2 + x^3 - 54) -
72*x + 18*x^2 + 4*x^3 - x^4 + 108)/(36*x - 9*x^2 + x^3 - 54),x)

[Out]

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

________________________________________________________________________________________

sympy [A]  time = 0.20, size = 24, normalized size = 1.09 \begin {gather*} x^{2} \log {\left (\frac {- x^{2} + 6 x - 18}{x - 3} \right )} + x \left (2 \log {\relax (2 )} + 2\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((2*x**4-18*x**3+72*x**2-108*x)*ln((-x**2+6*x-18)/(x-3))+2*(x**3-9*x**2+36*x-54)*ln(2)+x**4-4*x**3-1
8*x**2+72*x-108)/(x**3-9*x**2+36*x-54),x)

[Out]

x**2*log((-x**2 + 6*x - 18)/(x - 3)) + x*(2*log(2) + 2)

________________________________________________________________________________________