\(\int \frac {A+B \log (e (\frac {a+b x}{c+d x})^n)}{f+\frac {g}{x}} \, dx\) [4]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [F]
Fricas [F]
Sympy [F(-1)]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 32, antiderivative size = 217 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{f+\frac {g}{x}} \, dx=\frac {A x}{f}+\frac {B (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b f}-\frac {B (b c-a d) n \log (c+d x)}{b d f}+\frac {B g n \log \left (\frac {f (a+b x)}{a f-b g}\right ) \log (g+f x)}{f^2}-\frac {g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (g+f x)}{f^2}-\frac {B g n \log \left (\frac {f (c+d x)}{c f-d g}\right ) \log (g+f x)}{f^2}+\frac {B g n \operatorname {PolyLog}\left (2,-\frac {b (g+f x)}{a f-b g}\right )}{f^2}-\frac {B g n \operatorname {PolyLog}\left (2,-\frac {d (g+f x)}{c f-d g}\right )}{f^2} \] Output:

A*x/f+B*(b*x+a)*ln(e*((b*x+a)/(d*x+c))^n)/b/f-B*(-a*d+b*c)*n*ln(d*x+c)/b/d 
/f+B*g*n*ln(f*(b*x+a)/(a*f-b*g))*ln(f*x+g)/f^2-g*(A+B*ln(e*((b*x+a)/(d*x+c 
))^n))*ln(f*x+g)/f^2-B*g*n*ln(f*(d*x+c)/(c*f-d*g))*ln(f*x+g)/f^2+B*g*n*pol 
ylog(2,-b*(f*x+g)/(a*f-b*g))/f^2-B*g*n*polylog(2,-d*(f*x+g)/(c*f-d*g))/f^2
 

Mathematica [A] (verified)

Time = 0.17 (sec) , antiderivative size = 185, normalized size of antiderivative = 0.85 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{f+\frac {g}{x}} \, dx=\frac {A f x+\frac {B f (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b}-\frac {B (b c-a d) f n \log (c+d x)}{b d}-g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (g+f x)+B g n \left (\left (\log \left (\frac {f (a+b x)}{a f-b g}\right )-\log \left (\frac {f (c+d x)}{c f-d g}\right )\right ) \log (g+f x)+\operatorname {PolyLog}\left (2,\frac {b (g+f x)}{-a f+b g}\right )-\operatorname {PolyLog}\left (2,\frac {d (g+f x)}{-c f+d g}\right )\right )}{f^2} \] Input:

Integrate[(A + B*Log[e*((a + b*x)/(c + d*x))^n])/(f + g/x),x]
 

Output:

(A*f*x + (B*f*(a + b*x)*Log[e*((a + b*x)/(c + d*x))^n])/b - (B*(b*c - a*d) 
*f*n*Log[c + d*x])/(b*d) - g*(A + B*Log[e*((a + b*x)/(c + d*x))^n])*Log[g 
+ f*x] + B*g*n*((Log[(f*(a + b*x))/(a*f - b*g)] - Log[(f*(c + d*x))/(c*f - 
 d*g)])*Log[g + f*x] + PolyLog[2, (b*(g + f*x))/(-(a*f) + b*g)] - PolyLog[ 
2, (d*(g + f*x))/(-(c*f) + d*g)]))/f^2
 

Rubi [A] (verified)

Time = 0.49 (sec) , antiderivative size = 217, 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.062, Rules used = {3008, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \frac {B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A}{f+\frac {g}{x}} \, dx\)

\(\Big \downarrow \) 3008

