3.451 \(\int \frac{x^{-n} \left (a+b n x^{-1+n}\right )}{b+a x^{1-n}} \, dx\)

Optimal. Leaf size=17 \[ \log \left (a x^{1-n}+b\right )+n \log (x) \]

[Out]

n*Log[x] + Log[b + a*x^(1 - n)]

_______________________________________________________________________________________

Rubi [A]  time = 0.124116, antiderivative size = 17, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.103 \[ \log \left (a x^{1-n}+b\right )+n \log (x) \]

Antiderivative was successfully verified.

[In]  Int[(a + b*n*x^(-1 + n))/(x^n*(b + a*x^(1 - n))),x]

[Out]

n*Log[x] + Log[b + a*x^(1 - n)]

_______________________________________________________________________________________

Rubi in Sympy [A]  time = 8.12144, size = 20, normalized size = 1.18 \[ \frac{n \log{\left (x^{- n + 1} \right )}}{- n + 1} + \log{\left (a x^{- n + 1} + b \right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  rubi_integrate((a+b*n*x**(-1+n))/(x**n)/(b+a*x**(1-n)),x)

[Out]

n*log(x**(-n + 1))/(-n + 1) + log(a*x**(-n + 1) + b)

_______________________________________________________________________________________

Mathematica [A]  time = 0.0125254, size = 10, normalized size = 0.59 \[ \log \left (a x+b x^n\right ) \]

Antiderivative was successfully verified.

[In]  Integrate[(a + b*n*x^(-1 + n))/(x^n*(b + a*x^(1 - n))),x]

[Out]

Log[a*x + b*x^n]

_______________________________________________________________________________________

Maple [A]  time = 0.035, size = 13, normalized size = 0.8 \[ \ln \left ( ax+b{{\rm e}^{n\ln \left ( x \right ) }} \right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  int((a+b*n*x^(-1+n))/(x^n)/(b+a*x^(1-n)),x)

[Out]

ln(a*x+b*exp(n*ln(x)))

_______________________________________________________________________________________

Maxima [A]  time = 0.701296, size = 116, normalized size = 6.82 \[ b n{\left (\frac{\log \left (x\right )}{b} - \frac{n \log \left (x\right )}{b{\left (n - 1\right )}} + \frac{\log \left (\frac{a x + b x^{n}}{b}\right )}{b{\left (n - 1\right )}}\right )} + a{\left (\frac{n \log \left (x\right )}{a{\left (n - 1\right )}} - \frac{\log \left (\frac{a x + b x^{n}}{b}\right )}{a{\left (n - 1\right )}}\right )} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*n*x^(n - 1) + a)/((a*x^(-n + 1) + b)*x^n),x, algorithm="maxima")

[Out]

b*n*(log(x)/b - n*log(x)/(b*(n - 1)) + log((a*x + b*x^n)/b)/(b*(n - 1))) + a*(n*
log(x)/(a*(n - 1)) - log((a*x + b*x^n)/b)/(a*(n - 1)))

_______________________________________________________________________________________

Fricas [A]  time = 0.275187, size = 14, normalized size = 0.82 \[ \log \left (a x + b x^{n}\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*n*x^(n - 1) + a)/((a*x^(-n + 1) + b)*x^n),x, algorithm="fricas")

[Out]

log(a*x + b*x^n)

_______________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \[ \text{Timed out} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((a+b*n*x**(-1+n))/(x**n)/(b+a*x**(1-n)),x)

[Out]

Timed out

_______________________________________________________________________________________

GIAC/XCAS [F]  time = 0., size = 0, normalized size = 0. \[ \int \frac{b n x^{n - 1} + a}{{\left (a x^{-n + 1} + b\right )} x^{n}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]  integrate((b*n*x^(n - 1) + a)/((a*x^(-n + 1) + b)*x^n),x, algorithm="giac")

[Out]

integrate((b*n*x^(n - 1) + a)/((a*x^(-n + 1) + b)*x^n), x)