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.0668804, antiderivative size = 43, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.19, 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 1593
Rule 514
Rule 446
Rule 72
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.0408059, 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]
________________________________________________________________________________________
Maple [A] time = 0.015, size = 73, normalized size = 1.7 \begin{align*}{\frac{\ln \left ( x \right ) an}{c \left ( -1+n \right ) }}-{\frac{\ln \left ( x \right ) b}{d \left ( -1+n \right ) }}-{\frac{\ln \left ( cx+d{{\rm e}^{n\ln \left ( x \right ) }} \right ) a}{c \left ( -1+n \right ) }}+{\frac{\ln \left ( cx+d{{\rm e}^{n\ln \left ( x \right ) }} \right ) b}{d \left ( -1+n \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] time = 1.01548, size = 115, normalized size = 2.67 \begin{align*} 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{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.74653, size = 93, normalized size = 2.16 \begin{align*} \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{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 9.88533, size = 212, normalized size = 4.93 \begin{align*} \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^{2} x^{n} \log{\left (x \right )}}{n^{2} x^{n} - n x^{n}} - \frac{b n x^{n} \log{\left (x \right )}}{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{\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{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{b x^{n - 1} + a}{c x + d x^{n}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]