\(\int \frac {-46-117 x-72 x^2-2 x^3+(-46-46 x-x^2) \log (x)}{529+46 x+x^2} \, dx\) [9185]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 39, antiderivative size = 17 \[ \int \frac {-46-117 x-72 x^2-2 x^3+\left (-46-46 x-x^2\right ) \log (x)}{529+46 x+x^2} \, dx=3-\frac {x (2+x) (x+\log (x))}{23+x} \]

[Out]

3-(x+ln(x))*x*(2+x)/(x+23)

Rubi [A] (verified)

Time = 0.09 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.82, number of steps used = 14, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {27, 6874, 45, 2404, 2332, 2351, 31} \[ \int \frac {-46-117 x-72 x^2-2 x^3+\left (-46-46 x-x^2\right ) \log (x)}{529+46 x+x^2} \, dx=-x^2+21 x+\frac {11109}{x+23}+\frac {21 x \log (x)}{x+23}-x \log (x) \]

[In]

Int[(-46 - 117*x - 72*x^2 - 2*x^3 + (-46 - 46*x - x^2)*Log[x])/(529 + 46*x + x^2),x]

[Out]

21*x - x^2 + 11109/(23 + x) - x*Log[x] + (21*x*Log[x])/(23 + 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 31

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

Rule 45

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 2332

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

Rule 2351

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

Rule 2404

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*x^
n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]

Rule 6874

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

