Integrand size = 34, antiderivative size = 132 \[ \int \frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{a g+b g x} \, dx=-\frac {\log \left (-\frac {b c-a d}{d (a+b x)}\right ) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{b g}-\frac {4 B \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right ) \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right )}{b g}+\frac {8 B^2 \operatorname {PolyLog}\left (3,\frac {b (c+d x)}{d (a+b x)}\right )}{b g} \] Output:
-ln(-(-a*d+b*c)/d/(b*x+a))*(A+B*ln(e*(d*x+c)^2/(b*x+a)^2))^2/b/g-4*B*(A+B* ln(e*(d*x+c)^2/(b*x+a)^2))*polylog(2,b*(d*x+c)/d/(b*x+a))/b/g+8*B^2*polylo g(3,b*(d*x+c)/d/(b*x+a))/b/g
Leaf count is larger than twice the leaf count of optimal. \(624\) vs. \(2(132)=264\).
Time = 1.69 (sec) , antiderivative size = 624, normalized size of antiderivative = 4.73 \[ \int \frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{a g+b g x} \, dx=\frac {A^2 \log (a+b x)}{b g}+\frac {2 A B \left (-\frac {\log ^2\left (\frac {a}{b}+x\right )}{b}+\frac {\log (a+b x) \left (2 \log \left (\frac {a}{b}+x\right )-2 \log \left (\frac {c}{d}+x\right )+\log \left (\frac {c^2 e}{(a+b x)^2}+\frac {2 c d e x}{(a+b x)^2}+\frac {d^2 e x^2}{(a+b x)^2}\right )\right )}{b}+\frac {2 \left (\log \left (\frac {c}{d}+x\right ) \log \left (1-\frac {b \left (\frac {c}{d}+x\right )}{-a+\frac {b c}{d}}\right )+\operatorname {PolyLog}\left (2,\frac {b \left (\frac {c}{d}+x\right )}{-a+\frac {b c}{d}}\right )\right )}{b}\right )}{g}+\frac {B^2 \left (\frac {4 \log ^3\left (\frac {a}{b}+x\right )}{3 b}+\frac {\log (a+b x) \left (2 \log \left (\frac {a}{b}+x\right )-2 \log \left (\frac {c}{d}+x\right )+\log \left (\frac {c^2 e}{(a+b x)^2}+\frac {2 c d e x}{(a+b x)^2}+\frac {d^2 e x^2}{(a+b x)^2}\right )\right )^2}{b}+2 \left (2 \log \left (\frac {a}{b}+x\right )-2 \log \left (\frac {c}{d}+x\right )+\log \left (\frac {c^2 e}{(a+b x)^2}+\frac {2 c d e x}{(a+b x)^2}+\frac {d^2 e x^2}{(a+b x)^2}\right )\right ) \left (-\frac {\log ^2\left (\frac {a}{b}+x\right )}{b}+\frac {2 \left (\log \left (\frac {c}{d}+x\right ) \log \left (1-\frac {b \left (\frac {c}{d}+x\right )}{-a+\frac {b c}{d}}\right )+\operatorname {PolyLog}\left (2,\frac {b \left (\frac {c}{d}+x\right )}{-a+\frac {b c}{d}}\right )\right )}{b}\right )+\frac {8 \left (\frac {1}{2} \log ^2\left (\frac {c}{d}+x\right ) \log \left (1-\frac {b \left (\frac {c}{d}+x\right )}{-a+\frac {b c}{d}}\right )+\log \left (\frac {c}{d}+x\right ) \operatorname {PolyLog}\left (2,\frac {b \left (\frac {c}{d}+x\right )}{-a+\frac {b c}{d}}\right )-\operatorname {PolyLog}\left (3,\frac {b \left (\frac {c}{d}+x\right )}{-a+\frac {b c}{d}}\right )\right )}{b}-\frac {8 \left (\frac {1}{2} \log ^2\left (\frac {a}{b}+x\right ) \left (\log \left (\frac {c}{d}+x\right )-\log \left (\frac {b d \left (\frac {c}{d}+x\right )}{b c-a d}\right )\right )-\log \left (\frac {a}{b}+x\right ) \operatorname {PolyLog}\left (2,-\frac {d (a+b x)}{b c-a d}\right )+\operatorname {PolyLog}\left (3,-\frac {d (a+b x)}{b c-a d}\right )\right )}{b}\right )}{g} \] Input:
Integrate[(A + B*Log[(e*(c + d*x)^2)/(a + b*x)^2])^2/(a*g + b*g*x),x]
Output:
(A^2*Log[a + b*x])/(b*g) + (2*A*B*(-(Log[a/b + x]^2/b) + (Log[a + b*x]*(2* Log[a/b + x] - 2*Log[c/d + x] + Log[(c^2*e)/(a + b*x)^2 + (2*c*d*e*x)/(a + b*x)^2 + (d^2*e*x^2)/(a + b*x)^2]))/b + (2*(Log[c/d + x]*Log[1 - (b*(c/d + x))/(-a + (b*c)/d)] + PolyLog[2, (b*(c/d + x))/(-a + (b*c)/d)]))/b))/g + (B^2*((4*Log[a/b + x]^3)/(3*b) + (Log[a + b*x]*(2*Log[a/b + x] - 2*Log[c/ d + x] + Log[(c^2*e)/(a + b*x)^2 + (2*c*d*e*x)/(a + b*x)^2 + (d^2*e*x^2)/( a + b*x)^2])^2)/b + 2*(2*Log[a/b + x] - 2*Log[c/d + x] + Log[(c^2*e)/(a + b*x)^2 + (2*c*d*e*x)/(a + b*x)^2 + (d^2*e*x^2)/(a + b*x)^2])*(-(Log[a/b + x]^2/b) + (2*(Log[c/d + x]*Log[1 - (b*(c/d + x))/(-a + (b*c)/d)] + PolyLog [2, (b*(c/d + x))/(-a + (b*c)/d)]))/b) + (8*((Log[c/d + x]^2*Log[1 - (b*(c /d + x))/(-a + (b*c)/d)])/2 + Log[c/d + x]*PolyLog[2, (b*(c/d + x))/(-a + (b*c)/d)] - PolyLog[3, (b*(c/d + x))/(-a + (b*c)/d)]))/b - (8*((Log[a/b + x]^2*(Log[c/d + x] - Log[(b*d*(c/d + x))/(b*c - a*d)]))/2 - Log[a/b + x]*P olyLog[2, -((d*(a + b*x))/(b*c - a*d))] + PolyLog[3, -((d*(a + b*x))/(b*c - a*d))]))/b))/g
Time = 0.44 (sec) , antiderivative size = 125, normalized size of antiderivative = 0.95, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.118, Rules used = {2952, 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 (\frac {e (c+d x)^2}{(a+b x)^2}\right )+A\right )^2}{a g+b g x} \, dx\) |
\(\Big \downarrow \) 2952 |
\(\displaystyle \frac {\int \frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{d-\frac {b (c+d x)}{a+b x}}d\frac {c+d x}{a+b x}}{g}\) |
\(\Big \downarrow \) 2754 |
\(\displaystyle \frac {\frac {4 B \int \frac {(a+b x) \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right ) \log \left (1-\frac {b (c+d x)}{d (a+b x)}\right )}{c+d x}d\frac {c+d x}{a+b x}}{b}-\frac {\log \left (1-\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )+A\right )^2}{b}}{g}\) |
\(\Big \downarrow \) 2821 |
\(\displaystyle \frac {\frac {4 B \left (2 B \int \frac {(a+b x) \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right )}{c+d x}d\frac {c+d x}{a+b x}-\operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )+A\right )\right )}{b}-\frac {\log \left (1-\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )+A\right )^2}{b}}{g}\) |
\(\Big \downarrow \) 7143 |
\(\displaystyle \frac {\frac {4 B \left (2 B \operatorname {PolyLog}\left (3,\frac {b (c+d x)}{d (a+b x)}\right )-\operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )+A\right )\right )}{b}-\frac {\log \left (1-\frac {b (c+d x)}{d (a+b x)}\right ) \left (B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )+A\right )^2}{b}}{g}\) |
Input:
Int[(A + B*Log[(e*(c + d*x)^2)/(a + b*x)^2])^2/(a*g + b*g*x),x]
Output:
(-(((A + B*Log[(e*(c + d*x)^2)/(a + b*x)^2])^2*Log[1 - (b*(c + d*x))/(d*(a + b*x))])/b) + (4*B*(-((A + B*Log[(e*(c + d*x)^2)/(a + b*x)^2])*PolyLog[2 , (b*(c + d*x))/(d*(a + b*x))]) + 2*B*PolyLog[3, (b*(c + d*x))/(d*(a + b*x ))]))/b)/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[(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_))^(n_.)*((c_.) + (d_.)*(x_))^(mn_ )]*(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] && EqQ[ n + mn, 0] && IGtQ[n, 0] && NeQ[b*c - a*d, 0] && IntegersQ[m, p] && EqQ[d*f - c*g, 0] && (GtQ[p, 0] || LtQ[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 (\frac {e \left (d x +c \right )^{2}}{\left (b x +a \right )^{2}}\right )\right )}^{2}}{b g x +a g}d x\]
Input:
int((A+B*ln(e*(d*x+c)^2/(b*x+a)^2))^2/(b*g*x+a*g),x)
Output:
int((A+B*ln(e*(d*x+c)^2/(b*x+a)^2))^2/(b*g*x+a*g),x)
\[ \int \frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{a g+b g x} \, dx=\int { \frac {{\left (B \log \left (\frac {{\left (d x + c\right )}^{2} e}{{\left (b x + a\right )}^{2}}\right ) + A\right )}^{2}}{b g x + a g} \,d x } \] Input:
integrate((A+B*log(e*(d*x+c)^2/(b*x+a)^2))^2/(b*g*x+a*g),x, algorithm="fri cas")
Output:
integral((B^2*log((d^2*e*x^2 + 2*c*d*e*x + c^2*e)/(b^2*x^2 + 2*a*b*x + a^2 ))^2 + 2*A*B*log((d^2*e*x^2 + 2*c*d*e*x + c^2*e)/(b^2*x^2 + 2*a*b*x + a^2) ) + A^2)/(b*g*x + a*g), x)
\[ \int \frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{a g+b g x} \, dx=\frac {\int \frac {A^{2}}{a + b x}\, dx + \int \frac {B^{2} \log {\left (\frac {c^{2} e}{a^{2} + 2 a b x + b^{2} x^{2}} + \frac {2 c d e x}{a^{2} + 2 a b x + b^{2} x^{2}} + \frac {d^{2} e x^{2}}{a^{2} + 2 a b x + b^{2} x^{2}} \right )}^{2}}{a + b x}\, dx + \int \frac {2 A B \log {\left (\frac {c^{2} e}{a^{2} + 2 a b x + b^{2} x^{2}} + \frac {2 c d e x}{a^{2} + 2 a b x + b^{2} x^{2}} + \frac {d^{2} e x^{2}}{a^{2} + 2 a b x + b^{2} x^{2}} \right )}}{a + b x}\, dx}{g} \] Input:
integrate((A+B*ln(e*(d*x+c)**2/(b*x+a)**2))**2/(b*g*x+a*g),x)
Output:
(Integral(A**2/(a + b*x), x) + Integral(B**2*log(c**2*e/(a**2 + 2*a*b*x + b**2*x**2) + 2*c*d*e*x/(a**2 + 2*a*b*x + b**2*x**2) + d**2*e*x**2/(a**2 + 2*a*b*x + b**2*x**2))**2/(a + b*x), x) + Integral(2*A*B*log(c**2*e/(a**2 + 2*a*b*x + b**2*x**2) + 2*c*d*e*x/(a**2 + 2*a*b*x + b**2*x**2) + d**2*e*x* *2/(a**2 + 2*a*b*x + b**2*x**2))/(a + b*x), x))/g
\[ \int \frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{a g+b g x} \, dx=\int { \frac {{\left (B \log \left (\frac {{\left (d x + c\right )}^{2} e}{{\left (b x + a\right )}^{2}}\right ) + A\right )}^{2}}{b g x + a g} \,d x } \] Input:
integrate((A+B*log(e*(d*x+c)^2/(b*x+a)^2))^2/(b*g*x+a*g),x, algorithm="max ima")
Output:
4*B^2*log(b*x + a)*log(d*x + c)^2/(b*g) + A^2*log(b*g*x + a*g)/(b*g) - int egrate(-(B^2*b*c*log(e)^2 + 2*A*B*b*c*log(e) + 4*(B^2*b*d*x + B^2*b*c)*log (b*x + a)^2 + (B^2*b*d*log(e)^2 + 2*A*B*b*d*log(e))*x - 4*(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) + 4*(B^2*b*c*log(e) + A*B*b*c + (B^2*b*d*log(e) + A*B*b*d)*x - 2*(2*B^2*b*d*x + (b*c + a*d)*B ^2)*log(b*x + a))*log(d*x + c))/(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 (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{a g+b g x} \, dx=\int { \frac {{\left (B \log \left (\frac {{\left (d x + c\right )}^{2} e}{{\left (b x + a\right )}^{2}}\right ) + A\right )}^{2}}{b g x + a g} \,d x } \] Input:
integrate((A+B*log(e*(d*x+c)^2/(b*x+a)^2))^2/(b*g*x+a*g),x, algorithm="gia c")
Output:
integrate((B*log((d*x + c)^2*e/(b*x + a)^2) + A)^2/(b*g*x + a*g), x)
Timed out. \[ \int \frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{a g+b g x} \, dx=\int \frac {{\left (A+B\,\ln \left (\frac {e\,{\left (c+d\,x\right )}^2}{{\left (a+b\,x\right )}^2}\right )\right )}^2}{a\,g+b\,g\,x} \,d x \] Input:
int((A + B*log((e*(c + d*x)^2)/(a + b*x)^2))^2/(a*g + b*g*x),x)
Output:
int((A + B*log((e*(c + d*x)^2)/(a + b*x)^2))^2/(a*g + b*g*x), x)
\[ \int \frac {\left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )^2}{a g+b g x} \, dx=\frac {\left (\int \frac {\mathrm {log}\left (\frac {d^{2} e \,x^{2}+2 c d e x +c^{2} e}{b^{2} x^{2}+2 a b x +a^{2}}\right )^{2}}{b x +a}d x \right ) b^{3}+2 \left (\int \frac {\mathrm {log}\left (\frac {d^{2} e \,x^{2}+2 c d e x +c^{2} e}{b^{2} x^{2}+2 a b x +a^{2}}\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*(d*x+c)^2/(b*x+a)^2))^2/(b*g*x+a*g),x)
Output:
(int(log((c**2*e + 2*c*d*e*x + d**2*e*x**2)/(a**2 + 2*a*b*x + b**2*x**2))* *2/(a + b*x),x)*b**3 + 2*int(log((c**2*e + 2*c*d*e*x + d**2*e*x**2)/(a**2 + 2*a*b*x + b**2*x**2))/(a + b*x),x)*a*b**2 + log(a + b*x)*a**2)/(b*g)