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

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

Optimal result

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.55 (sec) , antiderivative size = 85, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {2943, 2858, 27, 25, 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 {B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A}{c i+d i x} \, dx\)

\(\Big \downarrow \) 2943

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

\(\Big \downarrow \) 2858

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 2778

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

\(\Big \downarrow \) 2005

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

\(\Big \downarrow \) 2752

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

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 2943
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( 
B_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(-Log[(b*c - a*d)/(b*(c + d*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)/(b*(c + d*x))]/((a + b*x)*(c + d*x)), x], x] /; F 
reeQ[{a, b, c, d, e, f, g, A, B, n}, x] && NeQ[b*c - a*d, 0] && EqQ[d*f - c 
*g, 0]
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))/(d*i*x+c*i),x, algorithm="frica 
s")
 

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 566 vs. \(2 (84) = 168\).

Time = 53.92 (sec) , antiderivative size = 566, normalized size of antiderivative = 6.66 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{c i+d i x} \, dx=\frac {1}{2} \, {\left (\frac {{\left (B b^{3} c^{3} n - 3 \, B a b^{2} c^{2} d n + 3 \, B a^{2} b c d^{2} n - B a^{3} d^{3} n\right )} \log \left (\frac {b x + a}{d x + c}\right )}{b^{2} d i - \frac {2 \, {\left (b x + a\right )} b d^{2} i}{d x + c} + \frac {{\left (b x + a\right )}^{2} d^{3} i}{{\left (d x + c\right )}^{2}}} - \frac {B b^{4} c^{3} n - 3 \, B a b^{3} c^{2} d n - \frac {{\left (b x + a\right )} B b^{3} c^{3} d n}{d x + c} + 3 \, B a^{2} b^{2} c d^{2} n + \frac {3 \, {\left (b x + a\right )} B a b^{2} c^{2} d^{2} n}{d x + c} - B a^{3} b d^{3} n - \frac {3 \, {\left (b x + a\right )} B a^{2} b c d^{3} n}{d x + c} + \frac {{\left (b x + a\right )} B a^{3} d^{4} n}{d x + c} - B b^{4} c^{3} \log \left (e\right ) + 3 \, B a b^{3} c^{2} d \log \left (e\right ) - 3 \, B a^{2} b^{2} c d^{2} \log \left (e\right ) + B a^{3} b d^{3} \log \left (e\right ) - A b^{4} c^{3} + 3 \, A a b^{3} c^{2} d - 3 \, A a^{2} b^{2} c d^{2} + A a^{3} b d^{3}}{b^{3} d i - \frac {2 \, {\left (b x + a\right )} b^{2} d^{2} i}{d x + c} + \frac {{\left (b x + a\right )}^{2} b d^{3} i}{{\left (d x + c\right )}^{2}}} + \frac {{\left (B b^{3} c^{3} n - 3 \, B a b^{2} c^{2} d n + 3 \, B a^{2} b c d^{2} n - B a^{3} d^{3} n\right )} \log \left (-b + \frac {{\left (b x + a\right )} d}{d x + c}\right )}{b^{2} d i} - \frac {{\left (B b^{3} c^{3} n - 3 \, B a b^{2} c^{2} d n + 3 \, B a^{2} b c d^{2} n - B a^{3} d^{3} n\right )} \log \left (\frac {b x + a}{d x + c}\right )}{b^{2} d i}\right )} {\left (\frac {b c}{{\left (b c - a d\right )}^{2}} - \frac {a d}{{\left (b c - a d\right )}^{2}}\right )}^{2} \] Input:

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{c i+d i 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 )}{d x +c}d x \right ) b d +\mathrm {log}\left (d x +c \right ) a \right )}{d} \] Input:

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

Output:

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