3.53.16 \(\int \frac {9 x^2+e (-54 x+18 x^2)+(-54 x+18 x^2) \log (3-x)+(108 x-36 x^2) \log (x^2)+(54 x-18 x^2) \log ^2(x^2)}{-3+x} \, dx\)

Optimal. Leaf size=21 \[ 9 x^2 \left (e+\log (3-x)-\log ^2\left (x^2\right )\right ) \]

________________________________________________________________________________________

Rubi [A]  time = 0.52, antiderivative size = 42, normalized size of antiderivative = 2.00, number of steps used = 16, number of rules used = 10, integrand size = 69, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.145, Rules used = {6741, 12, 6688, 6742, 14, 77, 2395, 43, 2304, 2305} \begin {gather*} \frac {9}{2} (1+2 e) x^2-\frac {9 x^2}{2}-9 x^2 \log ^2\left (x^2\right )+9 x^2 \log (3-x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(9*x^2 + E*(-54*x + 18*x^2) + (-54*x + 18*x^2)*Log[3 - x] + (108*x - 36*x^2)*Log[x^2] + (54*x - 18*x^2)*Lo
g[x^2]^2)/(-3 + x),x]

[Out]

(-9*x^2)/2 + (9*(1 + 2*E)*x^2)/2 + 9*x^2*Log[3 - x] - 9*x^2*Log[x^2]^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 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

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

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

Rule 2305

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*Lo
g[c*x^n])^p)/(d*(m + 1)), x] - Dist[(b*n*p)/(m + 1), Int[(d*x)^m*(a + b*Log[c*x^n])^(p - 1), x], x] /; FreeQ[{
a, b, c, d, m, n}, x] && NeQ[m, -1] && GtQ[p, 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 6688

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

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

________________________________________________________________________________________

Mathematica [A]  time = 0.06, size = 29, normalized size = 1.38 \begin {gather*} 9 \left (e x^2+x^2 \log (3-x)-x^2 \log ^2\left (x^2\right )\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.47, size = 30, normalized size = 1.43 \begin {gather*} -9 \, x^{2} \log \left (x^{2}\right )^{2} + 9 \, x^{2} e + 9 \, x^{2} \log \left (-x + 3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-9*x^2*log(x^2)^2 + 9*x^2*e + 9*x^2*log(-x + 3)

________________________________________________________________________________________

giac [A]  time = 0.20, size = 30, normalized size = 1.43 \begin {gather*} -9 \, x^{2} \log \left (x^{2}\right )^{2} + 9 \, x^{2} e + 9 \, x^{2} \log \left (-x + 3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-9*x^2*log(x^2)^2 + 9*x^2*e + 9*x^2*log(-x + 3)

________________________________________________________________________________________

maple [B]  time = 0.24, size = 55, normalized size = 2.62




method result size



default \(-9 x^{2} \ln \left (x^{2}\right )^{2}+9 \left (3-x \right )^{2} \ln \left (3-x \right )+\frac {243}{2}-54 \left (3-x \right ) \ln \left (3-x \right )+9 x^{2} {\mathrm e}+81 \ln \left (x -3\right )\) \(55\)
risch \(9 \ln \left (3-x \right ) x^{2}-36 x^{2} \ln \relax (x )^{2}+18 i \pi \,x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right ) \ln \relax (x )-36 i \pi \,x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{2} \ln \relax (x )+18 i \pi \,x^{2} \mathrm {csgn}\left (i x^{2}\right )^{3} \ln \relax (x )+\frac {9 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{4} \mathrm {csgn}\left (i x^{2}\right )^{2}}{4}-9 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{3} \mathrm {csgn}\left (i x^{2}\right )^{3}+\frac {27 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right )^{2} \mathrm {csgn}\left (i x^{2}\right )^{4}}{2}-9 \pi ^{2} x^{2} \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i x^{2}\right )^{5}+\frac {9 \pi ^{2} x^{2} \mathrm {csgn}\left (i x^{2}\right )^{6}}{4}+9 x^{2} {\mathrm e}\) \(204\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-9*x^2*ln(x^2)^2+9*(3-x)^2*ln(3-x)+243/2-54*(3-x)*ln(3-x)+9*x^2*exp(1)+81*ln(x-3)

________________________________________________________________________________________

maxima [B]  time = 0.40, size = 76, normalized size = 3.62 \begin {gather*} -36 \, x^{2} \log \relax (x)^{2} + 9 \, {\left (x^{2} + 6 \, x + 18 \, \log \left (x - 3\right )\right )} e - 54 \, {\left (x + 3 \, \log \left (x - 3\right )\right )} e + 9 \, {\left (x^{2} + 6 \, x + 18 \, \log \left (x - 3\right )\right )} \log \left (-x + 3\right ) - 54 \, {\left (x + 3 \, \log \left (x - 3\right )\right )} \log \left (-x + 3\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-36*x^2*log(x)^2 + 9*(x^2 + 6*x + 18*log(x - 3))*e - 54*(x + 3*log(x - 3))*e + 9*(x^2 + 6*x + 18*log(x - 3))*l
og(-x + 3) - 54*(x + 3*log(x - 3))*log(-x + 3)

________________________________________________________________________________________

mupad [B]  time = 3.84, size = 22, normalized size = 1.05 \begin {gather*} 9\,x^2\,\left (-{\ln \left (x^2\right )}^2+\mathrm {e}+\ln \left (3-x\right )\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((log(x^2)*(108*x - 36*x^2) - exp(1)*(54*x - 18*x^2) - log(3 - x)*(54*x - 18*x^2) + log(x^2)^2*(54*x - 18*x
^2) + 9*x^2)/(x - 3),x)

[Out]

9*x^2*(exp(1) + log(3 - x) - log(x^2)^2)

________________________________________________________________________________________

sympy [A]  time = 0.51, size = 37, normalized size = 1.76 \begin {gather*} - 9 x^{2} \log {\left (x^{2} \right )}^{2} + 9 e x^{2} + \left (9 x^{2} - 27\right ) \log {\left (3 - x \right )} + 27 \log {\left (x - 3 \right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((-18*x**2+54*x)*ln(x**2)**2+(-36*x**2+108*x)*ln(x**2)+(18*x**2-54*x)*ln(3-x)+(18*x**2-54*x)*exp(1)+
9*x**2)/(x-3),x)

[Out]

-9*x**2*log(x**2)**2 + 9*E*x**2 + (9*x**2 - 27)*log(3 - x) + 27*log(x - 3)

________________________________________________________________________________________