\(\int \frac {(a+b \log (x))^{-n}}{x} \, dx\) [621]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [F(-2)]
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 14, antiderivative size = 23 \[ \int \frac {(a+b \log (x))^{-n}}{x} \, dx=\frac {(a+b \log (x))^{1-n}}{b (1-n)} \]

[Out]

(a+b*ln(x))^(1-n)/b/(1-n)

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2339, 30} \[ \int \frac {(a+b \log (x))^{-n}}{x} \, dx=\frac {(a+b \log (x))^{1-n}}{b (1-n)} \]

[In]

Int[1/(x*(a + b*Log[x])^n),x]

[Out]

(a + b*Log[x])^(1 - n)/(b*(1 - n))

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rule 2339

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Dist[1/(b*n), Subst[Int[x^p, x], x, a + b*L
og[c*x^n]], x] /; FreeQ[{a, b, c, n, p}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int x^{-n} \, dx,x,a+b \log (x)\right )}{b} \\ & = \frac {(a+b \log (x))^{1-n}}{b (1-n)} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.01 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.00 \[ \int \frac {(a+b \log (x))^{-n}}{x} \, dx=\frac {(a+b \log (x))^{1-n}}{b (1-n)} \]

[In]

Integrate[1/(x*(a + b*Log[x])^n),x]

[Out]

(a + b*Log[x])^(1 - n)/(b*(1 - n))

Maple [A] (verified)

Time = 0.10 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.04

method result size
derivativedivides \(\frac {\left (a +b \ln \left (x \right )\right )^{1-n}}{b \left (1-n \right )}\) \(24\)
default \(\frac {\left (a +b \ln \left (x \right )\right )^{1-n}}{b \left (1-n \right )}\) \(24\)
risch \(-\frac {\left (a +b \ln \left (x \right )\right ) \left (a +b \ln \left (x \right )\right )^{-n}}{b \left (-1+n \right )}\) \(27\)
parallelrisch \(\frac {\left (-\ln \left (x \right ) b n -a n \right ) \left (a +b \ln \left (x \right )\right )^{-n}}{n b \left (-1+n \right )}\) \(34\)
norman \(\left (-\frac {\ln \left (x \right )}{-1+n}-\frac {a}{b \left (-1+n \right )}\right ) {\mathrm e}^{-n \ln \left (a +b \ln \left (x \right )\right )}\) \(35\)

[In]

int(1/x/((a+b*ln(x))^n),x,method=_RETURNVERBOSE)

[Out]

(a+b*ln(x))^(1-n)/b/(1-n)

Fricas [A] (verification not implemented)

none

Time = 0.24 (sec) , antiderivative size = 27, normalized size of antiderivative = 1.17 \[ \int \frac {(a+b \log (x))^{-n}}{x} \, dx=-\frac {b \log \left (x\right ) + a}{{\left (b n - b\right )} {\left (b \log \left (x\right ) + a\right )}^{n}} \]

[In]

integrate(1/x/((a+b*log(x))^n),x, algorithm="fricas")

[Out]

-(b*log(x) + a)/((b*n - b)*(b*log(x) + a)^n)

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 71 vs. \(2 (14) = 28\).

Time = 5.32 (sec) , antiderivative size = 71, normalized size of antiderivative = 3.09 \[ \int \frac {(a+b \log (x))^{-n}}{x} \, dx=\begin {cases} \frac {\log {\left (x \right )}}{a} & \text {for}\: b = 0 \wedge n = 1 \\a^{- n} \log {\left (x \right )} & \text {for}\: b = 0 \\\frac {\log {\left (\frac {a}{b} + \log {\left (x \right )} \right )}}{b} & \text {for}\: n = 1 \\- \frac {a}{b n \left (a + b \log {\left (x \right )}\right )^{n} - b \left (a + b \log {\left (x \right )}\right )^{n}} - \frac {b \log {\left (x \right )}}{b n \left (a + b \log {\left (x \right )}\right )^{n} - b \left (a + b \log {\left (x \right )}\right )^{n}} & \text {otherwise} \end {cases} \]

[In]

integrate(1/x/((a+b*ln(x))**n),x)

[Out]

Piecewise((log(x)/a, Eq(b, 0) & Eq(n, 1)), (log(x)/a**n, Eq(b, 0)), (log(a/b + log(x))/b, Eq(n, 1)), (-a/(b*n*
(a + b*log(x))**n - b*(a + b*log(x))**n) - b*log(x)/(b*n*(a + b*log(x))**n - b*(a + b*log(x))**n), True))

Maxima [F(-2)]

Exception generated. \[ \int \frac {(a+b \log (x))^{-n}}{x} \, dx=\text {Exception raised: ValueError} \]

[In]

integrate(1/x/((a+b*log(x))^n),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(-n>0)', see `assume?` for more
 details)Is

Giac [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.96 \[ \int \frac {(a+b \log (x))^{-n}}{x} \, dx=-\frac {{\left (b \log \left (x\right ) + a\right )}^{-n + 1}}{b {\left (n - 1\right )}} \]

[In]

integrate(1/x/((a+b*log(x))^n),x, algorithm="giac")

[Out]

-(b*log(x) + a)^(-n + 1)/(b*(n - 1))

Mupad [B] (verification not implemented)

Time = 0.49 (sec) , antiderivative size = 22, normalized size of antiderivative = 0.96 \[ \int \frac {(a+b \log (x))^{-n}}{x} \, dx=-\frac {{\left (a+b\,\ln \left (x\right )\right )}^{1-n}}{b\,\left (n-1\right )} \]

[In]

int(1/(x*(a + b*log(x))^n),x)

[Out]

-(a + b*log(x))^(1 - n)/(b*(n - 1))