Optimal. Leaf size=10 \[ \log \left (a x+b x^n\right ) \]
[Out]
________________________________________________________________________________________
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]
[Out]
Rule 78
Rule 457
Rule 528
Rule 1607
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[Out]
________________________________________________________________________________________
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]
[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.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]
[Out]
________________________________________________________________________________________