\(\int \frac {-358+1765 x-2425 x^2+625 x^3+(385-125 x) \log (77-25 x)}{-308+1640 x-2425 x^2+625 x^3} \, dx\) [5905]

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

Optimal result

Integrand size = 45, antiderivative size = 27 \[ \int \frac {-358+1765 x-2425 x^2+625 x^3+(385-125 x) \log (77-25 x)}{-308+1640 x-2425 x^2+625 x^3} \, dx=4+x-\frac {x \log (2+25 (3-x))}{2 x-5 x^2} \]

[Out]

4-x*ln(-25*x+77)/(-5*x^2+2*x)+x

Rubi [A] (verified)

Time = 0.12 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.63, number of steps used = 14, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.156, Rules used = {6874, 46, 78, 90, 2442, 36, 31} \[ \int \frac {-358+1765 x-2425 x^2+625 x^3+(385-125 x) \log (77-25 x)}{-308+1640 x-2425 x^2+625 x^3} \, dx=x-\frac {\log (77-25 x)}{2-5 x} \]

[In]

Int[(-358 + 1765*x - 2425*x^2 + 625*x^3 + (385 - 125*x)*Log[77 - 25*x])/(-308 + 1640*x - 2425*x^2 + 625*x^3),x
]

[Out]

x - Log[77 - 25*x]/(2 - 5*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 46

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] && Lt
Q[m + n + 2, 0])

Rule 78

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 90

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 2442

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 6874

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

Rubi steps \begin{align*} \text {integral}& = \int \left (-\frac {358}{(-2+5 x)^2 (-77+25 x)}+\frac {1765 x}{(-2+5 x)^2 (-77+25 x)}-\frac {2425 x^2}{(-2+5 x)^2 (-77+25 x)}+\frac {625 x^3}{(-2+5 x)^2 (-77+25 x)}-\frac {5 \log (77-25 x)}{(-2+5 x)^2}\right ) \, dx \\ & = -\left (5 \int \frac {\log (77-25 x)}{(-2+5 x)^2} \, dx\right )-358 \int \frac {1}{(-2+5 x)^2 (-77+25 x)} \, dx+625 \int \frac {x^3}{(-2+5 x)^2 (-77+25 x)} \, dx+1765 \int \frac {x}{(-2+5 x)^2 (-77+25 x)} \, dx-2425 \int \frac {x^2}{(-2+5 x)^2 (-77+25 x)} \, dx \\ & = -\frac {\log (77-25 x)}{2-5 x}+25 \int \frac {1}{(77-25 x) (-2+5 x)} \, dx-358 \int \left (-\frac {1}{67 (-2+5 x)^2}-\frac {5}{4489 (-2+5 x)}+\frac {25}{4489 (-77+25 x)}\right ) \, dx+625 \int \left (\frac {1}{625}-\frac {8}{8375 (-2+5 x)^2}-\frac {844}{561125 (-2+5 x)}+\frac {456533}{2805625 (-77+25 x)}\right ) \, dx+1765 \int \left (-\frac {2}{335 (-2+5 x)^2}-\frac {77}{22445 (-2+5 x)}+\frac {77}{4489 (-77+25 x)}\right ) \, dx-2425 \int \left (-\frac {4}{1675 (-2+5 x)^2}-\frac {288}{112225 (-2+5 x)}+\frac {5929}{112225 (-77+25 x)}\right ) \, dx \\ & = x+\frac {5}{67} \log (77-25 x)-\frac {\log (77-25 x)}{2-5 x}-\frac {5}{67} \log (2-5 x)+\frac {25}{67} \int \frac {1}{-2+5 x} \, dx+\frac {125}{67} \int \frac {1}{77-25 x} \, dx \\ & = x-\frac {\log (77-25 x)}{2-5 x} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.08 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.63 \[ \int \frac {-358+1765 x-2425 x^2+625 x^3+(385-125 x) \log (77-25 x)}{-308+1640 x-2425 x^2+625 x^3} \, dx=x+\frac {10}{67} \text {arctanh}\left (\frac {1}{67} (-87+50 x)\right )+\left (\frac {5}{67}+\frac {1}{-2+5 x}\right ) \log (77-25 x)-\frac {5}{67} \log (2-5 x) \]

[In]

Integrate[(-358 + 1765*x - 2425*x^2 + 625*x^3 + (385 - 125*x)*Log[77 - 25*x])/(-308 + 1640*x - 2425*x^2 + 625*
x^3),x]

[Out]

x + (10*ArcTanh[(-87 + 50*x)/67])/67 + (5/67 + (-2 + 5*x)^(-1))*Log[77 - 25*x] - (5*Log[2 - 5*x])/67

Maple [A] (verified)

Time = 0.20 (sec) , antiderivative size = 17, normalized size of antiderivative = 0.63

