Integrand size = 32, antiderivative size = 206 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(f+g x)^2} \, dx=\frac {(a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(b f-a g) (f+g x)}+\frac {2 B (b c-a d) n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log \left (1-\frac {(d f-c g) (a+b x)}{(b f-a g) (c+d x)}\right )}{(b f-a g) (d f-c g)}+\frac {2 B^2 (b c-a d) n^2 \operatorname {PolyLog}\left (2,\frac {(d f-c g) (a+b x)}{(b f-a g) (c+d x)}\right )}{(b f-a g) (d f-c g)} \] Output:
(b*x+a)*(A+B*ln(e*((b*x+a)/(d*x+c))^n))^2/(-a*g+b*f)/(g*x+f)+2*B*(-a*d+b*c )*n*(A+B*ln(e*((b*x+a)/(d*x+c))^n))*ln(1-(-c*g+d*f)*(b*x+a)/(-a*g+b*f)/(d* x+c))/(-a*g+b*f)/(-c*g+d*f)+2*B^2*(-a*d+b*c)*n^2*polylog(2,(-c*g+d*f)*(b*x +a)/(-a*g+b*f)/(d*x+c))/(-a*g+b*f)/(-c*g+d*f)
Leaf count is larger than twice the leaf count of optimal. \(418\) vs. \(2(206)=412\).
Time = 0.48 (sec) , antiderivative size = 418, normalized size of antiderivative = 2.03 \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(f+g x)^2} \, dx=\frac {-\frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{f+g x}+\frac {B n \left (2 b (d f-c g) \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )-2 d (b f-a g) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)+2 (b c-a d) g \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (f+g x)-b B (d f-c g) n \left (\log (a+b x) \left (\log (a+b x)-2 \log \left (\frac {b (c+d x)}{b c-a d}\right )\right )-2 \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{-b c+a d}\right )\right )+B d (b f-a g) n \left (\left (2 \log \left (\frac {d (a+b x)}{-b c+a d}\right )-\log (c+d x)\right ) \log (c+d x)+2 \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{b c-a d}\right )\right )-2 B (b c-a d) g n \left (\left (\log \left (\frac {g (a+b x)}{-b f+a g}\right )-\log \left (\frac {g (c+d x)}{-d f+c g}\right )\right ) \log (f+g x)+\operatorname {PolyLog}\left (2,\frac {b (f+g x)}{b f-a g}\right )-\operatorname {PolyLog}\left (2,\frac {d (f+g x)}{d f-c g}\right )\right )\right )}{(b f-a g) (d f-c g)}}{g} \] Input:
Integrate[(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2/(f + g*x)^2,x]
Output:
(-((A + B*Log[e*((a + b*x)/(c + d*x))^n])^2/(f + g*x)) + (B*n*(2*b*(d*f - c*g)*Log[a + b*x]*(A + B*Log[e*((a + b*x)/(c + d*x))^n]) - 2*d*(b*f - a*g) *(A + B*Log[e*((a + b*x)/(c + d*x))^n])*Log[c + d*x] + 2*(b*c - a*d)*g*(A + B*Log[e*((a + b*x)/(c + d*x))^n])*Log[f + g*x] - b*B*(d*f - c*g)*n*(Log[ a + b*x]*(Log[a + b*x] - 2*Log[(b*(c + d*x))/(b*c - a*d)]) - 2*PolyLog[2, (d*(a + b*x))/(-(b*c) + a*d)]) + B*d*(b*f - a*g)*n*((2*Log[(d*(a + b*x))/( -(b*c) + a*d)] - Log[c + d*x])*Log[c + d*x] + 2*PolyLog[2, (b*(c + d*x))/( b*c - a*d)]) - 2*B*(b*c - a*d)*g*n*((Log[(g*(a + b*x))/(-(b*f) + a*g)] - L og[(g*(c + d*x))/(-(d*f) + c*g)])*Log[f + g*x] + PolyLog[2, (b*(f + g*x))/ (b*f - a*g)] - PolyLog[2, (d*(f + g*x))/(d*f - c*g)])))/((b*f - a*g)*(d*f - c*g)))/g
Time = 0.51 (sec) , antiderivative size = 220, normalized size of antiderivative = 1.07, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {2953, 2755, 2754, 2838}
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}{(f+g x)^2} \, dx\) |
\(\Big \downarrow \) 2953 |
\(\displaystyle (b c-a d) \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{\left (b f-a g-\frac {(d f-c g) (a+b x)}{c+d x}\right )^2}d\frac {a+b x}{c+d x}\) |
\(\Big \downarrow \) 2755 |
\(\displaystyle (b c-a d) \left (\frac {(a+b x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{(c+d x) (b f-a g) \left (-\frac {(a+b x) (d f-c g)}{c+d x}-a g+b f\right )}-\frac {2 B n \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{b f-a g-\frac {(d f-c g) (a+b x)}{c+d x}}d\frac {a+b x}{c+d x}}{b f-a g}\right )\) |
\(\Big \downarrow \) 2754 |
\(\displaystyle (b c-a d) \left (\frac {(a+b x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{(c+d x) (b f-a g) \left (-\frac {(a+b x) (d f-c g)}{c+d x}-a g+b f\right )}-\frac {2 B n \left (\frac {B n \int \frac {(c+d x) \log \left (1-\frac {(d f-c g) (a+b x)}{(b f-a g) (c+d x)}\right )}{a+b x}d\frac {a+b x}{c+d x}}{d f-c g}-\frac {\log \left (1-\frac {(a+b x) (d f-c g)}{(c+d x) (b f-a g)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{d f-c g}\right )}{b f-a g}\right )\) |
\(\Big \downarrow \) 2838 |
\(\displaystyle (b c-a d) \left (\frac {(a+b x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2}{(c+d x) (b f-a g) \left (-\frac {(a+b x) (d f-c g)}{c+d x}-a g+b f\right )}-\frac {2 B n \left (-\frac {\log \left (1-\frac {(a+b x) (d f-c g)}{(c+d x) (b f-a g)}\right ) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{d f-c g}-\frac {B n \operatorname {PolyLog}\left (2,\frac {(d f-c g) (a+b x)}{(b f-a g) (c+d x)}\right )}{d f-c g}\right )}{b f-a g}\right )\) |
Input:
Int[(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2/(f + g*x)^2,x]
Output:
(b*c - a*d)*(((a + b*x)*(A + B*Log[e*((a + b*x)/(c + d*x))^n])^2)/((b*f - a*g)*(c + d*x)*(b*f - a*g - ((d*f - c*g)*(a + b*x))/(c + d*x))) - (2*B*n*( -(((A + B*Log[e*((a + b*x)/(c + d*x))^n])*Log[1 - ((d*f - c*g)*(a + b*x))/ ((b*f - a*g)*(c + d*x))])/(d*f - c*g)) - (B*n*PolyLog[2, ((d*f - c*g)*(a + b*x))/((b*f - a*g)*(c + d*x))])/(d*f - c*g)))/(b*f - a*g))
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]
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_))^2, x_Sy mbol] :> Simp[x*((a + b*Log[c*x^n])^p/(d*(d + e*x))), x] - Simp[b*n*(p/d) Int[(a + b*Log[c*x^n])^(p - 1)/(d + e*x), x], x] /; FreeQ[{a, b, c, d, e, n, p}, x] && GtQ[p, 0]
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 , (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 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) Sub st[Int[(b*f - a*g - (d*f - c*g)*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] && NeQ[b*c - a*d, 0] && IntegerQ[m] && IGtQ[p, 0]
\[\int \frac {{\left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )}^{2}}{\left (g x +f \right )^{2}}d x\]
Input:
int((A+B*ln(e*((b*x+a)/(d*x+c))^n))^2/(g*x+f)^2,x)
Output:
int((A+B*ln(e*((b*x+a)/(d*x+c))^n))^2/(g*x+f)^2,x)
\[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(f+g x)^2} \, dx=\int { \frac {{\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}}{{\left (g x + f\right )}^{2}} \,d x } \] Input:
integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(g*x+f)^2,x, algorithm="frica s")
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)/(g^2*x^2 + 2*f*g*x + f^2), x)
\[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(f+g x)^2} \, dx=\int \frac {\left (A + B \log {\left (e \left (\frac {a}{c + d x} + \frac {b x}{c + d x}\right )^{n} \right )}\right )^{2}}{\left (f + g x\right )^{2}}\, dx \] Input:
integrate((A+B*ln(e*((b*x+a)/(d*x+c))**n))**2/(g*x+f)**2,x)
Output:
Integral((A + B*log(e*(a/(c + d*x) + b*x/(c + d*x))**n))**2/(f + g*x)**2, x)
\[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(f+g x)^2} \, dx=\int { \frac {{\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}}{{\left (g x + f\right )}^{2}} \,d x } \] Input:
integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(g*x+f)^2,x, algorithm="maxim a")
Output:
2*A*B*n*(b*log(b*x + a)/(b*f*g - a*g^2) - d*log(d*x + c)/(d*f*g - c*g^2) + (b*c - a*d)*log(g*x + f)/(b*d*f^2 + a*c*g^2 - (b*c + a*d)*f*g)) - B^2*(lo g((d*x + c)^n)^2/(g^2*x + f*g) + integrate(-(d*g*x*log(e)^2 + c*g*log(e)^2 + (d*g*x + c*g)*log((b*x + a)^n)^2 + 2*(d*g*x*log(e) + c*g*log(e))*log((b *x + a)^n) + 2*(d*f*n + (g*n - g*log(e))*d*x - c*g*log(e) - (d*g*x + c*g)* log((b*x + a)^n))*log((d*x + c)^n))/(d*g^3*x^3 + c*f^2*g + (2*d*f*g^2 + c* g^3)*x^2 + (d*f^2*g + 2*c*f*g^2)*x), x)) - 2*A*B*log(e*(b*x/(d*x + c) + a/ (d*x + c))^n)/(g^2*x + f*g) - A^2/(g^2*x + f*g)
\[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(f+g x)^2} \, dx=\int { \frac {{\left (B \log \left (e \left (\frac {b x + a}{d x + c}\right )^{n}\right ) + A\right )}^{2}}{{\left (g x + f\right )}^{2}} \,d x } \] Input:
integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(g*x+f)^2,x, algorithm="giac" )
Output:
integrate((B*log(e*((b*x + a)/(d*x + c))^n) + A)^2/(g*x + f)^2, x)
Timed out. \[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(f+g x)^2} \, dx=\int \frac {{\left (A+B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )\right )}^2}{{\left (f+g\,x\right )}^2} \,d x \] Input:
int((A + B*log(e*((a + b*x)/(c + d*x))^n))^2/(f + g*x)^2,x)
Output:
int((A + B*log(e*((a + b*x)/(c + d*x))^n))^2/(f + g*x)^2, x)
\[ \int \frac {\left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{(f+g x)^2} \, dx=\text {too large to display} \] Input:
int((A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(g*x+f)^2,x)
Output:
( - 2*int((log(((a + b*x)**n*e)/(c + d*x)**n)*x)/(a**2*c**2*f**2*g**2 + 2* a**2*c**2*f*g**3*x + a**2*c**2*g**4*x**2 + a**2*c*d*f**2*g**2*x + 2*a**2*c *d*f*g**3*x**2 + a**2*c*d*g**4*x**3 + a*b*c**2*f**2*g**2*x + 2*a*b*c**2*f* g**3*x**2 + a*b*c**2*g**4*x**3 - a*b*c*d*f**4 - 2*a*b*c*d*f**3*g*x + 2*a*b *c*d*f*g**3*x**3 + a*b*c*d*g**4*x**4 - a*b*d**2*f**4*x - 2*a*b*d**2*f**3*g *x**2 - a*b*d**2*f**2*g**2*x**3 - b**2*c*d*f**4*x - 2*b**2*c*d*f**3*g*x**2 - b**2*c*d*f**2*g**2*x**3 - b**2*d**2*f**4*x**2 - 2*b**2*d**2*f**3*g*x**3 - b**2*d**2*f**2*g**2*x**4),x)*a**4*b**2*c**3*d*f**2*g**6*n - 2*int((log( ((a + b*x)**n*e)/(c + d*x)**n)*x)/(a**2*c**2*f**2*g**2 + 2*a**2*c**2*f*g** 3*x + a**2*c**2*g**4*x**2 + a**2*c*d*f**2*g**2*x + 2*a**2*c*d*f*g**3*x**2 + a**2*c*d*g**4*x**3 + a*b*c**2*f**2*g**2*x + 2*a*b*c**2*f*g**3*x**2 + a*b *c**2*g**4*x**3 - a*b*c*d*f**4 - 2*a*b*c*d*f**3*g*x + 2*a*b*c*d*f*g**3*x** 3 + a*b*c*d*g**4*x**4 - a*b*d**2*f**4*x - 2*a*b*d**2*f**3*g*x**2 - a*b*d** 2*f**2*g**2*x**3 - b**2*c*d*f**4*x - 2*b**2*c*d*f**3*g*x**2 - b**2*c*d*f** 2*g**2*x**3 - b**2*d**2*f**4*x**2 - 2*b**2*d**2*f**3*g*x**3 - b**2*d**2*f* *2*g**2*x**4),x)*a**4*b**2*c**3*d*f*g**7*n*x + 4*int((log(((a + b*x)**n*e) /(c + d*x)**n)*x)/(a**2*c**2*f**2*g**2 + 2*a**2*c**2*f*g**3*x + a**2*c**2* g**4*x**2 + a**2*c*d*f**2*g**2*x + 2*a**2*c*d*f*g**3*x**2 + a**2*c*d*g**4* x**3 + a*b*c**2*f**2*g**2*x + 2*a*b*c**2*f*g**3*x**2 + a*b*c**2*g**4*x**3 - a*b*c*d*f**4 - 2*a*b*c*d*f**3*g*x + 2*a*b*c*d*f*g**3*x**3 + a*b*c*d*g...