3.3.54 \(\int \frac {1}{a x+\frac {b x}{\log (c x^n)}} \, dx\) [254]

Optimal. Leaf size=27 \[ \frac {\log (x)}{a}-\frac {b \log \left (b+a \log \left (c x^n\right )\right )}{a^2 n} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 27, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 1, integrand size = 17, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.059, Rules used = {45} \begin {gather*} \frac {\log (x)}{a}-\frac {b \log \left (a \log \left (c x^n\right )+b\right )}{a^2 n} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 34, normalized size = 1.26 \begin {gather*} \frac {\log \left (c x^n\right )}{a n}-\frac {b \log \left (b+a \log \left (c x^n\right )\right )}{a^2 n} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [A]
time = 0.05, size = 33, normalized size = 1.22

method result size
norman \(\frac {\ln \left (x \right )}{a}-\frac {b \ln \left (a \ln \left (c \,{\mathrm e}^{n \ln \left (x \right )}\right )+b \right )}{a^{2} n}\) \(30\)
default \(\frac {\frac {\ln \left (c \,x^{n}\right )}{a}-\frac {b \ln \left (b +a \ln \left (c \,x^{n}\right )\right )}{a^{2}}}{n}\) \(33\)
risch \(\frac {\ln \left (x \right )}{a}-\frac {b \ln \left (\ln \left (x^{n}\right )-\frac {i \pi a \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )-i \pi a \,\mathrm {csgn}\left (i c \right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}-i \pi a \,\mathrm {csgn}\left (i x^{n}\right ) \mathrm {csgn}\left (i c \,x^{n}\right )^{2}+i \pi a \mathrm {csgn}\left (i c \,x^{n}\right )^{3}-2 \ln \left (c \right ) a -2 b}{2 a}\right )}{a^{2} n}\) \(119\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 0.27, size = 33, normalized size = 1.22 \begin {gather*} \frac {\log \left (x\right )}{a} - \frac {b \log \left (\frac {a \log \left (c\right ) + a \log \left (x^{n}\right ) + b}{a}\right )}{a^{2} n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]
time = 0.40, size = 28, normalized size = 1.04 \begin {gather*} \frac {a n \log \left (x\right ) - b \log \left (a n \log \left (x\right ) + a \log \left (c\right ) + b\right )}{a^{2} n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 116 vs. \(2 (22) = 44\).
time = 2.05, size = 116, normalized size = 4.30 \begin {gather*} \begin {cases} \frac {\log {\left (c \right )} \log {\left (x \right )}}{b} & \text {for}\: a = 0 \wedge n = 0 \\\frac {\begin {cases} 0 & \text {for}\: \frac {1}{\left |{c x^{n}}\right |} < 1 \wedge \left |{c x^{n}}\right | < 1 \\\frac {\log {\left (c x^{n} \right )}^{2}}{2 n} & \text {for}\: \left |{c x^{n}}\right | < 1 \\\frac {\log {\left (\frac {x^{- n}}{c} \right )}^{2}}{2 n} & \text {for}\: \frac {1}{\left |{c x^{n}}\right |} < 1 \\\frac {{G_{3, 3}^{3, 0}\left (\begin {matrix} & 1, 1, 1 \\0, 0, 0 & \end {matrix} \middle | {c x^{n}} \right )}}{n} + \frac {{G_{3, 3}^{0, 3}\left (\begin {matrix} 1, 1, 1 & \\ & 0, 0, 0 \end {matrix} \middle | {c x^{n}} \right )}}{n} & \text {otherwise} \end {cases}}{b} & \text {for}\: a = 0 \\\frac {\log {\left (c \right )} \log {\left (x \right )}}{a \log {\left (c \right )} + b} & \text {for}\: n = 0 \\\frac {\log {\left (c x^{n} \right )}}{a n} - \frac {b \log {\left (\log {\left (c x^{n} \right )} + \frac {b}{a} \right )}}{a^{2} n} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((log(c)*log(x)/b, Eq(a, 0) & Eq(n, 0)), (Piecewise((0, (Abs(c*x**n) < 1) & (1/Abs(c*x**n) < 1)), (lo
g(c*x**n)**2/(2*n), Abs(c*x**n) < 1), (log(1/(c*x**n))**2/(2*n), 1/Abs(c*x**n) < 1), (meijerg(((), (1, 1, 1)),
 ((0, 0, 0), ()), c*x**n)/n + meijerg(((1, 1, 1), ()), ((), (0, 0, 0)), c*x**n)/n, True))/b, Eq(a, 0)), (log(c
)*log(x)/(a*log(c) + b), Eq(n, 0)), (log(c*x**n)/(a*n) - b*log(log(c*x**n) + b/a)/(a**2*n), True))

________________________________________________________________________________________

Giac [A]
time = 4.03, size = 53, normalized size = 1.96 \begin {gather*} \frac {\log \left (x\right )}{a} - \frac {b \log \left (\frac {1}{4} \, {\left (\pi a n {\left (\mathrm {sgn}\left (x\right ) - 1\right )} + \pi a {\left (\mathrm {sgn}\left (c\right ) - 1\right )}\right )}^{2} + {\left (a n \log \left ({\left | x \right |}\right ) + a \log \left ({\left | c \right |}\right ) + b\right )}^{2}\right )}{2 \, a^{2} n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(x)/a - 1/2*b*log(1/4*(pi*a*n*(sgn(x) - 1) + pi*a*(sgn(c) - 1))^2 + (a*n*log(abs(x)) + a*log(abs(c)) + b)^2
)/(a^2*n)

________________________________________________________________________________________

Mupad [B]
time = 0.36, size = 27, normalized size = 1.00 \begin {gather*} \frac {\ln \left (x\right )}{a}-\frac {b\,\ln \left (b+a\,\ln \left (c\,x^n\right )\right )}{a^2\,n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________