Optimal. Leaf size=17 \[ n \log (x)+\log \left (b+a x^{1-n}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {528, 457, 78}
\begin {gather*} \log \left (a x^{1-n}+b\right )+n \log (x) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rule 457
Rule 528
Rubi steps
\begin {align*} \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.00, size = 10, normalized size = 0.59 \begin {gather*} \log \left (a x+b x^n\right ) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.33, size = 12, normalized size = 0.71
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]
[Out]
________________________________________________________________________________________
Maxima [B] Leaf count of result is larger than twice the leaf count of optimal. 86 vs.
\(2 (17) = 34\).
time = 0.29, size = 86, normalized size = 5.06 \begin {gather*} 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 )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.37, size = 10, normalized size = 0.59 \begin {gather*} \log \left (a x + b x^{n}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 31.22, size = 8, normalized size = 0.47 \begin {gather*} \log {\left (a x + b x^{n} \right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.37, size = 39, normalized size = 2.29 \begin {gather*} -\frac {\ln \left (b+a\,x^{1-n}\right )-2\,n\,\mathrm {atanh}\left (\frac {2\,a\,x^{1-n}}{b}+1\right )}{n-1} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________