\(\displaystyle \int \left (\frac {B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A}{f}-\frac {g \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{f (f x+g)}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle -\frac {g \log (f x+g) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{f^2}+\frac {B (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b f}-\frac {B n (b c-a d) \log (c+d x)}{b d f}+\frac {B g n \operatorname {PolyLog}\left (2,-\frac {b (g+f x)}{a f-b g}\right )}{f^2}+\frac {B g n \log (f x+g) \log \left (\frac {f (a+b x)}{a f-b g}\right )}{f^2}+\frac {A x}{f}-\frac {B g n \operatorname {PolyLog}\left (2,-\frac {d (g+f x)}{c f-d g}\right )}{f^2}-\frac {B g n \log (f x+g) \log \left (\frac {f (c+d x)}{c f-d g}\right )}{f^2}\)

Input:

Int[(A + B*Log[e*((a + b*x)/(c + d*x))^n])/(f + g/x),x]
 

Output:

(A*x)/f + (B*(a + b*x)*Log[e*((a + b*x)/(c + d*x))^n])/(b*f) - (B*(b*c - a 
*d)*n*Log[c + d*x])/(b*d*f) + (B*g*n*Log[(f*(a + b*x))/(a*f - b*g)]*Log[g 
+ f*x])/f^2 - (g*(A + B*Log[e*((a + b*x)/(c + d*x))^n])*Log[g + f*x])/f^2 
- (B*g*n*Log[(f*(c + d*x))/(c*f - d*g)]*Log[g + f*x])/f^2 + (B*g*n*PolyLog 
[2, -((b*(g + f*x))/(a*f - b*g))])/f^2 - (B*g*n*PolyLog[2, -((d*(g + f*x)) 
/(c*f - d*g))])/f^2
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 3008
Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.)*(RGx_), x_Symbol] :> With 
[{u = ExpandIntegrand[(a + b*Log[c*RFx^p])^n, RGx, x]}, Int[u, x] /; SumQ[u 
]] /; FreeQ[{a, b, c, p}, x] && RationalFunctionQ[RFx, x] && RationalFuncti 
onQ[RGx, x] && IGtQ[n, 0]
 
Maple [F]

\[\int \frac {A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )}{f +\frac {g}{x}}d x\]

Input:

int((A+B*ln(e*((b*x+a)/(d*x+c))^n))/(f+g/x),x)
 

Output:

int((A+B*ln(e*((b*x+a)/(d*x+c))^n))/(f+g/x),x)
 

Fricas [F]

\[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{f+\frac {g}{x}} \, dx=\int { \frac {B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A}{f + \frac {g}{x}} \,d x } \] Input:

integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))/(f+g/x),x, algorithm="fricas")
 

Output:

integral((B*x*log(e*((b*x + a)/(d*x + c))^n) + A*x)/(f*x + g), x)
 

Sympy [F(-1)]

Timed out. \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{f+\frac {g}{x}} \, dx=\text {Timed out} \] Input:

integrate((A+B*ln(e*((b*x+a)/(d*x+c))**n))/(f+g/x),x)
 

Output:

Timed out
 

Maxima [F]

\[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{f+\frac {g}{x}} \, dx=\int { \frac {B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A}{f + \frac {g}{x}} \,d x } \] Input:

integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))/(f+g/x),x, algorithm="maxima")
 

Output:

A*(x/f - g*log(f*x + g)/f^2) - B*integrate(-(x*log((b*x + a)^n) - x*log((d 
*x + c)^n) + x*log(e))/(f*x + g), x)
 

Giac [F]

\[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{f+\frac {g}{x}} \, dx=\int { \frac {B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A}{f + \frac {g}{x}} \,d x } \] Input:

integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))/(f+g/x),x, algorithm="giac")
 

Output:

integrate((B*log(e*((b*x + a)/(d*x + c))^n) + A)/(f + g/x), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{f+\frac {g}{x}} \, dx=\int \frac {A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )}{f+\frac {g}{x}} \,d x \] Input:

int((A + B*log(e*((a + b*x)/(c + d*x))^n))/(f + g/x),x)
 

Output:

int((A + B*log(e*((a + b*x)/(c + d*x))^n))/(f + g/x), x)
 

Reduce [F]

\[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{f+\frac {g}{x}} \, dx=\frac {\left (\int \frac {\mathrm {log}\left (\frac {\left (b x +a \right )^{n} e}{\left (d x +c \right )^{n}}\right ) x}{f x +g}d x \right ) b \,f^{2}-\mathrm {log}\left (f x +g \right ) a g +a f x}{f^{2}} \] Input:

int((A+B*log(e*((b*x+a)/(d*x+c))^n))/(f+g/x),x)
 

Output:

(int((log(((a + b*x)**n*e)/(c + d*x)**n)*x)/(f*x + g),x)*b*f**2 - log(f*x 
+ g)*a*g + a*f*x)/f**2