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

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

Optimal result

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

-(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2*ln((-a*d+b*c)/b/(d*x+c))/d/g-2*B*n*(A+B 
*ln(e*((b*x+a)/(d*x+c))^n))*polylog(2,d*(b*x+a)/b/(d*x+c))/d/g+2*B^2*n^2*p 
olylog(3,d*(b*x+a)/b/(d*x+c))/d/g
 

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.46 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.93, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {2951, 2754, 2821, 7143}

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

\(\Big \downarrow \) 2951

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

\(\Big \downarrow \) 2754

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

\(\Big \downarrow \) 2821

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

\(\Big \downarrow \) 7143

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 2754
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symb 
ol] :> Simp[Log[1 + e*(x/d)]*((a + b*Log[c*x^n])^p/e), x] - Simp[b*n*(p/e) 
  Int[Log[1 + e*(x/d)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, 
b, c, d, e, n}, x] && IGtQ[p, 0]
 

rule 2821
Int[(Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))]*((a_.) + Log[(c_.)*(x_)^(n_.)]*(b 
_.))^(p_.))/(x_), x_Symbol] :> Simp[(-PolyLog[2, (-d)*f*x^m])*((a + b*Log[c 
*x^n])^p/m), x] + Simp[b*n*(p/m)   Int[PolyLog[2, (-d)*f*x^m]*((a + b*Log[c 
*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x] && IGtQ[p, 
0] && EqQ[d*e, 1]
 

rule 2951
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( 
B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(b*c - a*d)^(m + 
1)*(g/d)^m   Subst[Int[(A + B*Log[e*x^n])^p/(b - d*x)^(m + 2), x], x, (a + 
b*x)/(c + d*x)], x] /; FreeQ[{a, b, c, d, e, f, g, A, B, n}, x] && NeQ[b*c 
- a*d, 0] && IntegersQ[m, p] && EqQ[d*f - c*g, 0] && (GtQ[p, 0] || LtQ[m, - 
1])
 

rule 7143
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S 
ymbol] :> Simp[PolyLog[n + 1, c*(a + b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d 
, e, n, p}, x] && EqQ[b*d, a*e]
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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