3.9.14 \(\int \frac {-192+368 x-116 x^2-28 x^3+21 x^4-3 x^5+(336-160 x+28 x^2-4 x^3) \log (-3+x)}{-48+64 x-28 x^2+4 x^3} \, dx\)

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

________________________________________________________________________________________

Rubi [B]  time = 0.34, antiderivative size = 51, normalized size of antiderivative = 2.12, number of steps used = 22, number of rules used = 10, integrand size = 63, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.159, Rules used = {6742, 44, 77, 88, 2418, 2389, 2295, 2395, 36, 31} \begin {gather*} -\frac {x^3}{4}+6 x-\frac {24}{2-x}-3 \log (3-x)+(3-x) \log (x-3)-\frac {24 \log (x-3)}{2-x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(-192 + 368*x - 116*x^2 - 28*x^3 + 21*x^4 - 3*x^5 + (336 - 160*x + 28*x^2 - 4*x^3)*Log[-3 + x])/(-48 + 64*
x - 28*x^2 + 4*x^3),x]

[Out]

-24/(2 - x) + 6*x - x^3/4 - 3*Log[3 - x] - (24*Log[-3 + x])/(2 - x) + (3 - x)*Log[-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 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 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 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 88

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandI
ntegrand[(a + b*x)^m*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && IntegersQ[m, n] &&
(IntegerQ[p] || (GtQ[m, 0] && GeQ[n, -1]))

Rule 2295

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2389

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.), x_Symbol] :> Dist[1/e, Subst[Int[(a + b*Log[c*
x^n])^p, x], x, d + e*x], x] /; FreeQ[{a, b, c, d, e, n, p}, x]

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 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 \left (-\frac {48}{(-3+x) (-2+x)^2}+\frac {92 x}{(-3+x) (-2+x)^2}-\frac {29 x^2}{(-3+x) (-2+x)^2}-\frac {7 x^3}{(-3+x) (-2+x)^2}+\frac {21 x^4}{4 (-3+x) (-2+x)^2}-\frac {3 x^5}{4 (-3+x) (-2+x)^2}-\frac {\left (28-4 x+x^2\right ) \log (-3+x)}{(-2+x)^2}\right ) \, dx\\ &=-\left (\frac {3}{4} \int \frac {x^5}{(-3+x) (-2+x)^2} \, dx\right )+\frac {21}{4} \int \frac {x^4}{(-3+x) (-2+x)^2} \, dx-7 \int \frac {x^3}{(-3+x) (-2+x)^2} \, dx-29 \int \frac {x^2}{(-3+x) (-2+x)^2} \, dx-48 \int \frac {1}{(-3+x) (-2+x)^2} \, dx+92 \int \frac {x}{(-3+x) (-2+x)^2} \, dx-\int \frac {\left (28-4 x+x^2\right ) \log (-3+x)}{(-2+x)^2} \, dx\\ &=-\left (\frac {3}{4} \int \left (33+\frac {243}{-3+x}-\frac {32}{(-2+x)^2}-\frac {112}{-2+x}+7 x+x^2\right ) \, dx\right )+\frac {21}{4} \int \left (7+\frac {81}{-3+x}-\frac {16}{(-2+x)^2}-\frac {48}{-2+x}+x\right ) \, dx-7 \int \left (1+\frac {27}{-3+x}-\frac {8}{(-2+x)^2}-\frac {20}{-2+x}\right ) \, dx-29 \int \left (\frac {9}{-3+x}-\frac {4}{(-2+x)^2}-\frac {8}{-2+x}\right ) \, dx-48 \int \left (\frac {1}{2-x}+\frac {1}{-3+x}-\frac {1}{(-2+x)^2}\right ) \, dx+92 \int \left (\frac {3}{-3+x}-\frac {2}{(-2+x)^2}-\frac {3}{-2+x}\right ) \, dx-\int \left (\log (-3+x)+\frac {24 \log (-3+x)}{(-2+x)^2}\right ) \, dx\\ &=-\frac {24}{2-x}+5 x-\frac {x^3}{4}-24 \log (2-x)+21 \log (3-x)-24 \int \frac {\log (-3+x)}{(-2+x)^2} \, dx-\int \log (-3+x) \, dx\\ &=-\frac {24}{2-x}+5 x-\frac {x^3}{4}-24 \log (2-x)+21 \log (3-x)-\frac {24 \log (-3+x)}{2-x}-24 \int \frac {1}{(-3+x) (-2+x)} \, dx-\operatorname {Subst}(\int \log (x) \, dx,x,-3+x)\\ &=-\frac {24}{2-x}+6 x-\frac {x^3}{4}-24 \log (2-x)+21 \log (3-x)-\frac {24 \log (-3+x)}{2-x}-(-3+x) \log (-3+x)-24 \int \frac {1}{-3+x} \, dx+24 \int \frac {1}{-2+x} \, dx\\ &=-\frac {24}{2-x}+6 x-\frac {x^3}{4}-3 \log (3-x)-\frac {24 \log (-3+x)}{2-x}-(-3+x) \log (-3+x)\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [B]  time = 0.08, size = 59, normalized size = 2.46 \begin {gather*} \frac {1}{4} \left (24 x-x^3-192 \tanh ^{-1}(5-2 x)-96 \log (2-x)+84 \log (3-x)-4 (-3+x) \log (-3+x)+\frac {96 (1+\log (-3+x))}{-2+x}\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(-192 + 368*x - 116*x^2 - 28*x^3 + 21*x^4 - 3*x^5 + (336 - 160*x + 28*x^2 - 4*x^3)*Log[-3 + x])/(-48
 + 64*x - 28*x^2 + 4*x^3),x]