method result size
risch \(\frac {\ln \left (-25 x +77\right )}{5 x -2}+x\) \(17\)
norman \(\frac {\ln \left (-25 x +77\right )+5 x^{2}-\frac {4}{5}}{5 x -2}\) \(22\)
parallelrisch \(\frac {-41000+15625 x^{2}+96250 x +3125 \ln \left (-25 x +77\right )}{15625 x -6250}\) \(28\)
derivativedivides \(x -\frac {77}{25}+\frac {5 \ln \left (-25 x +77\right )}{67}-\frac {5 \ln \left (-25 x +77\right ) \left (-25 x +77\right )}{67 \left (-25 x +10\right )}\) \(32\)
default \(x -\frac {77}{25}+\frac {5 \ln \left (-25 x +77\right )}{67}-\frac {5 \ln \left (-25 x +77\right ) \left (-25 x +77\right )}{67 \left (-25 x +10\right )}\) \(32\)
parts \(x +\frac {5 \ln \left (25 x -77\right )}{67}-\frac {5 \ln \left (5 x -2\right )}{67}+\frac {5 \ln \left (-25 x +10\right )}{67}-\frac {5 \ln \left (-25 x +77\right ) \left (-25 x +77\right )}{67 \left (-25 x +10\right )}\) \(47\)

[In]

int(((-125*x+385)*ln(-25*x+77)+625*x^3-2425*x^2+1765*x-358)/(625*x^3-2425*x^2+1640*x-308),x,method=_RETURNVERB
OSE)

[Out]

1/(5*x-2)*ln(-25*x+77)+x

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 23, normalized size of antiderivative = 0.85 \[ \int \frac {-358+1765 x-2425 x^2+625 x^3+(385-125 x) \log (77-25 x)}{-308+1640 x-2425 x^2+625 x^3} \, dx=\frac {5 \, x^{2} - 2 \, x + \log \left (-25 \, x + 77\right )}{5 \, x - 2} \]

[In]

integrate(((-125*x+385)*log(-25*x+77)+625*x^3-2425*x^2+1765*x-358)/(625*x^3-2425*x^2+1640*x-308),x, algorithm=
"fricas")

[Out]

(5*x^2 - 2*x + log(-25*x + 77))/(5*x - 2)

Sympy [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 12, normalized size of antiderivative = 0.44 \[ \int \frac {-358+1765 x-2425 x^2+625 x^3+(385-125 x) \log (77-25 x)}{-308+1640 x-2425 x^2+625 x^3} \, dx=x + \frac {\log {\left (77 - 25 x \right )}}{5 x - 2} \]

[In]

integrate(((-125*x+385)*ln(-25*x+77)+625*x**3-2425*x**2+1765*x-358)/(625*x**3-2425*x**2+1640*x-308),x)

[Out]

x + log(77 - 25*x)/(5*x - 2)

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 50 vs. \(2 (22) = 44\).

Time = 0.24 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.85 \[ \int \frac {-358+1765 x-2425 x^2+625 x^3+(385-125 x) \log (77-25 x)}{-308+1640 x-2425 x^2+625 x^3} \, dx=\frac {112225 \, x^{2} + 5 \, {\left (1790 \, x + 3773\right )} \log \left (-25 \, x + 77\right ) - 44890 \, x + 23986}{22445 \, {\left (5 \, x - 2\right )}} - \frac {358}{335 \, {\left (5 \, x - 2\right )}} - \frac {358}{4489} \, \log \left (25 \, x - 77\right ) \]

[In]

integrate(((-125*x+385)*log(-25*x+77)+625*x^3-2425*x^2+1765*x-358)/(625*x^3-2425*x^2+1640*x-308),x, algorithm=
"maxima")

[Out]

1/22445*(112225*x^2 + 5*(1790*x + 3773)*log(-25*x + 77) - 44890*x + 23986)/(5*x - 2) - 358/335/(5*x - 2) - 358
/4489*log(25*x - 77)

Giac [A] (verification not implemented)

none

Time = 0.28 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.59 \[ \int \frac {-358+1765 x-2425 x^2+625 x^3+(385-125 x) \log (77-25 x)}{-308+1640 x-2425 x^2+625 x^3} \, dx=x + \frac {\log \left (-25 \, x + 77\right )}{5 \, x - 2} \]

[In]

integrate(((-125*x+385)*log(-25*x+77)+625*x^3-2425*x^2+1765*x-358)/(625*x^3-2425*x^2+1640*x-308),x, algorithm=
"giac")

[Out]

x + log(-25*x + 77)/(5*x - 2)

Mupad [B] (verification not implemented)

Time = 12.63 (sec) , antiderivative size = 16, normalized size of antiderivative = 0.59 \[ \int \frac {-358+1765 x-2425 x^2+625 x^3+(385-125 x) \log (77-25 x)}{-308+1640 x-2425 x^2+625 x^3} \, dx=x+\frac {\ln \left (77-25\,x\right )}{5\,x-2} \]

[In]

int(-(log(77 - 25*x)*(125*x - 385) - 1765*x + 2425*x^2 - 625*x^3 + 358)/(1640*x - 2425*x^2 + 625*x^3 - 308),x)

[Out]

x + log(77 - 25*x)/(5*x - 2)