Rubi steps \begin{align*} \text {integral}& = \int \frac {-46-117 x-72 x^2-2 x^3+\left (-46-46 x-x^2\right ) \log (x)}{(23+x)^2} \, dx \\ & = \int \left (-\frac {46}{(23+x)^2}-\frac {117 x}{(23+x)^2}-\frac {72 x^2}{(23+x)^2}-\frac {2 x^3}{(23+x)^2}-\frac {\left (46+46 x+x^2\right ) \log (x)}{(23+x)^2}\right ) \, dx \\ & = \frac {46}{23+x}-2 \int \frac {x^3}{(23+x)^2} \, dx-72 \int \frac {x^2}{(23+x)^2} \, dx-117 \int \frac {x}{(23+x)^2} \, dx-\int \frac {\left (46+46 x+x^2\right ) \log (x)}{(23+x)^2} \, dx \\ & = \frac {46}{23+x}-2 \int \left (-46+x-\frac {12167}{(23+x)^2}+\frac {1587}{23+x}\right ) \, dx-72 \int \left (1+\frac {529}{(23+x)^2}-\frac {46}{23+x}\right ) \, dx-117 \int \left (-\frac {23}{(23+x)^2}+\frac {1}{23+x}\right ) \, dx-\int \left (\log (x)-\frac {483 \log (x)}{(23+x)^2}\right ) \, dx \\ & = 20 x-x^2+\frac {11109}{23+x}+21 \log (23+x)+483 \int \frac {\log (x)}{(23+x)^2} \, dx-\int \log (x) \, dx \\ & = 21 x-x^2+\frac {11109}{23+x}-x \log (x)+\frac {21 x \log (x)}{23+x}+21 \log (23+x)-21 \int \frac {1}{23+x} \, dx \\ & = 21 x-x^2+\frac {11109}{23+x}-x \log (x)+\frac {21 x \log (x)}{23+x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.82 \[ \int \frac {-46-117 x-72 x^2-2 x^3+\left (-46-46 x-x^2\right ) \log (x)}{529+46 x+x^2} \, dx=21 x-x^2+\frac {483 (23-\log (x))}{23+x}+21 \log (x)-x \log (x) \]

[In]

Integrate[(-46 - 117*x - 72*x^2 - 2*x^3 + (-46 - 46*x - x^2)*Log[x])/(529 + 46*x + x^2),x]

[Out]

21*x - x^2 + (483*(23 - Log[x]))/(23 + x) + 21*Log[x] - x*Log[x]

Maple [A] (verified)

Time = 0.93 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.76

method result size
norman \(\frac {-2 x^{2}-x^{3}-2 x \ln \left (x \right )-x^{2} \ln \left (x \right )}{x +23}\) \(30\)
parallelrisch \(\frac {-2 x^{2}-x^{3}-2 x \ln \left (x \right )-x^{2} \ln \left (x \right )}{x +23}\) \(30\)
default \(-x^{2}+21 x +\frac {11109}{x +23}-x \ln \left (x \right )+\frac {21 \ln \left (x \right ) x}{x +23}\) \(32\)
parts \(-x^{2}+21 x +\frac {11109}{x +23}-x \ln \left (x \right )+\frac {21 \ln \left (x \right ) x}{x +23}\) \(32\)
risch \(-\frac {\left (x^{2}+23 x +483\right ) \ln \left (x \right )}{x +23}+\frac {-x^{3}+21 x \ln \left (x \right )-2 x^{2}+483 \ln \left (x \right )+483 x +11109}{x +23}\) \(49\)

[In]

int(((-x^2-46*x-46)*ln(x)-2*x^3-72*x^2-117*x-46)/(x^2+46*x+529),x,method=_RETURNVERBOSE)

[Out]

(-2*x^2-x^3-2*x*ln(x)-x^2*ln(x))/(x+23)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 30, normalized size of antiderivative = 1.76 \[ \int \frac {-46-117 x-72 x^2-2 x^3+\left (-46-46 x-x^2\right ) \log (x)}{529+46 x+x^2} \, dx=-\frac {x^{3} + 2 \, x^{2} + {\left (x^{2} + 2 \, x\right )} \log \left (x\right ) - 483 \, x - 11109}{x + 23} \]

[In]

integrate(((-x^2-46*x-46)*log(x)-2*x^3-72*x^2-117*x-46)/(x^2+46*x+529),x, algorithm="fricas")

[Out]

-(x^3 + 2*x^2 + (x^2 + 2*x)*log(x) - 483*x - 11109)/(x + 23)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 32 vs. \(2 (14) = 28\).

Time = 0.10 (sec) , antiderivative size = 32, normalized size of antiderivative = 1.88 \[ \int \frac {-46-117 x-72 x^2-2 x^3+\left (-46-46 x-x^2\right ) \log (x)}{529+46 x+x^2} \, dx=- x^{2} + 21 x + 21 \log {\left (x \right )} + \frac {\left (- x^{2} - 23 x - 483\right ) \log {\left (x \right )}}{x + 23} + \frac {11109}{x + 23} \]

[In]

integrate(((-x**2-46*x-46)*ln(x)-2*x**3-72*x**2-117*x-46)/(x**2+46*x+529),x)

[Out]

-x**2 + 21*x + 21*log(x) + (-x**2 - 23*x - 483)*log(x)/(x + 23) + 11109/(x + 23)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 54 vs. \(2 (17) = 34\).

Time = 0.23 (sec) , antiderivative size = 54, normalized size of antiderivative = 3.18 \[ \int \frac {-46-117 x-72 x^2-2 x^3+\left (-46-46 x-x^2\right ) \log (x)}{529+46 x+x^2} \, dx=-x^{2} + 20 \, x + \frac {x^{2} - {\left (x^{2} + 23 \, x + 529\right )} \log \left (x\right ) + 23 \, x}{x + 23} + \frac {46 \, \log \left (x\right )}{x + 23} + \frac {11109}{x + 23} + 21 \, \log \left (x\right ) \]

[In]

integrate(((-x^2-46*x-46)*log(x)-2*x^3-72*x^2-117*x-46)/(x^2+46*x+529),x, algorithm="maxima")

[Out]

-x^2 + 20*x + (x^2 - (x^2 + 23*x + 529)*log(x) + 23*x)/(x + 23) + 46*log(x)/(x + 23) + 11109/(x + 23) + 21*log
(x)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 33, normalized size of antiderivative = 1.94 \[ \int \frac {-46-117 x-72 x^2-2 x^3+\left (-46-46 x-x^2\right ) \log (x)}{529+46 x+x^2} \, dx=-x^{2} - {\left (x + \frac {483}{x + 23}\right )} \log \left (x\right ) + 21 \, x + \frac {11109}{x + 23} + 21 \, \log \left (x\right ) \]

[In]

integrate(((-x^2-46*x-46)*log(x)-2*x^3-72*x^2-117*x-46)/(x^2+46*x+529),x, algorithm="giac")

[Out]

-x^2 - (x + 483/(x + 23))*log(x) + 21*x + 11109/(x + 23) + 21*log(x)

Mupad [B] (verification not implemented)

Time = 14.64 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.88 \[ \int \frac {-46-117 x-72 x^2-2 x^3+\left (-46-46 x-x^2\right ) \log (x)}{529+46 x+x^2} \, dx=-\frac {x\,\left (x+\ln \left (x\right )\right )\,\left (x+2\right )}{x+23} \]

[In]

int(-(117*x + log(x)*(46*x + x^2 + 46) + 72*x^2 + 2*x^3 + 46)/(46*x + x^2 + 529),x)

[Out]

-(x*(x + log(x))*(x + 2))/(x + 23)