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

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

Optimal result

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

i*(d*x+c)*(A+B*ln(e*((b*x+a)/(d*x+c))^n))/b/g-(-a*d+b*c)*i*ln(-(-a*d+b*c)/ 
d/(b*x+a))*(A-B*n+B*ln(e*((b*x+a)/(d*x+c))^n))/b^2/g+B*(-a*d+b*c)*i*n*poly 
log(2,1+(-a*d+b*c)/d/(b*x+a))/b^2/g
 

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.71 (sec) , antiderivative size = 134, normalized size of antiderivative = 0.95, number of steps used = 9, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.195, Rules used = {2959, 27, 2941, 2858, 27, 2778, 2005, 2752}

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 {(c i+d i x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{a g+b g x} \, dx\)

\(\Big \downarrow \) 2959

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 2941

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

\(\Big \downarrow \) 2858

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 2778

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

\(\Big \downarrow \) 2005

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

\(\Big \downarrow \) 2752

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 2005
Int[(Fx_)*(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[x^(m 
+ n*p)*(b + a/x^n)^p*Fx, x] /; FreeQ[{a, b, m, n}, x] && IntegerQ[p] && Neg 
Q[n]
 

rule 2752
Int[Log[(c_.)*(x_)]/((d_) + (e_.)*(x_)), x_Symbol] :> Simp[(-e^(-1))*PolyLo 
g[2, 1 - c*x], x] /; FreeQ[{c, d, e}, x] && EqQ[e + c*d, 0]
 

rule 2778
Int[((a_.) + Log[(c_.)*(x_)^(n_)]*(b_.))/((x_)*((d_) + (e_.)*(x_)^(r_.))), 
x_Symbol] :> Simp[1/n   Subst[Int[(a + b*Log[c*x])/(x*(d + e*x^(r/n))), x], 
 x, x^n], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IntegerQ[r/n]
 

rule 2858
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_ 
.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))^(r_.), x_Symbol] :> Simp[1/e   Subst[In 
t[(g*(x/e))^q*((e*h - d*i)/e + i*(x/e))^r*(a + b*Log[c*x^n])^p, x], x, d + 
e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - 
d*g, 0] && (IGtQ[p, 0] || IGtQ[r, 0]) && IntegerQ[2*r]
 

rule 2941
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( 
B_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(-Log[-(b*c - a*d)/(d*(a + b* 
x))])*((A + B*Log[e*((a + b*x)/(c + d*x))^n])/g), x] + Simp[B*n*((b*c - a*d 
)/g)   Int[Log[-(b*c - a*d)/(d*(a + b*x))]/((a + b*x)*(c + d*x)), x], x] /; 
 FreeQ[{a, b, c, d, e, f, g, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[b*f - 
 a*g, 0]
 

rule 2959
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( 
B_.))*((f_.) + (g_.)*(x_))^(m_.)*((h_.) + (i_.)*(x_)), x_Symbol] :> Simp[(f 
 + g*x)^(m + 1)*(h + i*x)*((A + B*Log[e*((a + b*x)/(c + d*x))^n])/(g*(m + 2 
))), x] + Simp[i*((b*c - a*d)/(b*d*(m + 2)))   Int[(f + g*x)^m*(A - B*n + B 
*Log[e*((a + b*x)/(c + d*x))^n]), x], x] /; FreeQ[{a, b, c, d, e, f, g, h, 
i, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && EqQ[b*f - a*g, 0] && EqQ[d*h - c 
*i, 0] && IGtQ[m, -2]
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

i*(Integral(A*c/(a + b*x), x) + Integral(A*d*x/(a + b*x), x) + Integral(B* 
c*log(e*(a/(c + d*x) + b*x/(c + d*x))**n)/(a + b*x), x) + Integral(B*d*x*l 
og(e*(a/(c + d*x) + b*x/(c + d*x))**n)/(a + b*x), x))/g
 

Maxima [A] (verification not implemented)

Time = 0.35 (sec) , antiderivative size = 276, normalized size of antiderivative = 1.96 \[ \int \frac {(c i+d i x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{a g+b g x} \, dx=A d i {\left (\frac {x}{b g} - \frac {a \log \left (b x + a\right )}{b^{2} g}\right )} - \frac {B c i n \log \left (d x + c\right )}{b g} + \frac {A c i \log \left (b g x + a g\right )}{b g} + \frac {{\left (b c i n - a d i n\right )} {\left (\log \left (b x + a\right ) \log \left (\frac {b d x + a d}{b c - a d} + 1\right ) + {\rm Li}_2\left (-\frac {b d x + a d}{b c - a d}\right )\right )} B}{b^{2} g} + \frac {2 \, B b d i x \log \left (e\right ) - {\left (b c i n - a d i n\right )} B \log \left (b x + a\right )^{2} + 2 \, {\left (b c i \log \left (e\right ) + {\left (i n - i \log \left (e\right )\right )} a d\right )} B \log \left (b x + a\right ) + 2 \, {\left (B b d i x + {\left (b c i - a d i\right )} B \log \left (b x + a\right )\right )} \log \left ({\left (b x + a\right )}^{n}\right ) - 2 \, {\left (B b d i x + {\left (b c i - a d i\right )} B \log \left (b x + a\right )\right )} \log \left ({\left (d x + c\right )}^{n}\right )}{2 \, b^{2} g} \] Input:

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

Output:

A*d*i*(x/(b*g) - a*log(b*x + a)/(b^2*g)) - B*c*i*n*log(d*x + c)/(b*g) + A* 
c*i*log(b*g*x + a*g)/(b*g) + (b*c*i*n - a*d*i*n)*(log(b*x + a)*log((b*d*x 
+ a*d)/(b*c - a*d) + 1) + dilog(-(b*d*x + a*d)/(b*c - a*d)))*B/(b^2*g) + 1 
/2*(2*B*b*d*i*x*log(e) - (b*c*i*n - a*d*i*n)*B*log(b*x + a)^2 + 2*(b*c*i*l 
og(e) + (i*n - i*log(e))*a*d)*B*log(b*x + a) + 2*(B*b*d*i*x + (b*c*i - a*d 
*i)*B*log(b*x + a))*log((b*x + a)^n) - 2*(B*b*d*i*x + (b*c*i - a*d*i)*B*lo 
g(b*x + a))*log((d*x + c)^n))/(b^2*g)
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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