Integrand size = 35, antiderivative size = 138 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{a g+b 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 (1-\frac {b (c+d x)}{d (a+b x)}\right )}{b 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 {b (c+d x)}{d (a+b x)}\right )}{b g}+\frac {2 B^2 n^2 \operatorname {PolyLog}\left (3,\frac {b (c+d x)}{d (a+b x)}\right )}{b g} \] Output:
-(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2*ln(1-b*(d*x+c)/d/(b*x+a))/b/g+2*B*n*(A+ B*ln(e*((b*x+a)/(d*x+c))^n))*polylog(2,b*(d*x+c)/d/(b*x+a))/b/g+2*B^2*n^2* polylog(3,b*(d*x+c)/d/(b*x+a))/b/g
Leaf count is larger than twice the leaf count of optimal. \(537\) vs. \(2(138)=276\).
Time = 0.88 (sec) , antiderivative size = 537, normalized size of antiderivative = 3.89 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{a g+b g x} \, dx=\frac {3 \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 {a+b x}{c+d x}\right )\right )^2+3 B n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )-B n \log \left (\frac {a+b x}{c+d x}\right )\right ) \left (\log ^2\left (\frac {a}{b}+x\right )-2 \log (a+b x) \left (\log \left (\frac {a}{b}+x\right )-\log \left (\frac {c}{d}+x\right )-\log \left (\frac {a+b x}{c+d x}\right )\right )-2 \left (\log \left (\frac {c}{d}+x\right ) \log \left (\frac {d (a+b x)}{-b c+a d}\right )+\operatorname {PolyLog}\left (2,\frac {b (c+d x)}{b c-a d}\right )\right )\right )+B^2 n^2 \left (\log ^3\left (\frac {a}{b}+x\right )+3 \log ^2\left (\frac {c}{d}+x\right ) \log \left (\frac {d (a+b x)}{-b c+a d}\right )+3 \log (a+b x) \left (-\log \left (\frac {a}{b}+x\right )+\log \left (\frac {c}{d}+x\right )+\log \left (\frac {a+b x}{c+d x}\right )\right )^2+3 \log ^2\left (\frac {a}{b}+x\right ) \left (-\log \left (\frac {c}{d}+x\right )+\log \left (\frac {b (c+d x)}{b c-a d}\right )\right )+6 \log \left (\frac {a}{b}+x\right ) \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{-b c+a d}\right )+6 \log \left (\frac {c}{d}+x\right ) \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{b c-a d}\right )-3 \left (\log \left (\frac {a}{b}+x\right )-\log \left (\frac {c}{d}+x\right )-\log \left (\frac {a+b x}{c+d x}\right )\right ) \left (\log ^2\left (\frac {a}{b}+x\right )-2 \left (\log \left (\frac {c}{d}+x\right ) \log \left (\frac {d (a+b x)}{-b c+a d}\right )+\operatorname {PolyLog}\left (2,\frac {b (c+d x)}{b c-a d}\right )\right )\right )-6 \operatorname {PolyLog}\left (3,\frac {d (a+b x)}{-b c+a d}\right )-6 \operatorname {PolyLog}\left (3,\frac {b (c+d x)}{b c-a d}\right )\right )}{3 b g} \] Input:
Integrate[(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2/(a*g + b*g*x),x]
Output:
(3*Log[a + b*x]*(A + B*Log[e*((a + b*x)/(c + d*x))^n] - B*n*Log[(a + b*x)/ (c + d*x)])^2 + 3*B*n*(A + B*Log[e*((a + b*x)/(c + d*x))^n] - B*n*Log[(a + b*x)/(c + d*x)])*(Log[a/b + x]^2 - 2*Log[a + b*x]*(Log[a/b + x] - Log[c/d + x] - Log[(a + b*x)/(c + d*x)]) - 2*(Log[c/d + x]*Log[(d*(a + b*x))/(-(b *c) + a*d)] + PolyLog[2, (b*(c + d*x))/(b*c - a*d)])) + B^2*n^2*(Log[a/b + x]^3 + 3*Log[c/d + x]^2*Log[(d*(a + b*x))/(-(b*c) + a*d)] + 3*Log[a + b*x ]*(-Log[a/b + x] + Log[c/d + x] + Log[(a + b*x)/(c + d*x)])^2 + 3*Log[a/b + x]^2*(-Log[c/d + x] + Log[(b*(c + d*x))/(b*c - a*d)]) + 6*Log[a/b + x]*P olyLog[2, (d*(a + b*x))/(-(b*c) + a*d)] + 6*Log[c/d + x]*PolyLog[2, (b*(c + d*x))/(b*c - a*d)] - 3*(Log[a/b + x] - Log[c/d + x] - Log[(a + b*x)/(c + d*x)])*(Log[a/b + x]^2 - 2*(Log[c/d + x]*Log[(d*(a + b*x))/(-(b*c) + a*d) ] + PolyLog[2, (b*(c + d*x))/(b*c - a*d)])) - 6*PolyLog[3, (d*(a + b*x))/( -(b*c) + a*d)] - 6*PolyLog[3, (b*(c + d*x))/(b*c - a*d)]))/(3*b*g)
Time = 0.50 (sec) , antiderivative size = 127, normalized size of antiderivative = 0.92, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.114, Rules used = {2949, 2779, 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}{a g+b g x} \, dx\) |
\(\Big \downarrow \) 2949 |
\(\displaystyle \frac {\int \frac {(c+d x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(a+b x) \left (b-\frac {d (a+b x)}{c+d x}\right )}d\frac {a+b x}{c+d x}}{g}\) |
\(\Big \downarrow \) 2779 |
\(\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 {b (c+d x)}{d (a+b x)}\right )}{a+b x}d\frac {a+b x}{c+d x}}{b}-\frac {\log \left (1-\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{b}}{g}\) |
\(\Big \downarrow \) 2821 |
\(\displaystyle \frac {\frac {2 B n \left (\operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )-B n \int \frac {(c+d x) \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right )}{a+b x}d\frac {a+b x}{c+d x}\right )}{b}-\frac {\log \left (1-\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{b}}{g}\) |
\(\Big \downarrow \) 7143 |
\(\displaystyle \frac {\frac {2 B n \left (\operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )+B n \operatorname {PolyLog}\left (3,\frac {b (c+d x)}{d (a+b x)}\right )\right )}{b}-\frac {\log \left (1-\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{b}}{g}\) |
Input:
Int[(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2/(a*g + b*g*x),x]
Output:
(-(((A + B*Log[e*((a + b*x)/(c + d*x))^n])^2*Log[1 - (b*(c + d*x))/(d*(a + b*x))])/b) + (2*B*n*((A + B*Log[e*((a + b*x)/(c + d*x))^n])*PolyLog[2, (b *(c + d*x))/(d*(a + b*x))] + B*n*PolyLog[3, (b*(c + d*x))/(d*(a + b*x))])) /b)/g
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^(r _.))), x_Symbol] :> Simp[(-Log[1 + d/(e*x^r)])*((a + b*Log[c*x^n])^p/(d*r)) , x] + Simp[b*n*(p/(d*r)) Int[Log[1 + d/(e*x^r)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[p, 0]
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]
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/b)^m Subst[Int[x^m*((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] && Ne Q[b*c - a*d, 0] && IntegersQ[m, p] && EqQ[b*f - a*g, 0] && (GtQ[p, 0] || Lt Q[m, -1])
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]
\[\int \frac {{\left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )}^{2}}{b g x +a g}d x\]
Input:
int((A+B*ln(e*((b*x+a)/(d*x+c))^n))^2/(b*g*x+a*g),x)
Output:
int((A+B*ln(e*((b*x+a)/(d*x+c))^n))^2/(b*g*x+a*g),x)
\[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{a g+b g x} \, dx=\int { \frac {{\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}}{b g x + a g} \,d x } \] Input:
integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(b*g*x+a*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)/(b*g*x + a*g), x)
\[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{a g+b g x} \, dx=\frac {\int \frac {A^{2}}{a + b 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}}{a + b 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 )}}{a + b x}\, dx}{g} \] Input:
integrate((A+B*ln(e*((b*x+a)/(d*x+c))**n))**2/(b*g*x+a*g),x)
Output:
(Integral(A**2/(a + b*x), x) + Integral(B**2*log(e*(a/(c + d*x) + b*x/(c + d*x))**n)**2/(a + b*x), x) + Integral(2*A*B*log(e*(a/(c + d*x) + b*x/(c + d*x))**n)/(a + b*x), x))/g
\[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{a g+b g x} \, dx=\int { \frac {{\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}}{b g x + a g} \,d x } \] Input:
integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(b*g*x+a*g),x, algorithm="max ima")
Output:
B^2*log(b*x + a)*log((d*x + c)^n)^2/(b*g) + A^2*log(b*g*x + a*g)/(b*g) - i ntegrate(-(B^2*b*c*log(e)^2 + 2*A*B*b*c*log(e) + (B^2*b*d*x + B^2*b*c)*log ((b*x + a)^n)^2 + (B^2*b*d*log(e)^2 + 2*A*B*b*d*log(e))*x + 2*(B^2*b*c*log (e) + A*B*b*c + (B^2*b*d*log(e) + A*B*b*d)*x)*log((b*x + a)^n) - 2*(B^2*b* c*log(e) + A*B*b*c + (B^2*b*d*log(e) + A*B*b*d)*x + (B^2*b*d*n*x + B^2*a*d *n)*log(b*x + a) + (B^2*b*d*x + B^2*b*c)*log((b*x + a)^n))*log((d*x + c)^n ))/(b^2*d*g*x^2 + a*b*c*g + (b^2*c*g + a*b*d*g)*x), x)
\[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{a g+b g x} \, dx=\int { \frac {{\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}}{b g x + a g} \,d x } \] Input:
integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(b*g*x+a*g),x, algorithm="gia c")
Output:
integrate((B*log(e*((b*x + a)/(d*x + c))^n) + A)^2/(b*g*x + a*g), x)
Timed out. \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{a g+b g x} \, dx=\int \frac {{\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}^2}{a\,g+b\,g\,x} \,d x \] Input:
int((A + B*log(e*((a + b*x)/(c + d*x))^n))^2/(a*g + b*g*x),x)
Output:
int((A + B*log(e*((a + b*x)/(c + d*x))^n))^2/(a*g + b*g*x), x)
\[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{a g+b 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}}{b x +a}d x \right ) b^{3}+2 \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 ) a \,b^{2}+\mathrm {log}\left (b x +a \right ) a^{2}}{b g} \] Input:
int((A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(b*g*x+a*g),x)
Output:
(int(log(((a + b*x)**n*e)/(c + d*x)**n)**2/(a + b*x),x)*b**3 + 2*int(log(( (a + b*x)**n*e)/(c + d*x)**n)/(a + b*x),x)*a*b**2 + log(a + b*x)*a**2)/(b* g)