Optimal. Leaf size=43 \[ \frac {b \log (x)}{d}-\frac {(b c-a d) \log \left (d+c x^{1-n}\right )}{c d (1-n)} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 43, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {1607, 528, 457,
78} \begin {gather*} \frac {b \log (x)}{d}-\frac {(b c-a d) \log \left (c x^{1-n}+d\right )}{c d (1-n)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 78
Rule 457
Rule 528
Rule 1607
Rubi steps
\begin {align*} \int \frac {a+b x^{-1+n}}{c x+d x^n} \, dx &=\int \frac {x^{-n} \left (a+b x^{-1+n}\right )}{d+c x^{1-n}} \, dx\\ &=\int \frac {b+a x^{1-n}}{x \left (d+c x^{1-n}\right )} \, dx\\ &=\frac {\text {Subst}\left (\int \frac {b+a x}{x (d+c x)} \, dx,x,x^{1-n}\right )}{1-n}\\ &=\frac {\text {Subst}\left (\int \left (\frac {b}{d x}+\frac {-b c+a d}{d (d+c x)}\right ) \, dx,x,x^{1-n}\right )}{1-n}\\ &=\frac {b \log (x)}{d}-\frac {(b c-a d) \log \left (d+c x^{1-n}\right )}{c d (1-n)}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.12, size = 38, normalized size = 0.88 \begin {gather*} \frac {b \log (x)+\frac {(b c-a d) \log \left (d+c x^{1-n}\right )}{c (-1+n)}}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.55, size = 58, normalized size = 1.35
method | result | size |
norman | \(\frac {\left (a d n -b c \right ) \ln \left (x \right )}{c d \left (-1+n \right )}-\frac {\left (a d -b c \right ) \ln \left (c x +d \,{\mathrm e}^{n \ln \left (x \right )}\right )}{c d \left (-1+n \right )}\) | \(58\) |
risch | \(\frac {b \ln \left (x \right )}{d}+\frac {n \ln \left (x \right ) a}{c \left (-1+n \right )}-\frac {n \ln \left (x \right ) b}{d \left (-1+n \right )}-\frac {\ln \left (x^{n}+\frac {x c}{d}\right ) a}{c \left (-1+n \right )}+\frac {\ln \left (x^{n}+\frac {x c}{d}\right ) b}{d \left (-1+n \right )}\) | \(79\) |
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. 85 vs.
\(2 (40) = 80\).
time = 0.29, size = 85, normalized size = 1.98 \begin {gather*} b {\left (\frac {\log \left (x\right )}{d} - \frac {n \log \left (x\right )}{d {\left (n - 1\right )}} + \frac {\log \left (\frac {c x + d x^{n}}{d}\right )}{d {\left (n - 1\right )}}\right )} + a {\left (\frac {n \log \left (x\right )}{c {\left (n - 1\right )}} - \frac {\log \left (\frac {c x + d x^{n}}{d}\right )}{c {\left (n - 1\right )}}\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.35, size = 44, normalized size = 1.02 \begin {gather*} \frac {{\left (b c - a d\right )} \log \left (c x + d x^{n}\right ) + {\left (a d n - b c\right )} \log \left (x\right )}{c d n - c d} \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. 216 vs.
\(2 (29) = 58\).
time = 1.95, size = 216, normalized size = 5.02 \begin {gather*} \begin {cases} \tilde {\infty } \left (a + b\right ) \log {\left (x \right )} & \text {for}\: c = 0 \wedge d = 0 \wedge n = 1 \\\frac {- \frac {a n x}{n^{2} x^{n} - n x^{n}} - \frac {b n x^{n} \log {\left (x^{- n} \right )}}{n^{2} x^{n} - n x^{n}} - \frac {b n x^{n}}{n^{2} x^{n} - n x^{n}} + \frac {b x^{n} \log {\left (x^{- n} \right )}}{n^{2} x^{n} - n x^{n}}}{d} & \text {for}\: c = 0 \\\frac {\frac {a n x \log {\left (x \right )}}{n x - x} - \frac {a x \log {\left (x \right )}}{n x - x} + \frac {b x^{n}}{n x - x}}{c} & \text {for}\: d = 0 \\\frac {\left (a + b\right ) \log {\left (x \right )}}{c + d} & \text {for}\: n = 1 \\\frac {a d n \log {\left (x \right )}}{c d n - c d} - \frac {a d \log {\left (x + \frac {d x^{n}}{c} \right )}}{c d n - c d} - \frac {b c \log {\left (x \right )}}{c d n - c d} + \frac {b c \log {\left (x + \frac {d x^{n}}{c} \right )}}{c d n - c d} & \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 [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {a+b\,x^{n-1}}{d\,x^n+c\,x} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________