Optimal. Leaf size=43 \[ \frac {b \log (x)}{d}-\frac {(b c-a d) \log \left (c x^{1-n}+d\right )}{c d (1-n)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.07, 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 = {1593, 514, 446, 72} \[ \frac {b \log (x)}{d}-\frac {(b c-a d) \log \left (c x^{1-n}+d\right )}{c d (1-n)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 72
Rule 446
Rule 514
Rule 1593
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 {\operatorname {Subst}\left (\int \frac {b+a x}{x (d+c x)} \, dx,x,x^{1-n}\right )}{1-n}\\ &=\frac {\operatorname {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.04, size = 38, normalized size = 0.88 \[ \frac {\frac {(b c-a d) \log \left (c x^{1-n}+d\right )}{c (n-1)}+b \log (x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.42, size = 44, normalized size = 1.02 \[ \frac {{\left (b c - a d\right )} \log \left (c x + d x^{n}\right ) + {\left (a d n - b c\right )} \log \relax (x)}{c d n - c d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {b x^{n - 1} + a}{c x + d x^{n}}\,{d x} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.02, size = 73, normalized size = 1.70 \[ \frac {a n \ln \relax (x )}{\left (n -1\right ) c}-\frac {a \ln \left (c x +d \,{\mathrm e}^{n \ln \relax (x )}\right )}{\left (n -1\right ) c}-\frac {b \ln \relax (x )}{\left (n -1\right ) d}+\frac {b \ln \left (c x +d \,{\mathrm e}^{n \ln \relax (x )}\right )}{\left (n -1\right ) d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.45, size = 85, normalized size = 1.98 \[ b {\left (\frac {\log \relax (x)}{d} - \frac {n \log \relax (x)}{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 \relax (x)}{c {\left (n - 1\right )}} - \frac {\log \left (\frac {c x + d x^{n}}{d}\right )}{c {\left (n - 1\right )}}\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.02 \[ \int \frac {a+b\,x^{n-1}}{d\,x^n+c\,x} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 10.18, size = 212, normalized size = 4.93 \[ \begin {cases} \tilde {\infty } \left (a + b\right ) \log {\relax (x )} & \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^{2} x^{n} \log {\relax (x )}}{n^{2} x^{n} - n x^{n}} - \frac {b n x^{n} \log {\relax (x )}}{n^{2} x^{n} - n x^{n}} - \frac {b n x^{n}}{n^{2} x^{n} - n x^{n}}}{d} & \text {for}\: c = 0 \\\frac {\frac {a n x \log {\relax (x )}}{n x - x} - \frac {a x \log {\relax (x )}}{n x - x} + \frac {b x^{n}}{n x - x}}{c} & \text {for}\: d = 0 \\\frac {\left (a + b\right ) \log {\relax (x )}}{c + d} & \text {for}\: n = 1 \\\frac {a d n \log {\relax (x )}}{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 {\relax (x )}}{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} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________