Integrand size = 32, antiderivative size = 128 \[ \int \frac {\left (A+B \log \left (\frac {e (c+d x)}{a+b x}\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)}{a+b x}\right )\right )^2}{b g}-\frac {2 B \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right ) \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right )}{b g}+\frac {2 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)/(b*x+a)))^2/b/g-2*B*(A+B*ln(e *(d*x+c)/(b*x+a)))*polylog(2,b*(d*x+c)/d/(b*x+a))/b/g+2*B^2*polylog(3,b*(d *x+c)/d/(b*x+a))/b/g
Time = 1.42 (sec) , antiderivative size = 252, normalized size of antiderivative = 1.97 \[ \int \frac {\left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right )^2}{a g+b g x} \, dx=\frac {A B \log ^2\left (\frac {-b c+a d}{d (a+b x)}\right )+A^2 \log (a+b x)+2 A B \log \left (\frac {-b c+a d}{d (a+b x)}\right ) \log \left (\frac {b (c+d x)}{b c-a d}\right )-2 A B \log \left (\frac {-b c+a d}{d (a+b x)}\right ) \log \left (\frac {e (c+d x)}{a+b x}\right )-B^2 \log \left (\frac {-b c+a d}{d (a+b x)}\right ) \log ^2\left (\frac {e (c+d x)}{a+b x}\right )-2 A B \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{-b c+a d}\right )-2 B^2 \log \left (\frac {e (c+d x)}{a+b x}\right ) \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right )+2 B^2 \operatorname {PolyLog}\left (3,\frac {b (c+d x)}{d (a+b x)}\right )}{b g} \] Input:
Integrate[(A + B*Log[(e*(c + d*x))/(a + b*x)])^2/(a*g + b*g*x),x]
Output:
(A*B*Log[(-(b*c) + a*d)/(d*(a + b*x))]^2 + A^2*Log[a + b*x] + 2*A*B*Log[(- (b*c) + a*d)/(d*(a + b*x))]*Log[(b*(c + d*x))/(b*c - a*d)] - 2*A*B*Log[(-( b*c) + a*d)/(d*(a + b*x))]*Log[(e*(c + d*x))/(a + b*x)] - B^2*Log[(-(b*c) + a*d)/(d*(a + b*x))]*Log[(e*(c + d*x))/(a + b*x)]^2 - 2*A*B*PolyLog[2, (d *(a + b*x))/(-(b*c) + a*d)] - 2*B^2*Log[(e*(c + d*x))/(a + b*x)]*PolyLog[2 , (b*(c + d*x))/(d*(a + b*x))] + 2*B^2*PolyLog[3, (b*(c + d*x))/(d*(a + b* x))])/(b*g)
Time = 0.43 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.94, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, 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)}{a+b x}\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)}{a+b x}\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 {2 B \int \frac {(a+b x) \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\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)}{a+b x}\right )+A\right )^2}{b}}{g}\) |
\(\Big \downarrow \) 2821 |
\(\displaystyle \frac {\frac {2 B \left (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)}{a+b x}\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)}{a+b x}\right )+A\right )^2}{b}}{g}\) |
\(\Big \downarrow \) 7143 |
\(\displaystyle \frac {\frac {2 B \left (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)}{a+b x}\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)}{a+b x}\right )+A\right )^2}{b}}{g}\) |
Input:
Int[(A + B*Log[(e*(c + d*x))/(a + b*x)])^2/(a*g + b*g*x),x]
Output:
(-(((A + B*Log[(e*(c + d*x))/(a + b*x)])^2*Log[1 - (b*(c + d*x))/(d*(a + b *x))])/b) + (2*B*(-((A + B*Log[(e*(c + d*x))/(a + b*x)])*PolyLog[2, (b*(c + d*x))/(d*(a + b*x))]) + 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]
Leaf count of result is larger than twice the leaf count of optimal. \(345\) vs. \(2(128)=256\).
Time = 2.44 (sec) , antiderivative size = 346, normalized size of antiderivative = 2.70
method | result | size |
parts | \(\frac {A^{2} \ln \left (b x +a \right )}{g b}-\frac {B^{2} \left (\ln \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )^{2} \ln \left (1-\frac {b \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )}{d e}\right )+2 \ln \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) \operatorname {polylog}\left (2, \frac {b \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )}{d e}\right )-2 \operatorname {polylog}\left (3, \frac {b \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )}{d e}\right )\right )}{g b}+\frac {2 A B \left (-\frac {\operatorname {dilog}\left (-\frac {\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e}{d e}\right )}{b}-\frac {\ln \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) \ln \left (-\frac {\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e}{d e}\right )}{b}\right )}{g}\) | \(346\) |
risch | \(\frac {A^{2} \ln \left (b x +a \right )}{g b}-\frac {B^{2} \ln \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )^{2} \ln \left (1-\frac {b \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )}{d e}\right )}{b g}-\frac {2 B^{2} \ln \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) \operatorname {polylog}\left (2, \frac {b \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )}{d e}\right )}{b g}+\frac {2 B^{2} \operatorname {polylog}\left (3, \frac {b \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )}{d e}\right )}{b g}-\frac {2 A B \operatorname {dilog}\left (-\frac {\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e}{d e}\right )}{g b}-\frac {2 A B \ln \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) \ln \left (-\frac {\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e}{d e}\right )}{g b}\) | \(364\) |
derivativedivides | \(\frac {e \left (d a -b c \right ) \left (-\frac {b \,A^{2} \ln \left (\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e \right )}{g e \left (d a -b c \right )}-\frac {b \,B^{2} \left (\ln \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )^{2} \ln \left (1-\frac {b \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )}{d e}\right )+2 \ln \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) \operatorname {polylog}\left (2, \frac {b \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )}{d e}\right )-2 \operatorname {polylog}\left (3, \frac {b \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )}{d e}\right )\right )}{g e \left (d a -b c \right )}-\frac {2 b^{2} A B \left (\frac {\operatorname {dilog}\left (-\frac {\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e}{d e}\right )}{b}+\frac {\ln \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) \ln \left (-\frac {\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e}{d e}\right )}{b}\right )}{g e \left (d a -b c \right )}\right )}{b^{2}}\) | \(426\) |
default | \(\frac {e \left (d a -b c \right ) \left (-\frac {b \,A^{2} \ln \left (\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e \right )}{g e \left (d a -b c \right )}-\frac {b \,B^{2} \left (\ln \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )^{2} \ln \left (1-\frac {b \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )}{d e}\right )+2 \ln \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) \operatorname {polylog}\left (2, \frac {b \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )}{d e}\right )-2 \operatorname {polylog}\left (3, \frac {b \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )}{d e}\right )\right )}{g e \left (d a -b c \right )}-\frac {2 b^{2} A B \left (\frac {\operatorname {dilog}\left (-\frac {\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e}{d e}\right )}{b}+\frac {\ln \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) \ln \left (-\frac {\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e}{d e}\right )}{b}\right )}{g e \left (d a -b c \right )}\right )}{b^{2}}\) | \(426\) |
Input:
int((A+B*ln(e*(d*x+c)/(b*x+a)))^2/(b*g*x+a*g),x,method=_RETURNVERBOSE)
Output:
1/g*A^2*ln(b*x+a)/b-B^2/g/b*(ln(d*e/b-e*(a*d-b*c)/b/(b*x+a))^2*ln(1-b/d/e* (d*e/b-e*(a*d-b*c)/b/(b*x+a)))+2*ln(d*e/b-e*(a*d-b*c)/b/(b*x+a))*polylog(2 ,b/d/e*(d*e/b-e*(a*d-b*c)/b/(b*x+a)))-2*polylog(3,b/d/e*(d*e/b-e*(a*d-b*c) /b/(b*x+a))))+2*A*B/g*(-dilog(-((d*e/b-e*(a*d-b*c)/b/(b*x+a))*b-d*e)/d/e)/ b-ln(d*e/b-e*(a*d-b*c)/b/(b*x+a))*ln(-((d*e/b-e*(a*d-b*c)/b/(b*x+a))*b-d*e )/d/e)/b)
\[ \int \frac {\left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right )^2}{a g+b g x} \, dx=\int { \frac {{\left (B \log \left (\frac {{\left (d x + c\right )} e}{b x + a}\right ) + A\right )}^{2}}{b g x + a g} \,d x } \] Input:
integrate((A+B*log(e*(d*x+c)/(b*x+a)))^2/(b*g*x+a*g),x, algorithm="fricas" )
Output:
integral((B^2*log((d*e*x + c*e)/(b*x + a))^2 + 2*A*B*log((d*e*x + c*e)/(b* x + a)) + A^2)/(b*g*x + a*g), x)
\[ \int \frac {\left (A+B \log \left (\frac {e (c+d x)}{a+b x}\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 e}{a + b x} + \frac {d e x}{a + b x} \right )}^{2}}{a + b x}\, dx + \int \frac {2 A B \log {\left (\frac {c e}{a + b x} + \frac {d e x}{a + b x} \right )}}{a + b x}\, dx}{g} \] Input:
integrate((A+B*ln(e*(d*x+c)/(b*x+a)))**2/(b*g*x+a*g),x)
Output:
(Integral(A**2/(a + b*x), x) + Integral(B**2*log(c*e/(a + b*x) + d*e*x/(a + b*x))**2/(a + b*x), x) + Integral(2*A*B*log(c*e/(a + b*x) + d*e*x/(a + b *x))/(a + b*x), x))/g
\[ \int \frac {\left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right )^2}{a g+b g x} \, dx=\int { \frac {{\left (B \log \left (\frac {{\left (d x + c\right )} e}{b x + a}\right ) + A\right )}^{2}}{b g x + a g} \,d x } \] Input:
integrate((A+B*log(e*(d*x+c)/(b*x+a)))^2/(b*g*x+a*g),x, algorithm="maxima" )
Output:
B^2*log(b*x + a)*log(d*x + c)^2/(b*g) + A^2*log(b*g*x + a*g)/(b*g) - integ rate(-(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)^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) + 2*(B^2*b*c*log(e) + A *B*b*c + (B^2*b*d*log(e) + A*B*b*d)*x - (2*B^2*b*d*x + (b*c + a*d)*B^2)*lo g(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)}{a+b x}\right )\right )^2}{a g+b g x} \, dx=\int { \frac {{\left (B \log \left (\frac {{\left (d x + c\right )} e}{b x + a}\right ) + A\right )}^{2}}{b g x + a g} \,d x } \] Input:
integrate((A+B*log(e*(d*x+c)/(b*x+a)))^2/(b*g*x+a*g),x, algorithm="giac")
Output:
integrate((B*log((d*x + c)*e/(b*x + a)) + A)^2/(b*g*x + a*g), x)
Timed out. \[ \int \frac {\left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right )^2}{a g+b g x} \, dx=\int \frac {{\left (A+B\,\ln \left (\frac {e\,\left (c+d\,x\right )}{a+b\,x}\right )\right )}^2}{a\,g+b\,g\,x} \,d x \] Input:
int((A + B*log((e*(c + d*x))/(a + b*x)))^2/(a*g + b*g*x),x)
Output:
int((A + B*log((e*(c + d*x))/(a + b*x)))^2/(a*g + b*g*x), x)
\[ \int \frac {\left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right )^2}{a g+b g x} \, dx=\frac {\left (\int \frac {\mathrm {log}\left (\frac {d e x +c e}{b x +a}\right )^{2}}{b x +a}d x \right ) b^{3}+2 \left (\int \frac {\mathrm {log}\left (\frac {d e x +c e}{b x +a}\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)/(b*x+a)))^2/(b*g*x+a*g),x)
Output:
(int(log((c*e + d*e*x)/(a + b*x))**2/(a + b*x),x)*b**3 + 2*int(log((c*e + d*e*x)/(a + b*x))/(a + b*x),x)*a*b**2 + log(a + b*x)*a**2)/(b*g)