3.7.11 \(\int \frac {a+b n x^{-1+n}}{a x+b x^n} \, dx\) [611]

Optimal. Leaf size=10 \[ \log \left (a x+b x^n\right ) \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 17, normalized size of antiderivative = 1.70, number of steps used = 5, number of rules used = 4, integrand size = 22, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {1607, 528, 457, 78} \begin {gather*} \log \left (a x^{1-n}+b\right )+n \log (x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

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 457

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.)*((c_) + (d_.)*(x_)^(n_))^(q_.), x_Symbol] :> Dist[1/n, Subst[Int
[x^(Simplify[(m + 1)/n] - 1)*(a + b*x)^p*(c + d*x)^q, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p, q}, x] &&
 NeQ[b*c - a*d, 0] && IntegerQ[Simplify[(m + 1)/n]]

Rule 528

Int[(x_)^(m_.)*((c_) + (d_.)*(x_)^(mn_.))^(q_.)*((a_) + (b_.)*(x_)^(n_.))^(p_.), x_Symbol] :> Int[x^(m - n*q)*
(a + b*x^n)^p*(d + c*x^n)^q, x] /; FreeQ[{a, b, c, d, m, n, p}, x] && EqQ[mn, -n] && IntegerQ[q] && (PosQ[n] |
|  !IntegerQ[p])

Rule 1607

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]

Rubi steps

\begin {align*} \int \frac {a+b n x^{-1+n}}{a x+b x^n} \, dx &=\int \frac {x^{-n} \left (a+b n x^{-1+n}\right )}{b+a x^{1-n}} \, dx\\ &=\int \frac {b n+a x^{1-n}}{x \left (b+a x^{1-n}\right )} \, dx\\ &=\frac {\text {Subst}\left (\int \frac {b n+a x}{x (b+a x)} \, dx,x,x^{1-n}\right )}{1-n}\\ &=\frac {\text {Subst}\left (\int \left (\frac {n}{x}+\frac {a-a n}{b+a x}\right ) \, dx,x,x^{1-n}\right )}{1-n}\\ &=n \log (x)+\log \left (b+a x^{1-n}\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 10, normalized size = 1.00 \begin {gather*} \log \left (a x+b x^n\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.32, size = 12, normalized size = 1.20

method result size
risch \(\ln \left (x^{n}+\frac {a x}{b}\right )\) \(12\)
norman \(\ln \left (a x +b \,{\mathrm e}^{n \ln \left (x \right )}\right )\) \(13\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*n*x^(-1+n))/(a*x+b*x^n),x,method=_RETURNVERBOSE)

[Out]

ln(x^n+a*x/b)

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 10, normalized size = 1.00 \begin {gather*} \log \left (a x + b x^{n}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.34, size = 10, normalized size = 1.00 \begin {gather*} \log \left (a x + b x^{n}\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 36 vs. \(2 (8) = 16\).
time = 1.67, size = 36, normalized size = 3.60 \begin {gather*} \begin {cases} \log {\left (x + \frac {b x^{n}}{a} \right )} & \text {for}\: a \neq 0 \\n \left (- \frac {n \log {\left (x^{- n} \right )}}{n^{2} - n} + \frac {\log {\left (x^{- n} \right )}}{n^{2} - n}\right ) & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((log(x + b*x**n/a), Ne(a, 0)), (n*(-n*log(x**(-n))/(n**2 - n) + log(x**(-n))/(n**2 - n)), True))

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 3.27, size = 10, normalized size = 1.00 \begin {gather*} \ln \left (b\,x^n+a\,x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________