[Out]

(24*x - x^3 - 192*ArcTanh[5 - 2*x] - 96*Log[2 - x] + 84*Log[3 - x] - 4*(-3 + x)*Log[-3 + x] + (96*(1 + Log[-3
+ x]))/(-2 + x))/4

________________________________________________________________________________________

fricas [A]  time = 0.57, size = 39, normalized size = 1.62 \begin {gather*} -\frac {x^{4} - 2 \, x^{3} - 24 \, x^{2} + 4 \, {\left (x^{2} - 2 \, x - 24\right )} \log \left (x - 3\right ) + 48 \, x - 96}{4 \, {\left (x - 2\right )}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-4*x^3+28*x^2-160*x+336)*log(x-3)-3*x^5+21*x^4-28*x^3-116*x^2+368*x-192)/(4*x^3-28*x^2+64*x-48),x,
 algorithm="fricas")

[Out]

-1/4*(x^4 - 2*x^3 - 24*x^2 + 4*(x^2 - 2*x - 24)*log(x - 3) + 48*x - 96)/(x - 2)

________________________________________________________________________________________

giac [A]  time = 0.29, size = 31, normalized size = 1.29 \begin {gather*} -\frac {1}{4} \, x^{3} - {\left (x - \frac {24}{x - 2}\right )} \log \left (x - 3\right ) + 6 \, x + \frac {24}{x - 2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-4*x^3+28*x^2-160*x+336)*log(x-3)-3*x^5+21*x^4-28*x^3-116*x^2+368*x-192)/(4*x^3-28*x^2+64*x-48),x,
 algorithm="giac")

[Out]

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

________________________________________________________________________________________

maple [A]  time = 0.06, size = 45, normalized size = 1.88




method result size



norman \(\frac {28 \ln \left (x -3\right )+6 x^{2}+\frac {x^{3}}{2}-\frac {x^{4}}{4}-\ln \left (x -3\right ) x^{2}}{x -2}+2 \ln \left (x -3\right )\) \(45\)
risch \(-\frac {\left (x^{2}-2 x -24\right ) \ln \left (x -3\right )}{x -2}-\frac {x^{4}-2 x^{3}-24 x^{2}+48 x -96}{4 \left (x -2\right )}\) \(46\)
derivativedivides \(-\left (x -3\right ) \ln \left (x -3\right )-\frac {3 x}{4}+\frac {9}{4}-\frac {24 \ln \left (x -3\right ) \left (x -3\right )}{x -2}-\frac {\left (x -3\right )^{3}}{4}-\frac {9 \left (x -3\right )^{2}}{4}+21 \ln \left (x -3\right )+\frac {24}{x -2}\) \(56\)
default \(-\left (x -3\right ) \ln \left (x -3\right )-\frac {3 x}{4}+\frac {9}{4}-\frac {24 \ln \left (x -3\right ) \left (x -3\right )}{x -2}-\frac {\left (x -3\right )^{3}}{4}-\frac {9 \left (x -3\right )^{2}}{4}+21 \ln \left (x -3\right )+\frac {24}{x -2}\) \(56\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((-4*x^3+28*x^2-160*x+336)*ln(x-3)-3*x^5+21*x^4-28*x^3-116*x^2+368*x-192)/(4*x^3-28*x^2+64*x-48),x,method=
_RETURNVERBOSE)

[Out]

(28*ln(x-3)+6*x^2+1/2*x^3-1/4*x^4-ln(x-3)*x^2)/(x-2)+2*ln(x-3)

________________________________________________________________________________________

maxima [B]  time = 0.86, size = 53, normalized size = 2.21 \begin {gather*} -\frac {x^{4} - 2 \, x^{3} - 24 \, x^{2} + 4 \, {\left (x^{2} - 50 \, x + 72\right )} \log \left (x - 3\right ) + 48 \, x - 288}{4 \, {\left (x - 2\right )}} - \frac {48}{x - 2} - 48 \, \log \left (x - 3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-4*x^3+28*x^2-160*x+336)*log(x-3)-3*x^5+21*x^4-28*x^3-116*x^2+368*x-192)/(4*x^3-28*x^2+64*x-48),x,
 algorithm="maxima")

[Out]

-1/4*(x^4 - 2*x^3 - 24*x^2 + 4*(x^2 - 50*x + 72)*log(x - 3) + 48*x - 288)/(x - 2) - 48/(x - 2) - 48*log(x - 3)

________________________________________________________________________________________

mupad [B]  time = 0.76, size = 28, normalized size = 1.17 \begin {gather*} \frac {\left (4\,\ln \left (x-3\right )+x^2\right )\,\left (-x^2+2\,x+24\right )}{4\,\left (x-2\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(log(x - 3)*(160*x - 28*x^2 + 4*x^3 - 336) - 368*x + 116*x^2 + 28*x^3 - 21*x^4 + 3*x^5 + 192)/(64*x - 28*
x^2 + 4*x^3 - 48),x)

[Out]

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

________________________________________________________________________________________

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

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-4*x**3+28*x**2-160*x+336)*ln(x-3)-3*x**5+21*x**4-28*x**3-116*x**2+368*x-192)/(4*x**3-28*x**2+64*x
-48),x)

[Out]

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

________________________________________________________________________________________