3.95.76 \(\int \frac {x-7 x^2+x^3+(-7+x) \log (-\frac {12}{-7+x})}{-7 x^2+x^3} \, dx\)

Optimal. Leaf size=20 \[ x+\frac {x-\log \left (\frac {12}{7-x}\right )}{x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.19, antiderivative size = 17, normalized size of antiderivative = 0.85, number of steps used = 9, number of rules used = 7, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.206, Rules used = {1593, 6742, 893, 2395, 36, 31, 29} \begin {gather*} x-\frac {\log \left (\frac {12}{7-x}\right )}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(x - 7*x^2 + x^3 + (-7 + x)*Log[-12/(-7 + x)])/(-7*x^2 + x^3),x]

[Out]

x - Log[12/(7 - x)]/x

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], 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 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 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 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 {x-7 x^2+x^3+(-7+x) \log \left (-\frac {12}{-7+x}\right )}{(-7+x) x^2} \, dx\\ &=\int \left (\frac {1-7 x+x^2}{(-7+x) x}+\frac {\log \left (-\frac {12}{-7+x}\right )}{x^2}\right ) \, dx\\ &=\int \frac {1-7 x+x^2}{(-7+x) x} \, dx+\int \frac {\log \left (-\frac {12}{-7+x}\right )}{x^2} \, dx\\ &=-\frac {\log \left (\frac {12}{7-x}\right )}{x}+\int \left (1+\frac {1}{7 (-7+x)}-\frac {1}{7 x}\right ) \, dx-\int \frac {1}{(-7+x) x} \, dx\\ &=x-\frac {\log \left (\frac {12}{7-x}\right )}{x}+\frac {1}{7} \log (7-x)-\frac {\log (x)}{7}-\frac {1}{7} \int \frac {1}{-7+x} \, dx+\frac {1}{7} \int \frac {1}{x} \, dx\\ &=x-\frac {\log \left (\frac {12}{7-x}\right )}{x}\\ \end {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 15, normalized size = 0.75 \begin {gather*} x-\frac {\log \left (-\frac {12}{-7+x}\right )}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(x - 7*x^2 + x^3 + (-7 + x)*Log[-12/(-7 + x)])/(-7*x^2 + x^3),x]

[Out]

x - Log[-12/(-7 + x)]/x

________________________________________________________________________________________

fricas [A]  time = 0.73, size = 18, normalized size = 0.90 \begin {gather*} \frac {x^{2} - \log \left (-\frac {12}{x - 7}\right )}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x-7)*log(-12/(x-7))+x^3-7*x^2+x)/(x^3-7*x^2),x, algorithm="fricas")

[Out]

(x^2 - log(-12/(x - 7)))/x

________________________________________________________________________________________

giac [A]  time = 0.12, size = 34, normalized size = 1.70 \begin {gather*} x + \frac {\log \left (-\frac {12}{x - 7}\right )}{7 \, {\left (\frac {7}{x - 7} + 1\right )}} - \frac {1}{7} \, \log \left (-\frac {12}{x - 7}\right ) - 7 \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x-7)*log(-12/(x-7))+x^3-7*x^2+x)/(x^3-7*x^2),x, algorithm="giac")

[Out]

x + 1/7*log(-12/(x - 7))/(7/(x - 7) + 1) - 1/7*log(-12/(x - 7)) - 7

________________________________________________________________________________________

maple [A]  time = 0.56, size = 16, normalized size = 0.80




method result size



risch \(-\frac {\ln \left (-\frac {12}{x -7}\right )}{x}+x\) \(16\)
norman \(\frac {x^{2}-\ln \left (-\frac {12}{x -7}\right )}{x}\) \(19\)
derivativedivides \(\frac {12 \ln \left (-\frac {12}{x -7}\right )}{\left (x -7\right ) \left (-12-\frac {84}{x -7}\right )}+x -7\) \(30\)
default \(\frac {12 \ln \left (-\frac {12}{x -7}\right )}{\left (x -7\right ) \left (-12-\frac {84}{x -7}\right )}+x -7\) \(30\)



Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((x-7)*ln(-12/(x-7))+x^3-7*x^2+x)/(x^3-7*x^2),x,method=_RETURNVERBOSE)

[Out]

-1/x*ln(-12/(x-7))+x

________________________________________________________________________________________

maxima [A]  time = 0.47, size = 22, normalized size = 1.10 \begin {gather*} \frac {x^{2} - \log \relax (3) - 2 \, \log \relax (2) + \log \left (-x + 7\right )}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x-7)*log(-12/(x-7))+x^3-7*x^2+x)/(x^3-7*x^2),x, algorithm="maxima")

[Out]

(x^2 - log(3) - 2*log(2) + log(-x + 7))/x

________________________________________________________________________________________

mupad [B]  time = 5.54, size = 15, normalized size = 0.75 \begin {gather*} x-\frac {\ln \left (-\frac {12}{x-7}\right )}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(x + log(-12/(x - 7))*(x - 7) - 7*x^2 + x^3)/(7*x^2 - x^3),x)

[Out]

x - log(-12/(x - 7))/x

________________________________________________________________________________________

sympy [A]  time = 0.11, size = 10, normalized size = 0.50 \begin {gather*} x - \frac {\log {\left (- \frac {12}{x - 7} \right )}}{x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(((x-7)*ln(-12/(x-7))+x**3-7*x**2+x)/(x**3-7*x**2),x)

[Out]

x - log(-12/(x - 7))/x

________________________________________________________________________________________