Integrand size = 32, antiderivative size = 102 \[ \int \frac {A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )}{(a g+b g x)^2} \, dx=-\frac {A (c+d x)}{(b c-a d) g^2 (a+b x)}+\frac {2 B (c+d x)}{(b c-a d) g^2 (a+b x)}-\frac {B (c+d x) \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )}{(b c-a d) g^2 (a+b x)} \] Output:
-A*(d*x+c)/(-a*d+b*c)/g^2/(b*x+a)+2*B*(d*x+c)/(-a*d+b*c)/g^2/(b*x+a)-B*(d* x+c)*ln(e*(d*x+c)^2/(b*x+a)^2)/(-a*d+b*c)/g^2/(b*x+a)
Time = 0.06 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.87 \[ \int \frac {A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )}{(a g+b g x)^2} \, dx=\frac {2 B d (a+b x) \log (a+b x)-2 B d (a+b x) \log (c+d x)-(b c-a d) \left (A-2 B+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )}{b (b c-a d) g^2 (a+b x)} \] Input:
Integrate[(A + B*Log[(e*(c + d*x)^2)/(a + b*x)^2])/(a*g + b*g*x)^2,x]
Output:
(2*B*d*(a + b*x)*Log[a + b*x] - 2*B*d*(a + b*x)*Log[c + d*x] - (b*c - a*d) *(A - 2*B + B*Log[(e*(c + d*x)^2)/(a + b*x)^2]))/(b*(b*c - a*d)*g^2*(a + b *x))
Time = 0.23 (sec) , antiderivative size = 76, normalized size of antiderivative = 0.75, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.062, Rules used = {2952, 2009}
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 {B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )+A}{(a g+b g x)^2} \, dx\) |
\(\Big \downarrow \) 2952 |
\(\displaystyle -\frac {\int \left (A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )\right )d\frac {c+d x}{a+b x}}{g^2 (b c-a d)}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\frac {A (c+d x)}{a+b x}+\frac {B (c+d x) \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )}{a+b x}-\frac {2 B (c+d x)}{a+b x}}{g^2 (b c-a d)}\) |
Input:
Int[(A + B*Log[(e*(c + d*x)^2)/(a + b*x)^2])/(a*g + b*g*x)^2,x]
Output:
-(((A*(c + d*x))/(a + b*x) - (2*B*(c + d*x))/(a + b*x) + (B*(c + d*x)*Log[ (e*(c + d*x)^2)/(a + b*x)^2])/(a + b*x))/((b*c - a*d)*g^2))
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])
Time = 1.10 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.91
method | result | size |
norman | \(\frac {\frac {\left (A -2 B \right ) x}{g a}+\frac {B c \ln \left (\frac {e \left (d x +c \right )^{2}}{\left (b x +a \right )^{2}}\right )}{g \left (d a -b c \right )}+\frac {d B x \ln \left (\frac {e \left (d x +c \right )^{2}}{\left (b x +a \right )^{2}}\right )}{g \left (d a -b c \right )}}{g \left (b x +a \right )}\) | \(93\) |
parallelrisch | \(-\frac {-2 B x \ln \left (\frac {e \left (d x +c \right )^{2}}{\left (b x +a \right )^{2}}\right ) b^{3} d^{2}-2 B \ln \left (\frac {e \left (d x +c \right )^{2}}{\left (b x +a \right )^{2}}\right ) b^{3} c d +2 A a \,b^{2} d^{2}-2 A \,b^{3} c d -4 B a \,b^{2} d^{2}+4 B \,b^{3} c d}{2 g^{2} \left (b x +a \right ) b^{3} d \left (d a -b c \right )}\) | \(118\) |
risch | \(-\frac {B \ln \left (\frac {e \left (d x +c \right )^{2}}{\left (b x +a \right )^{2}}\right )}{b \,g^{2} \left (b x +a \right )}-\frac {-2 B \ln \left (-d x -c \right ) b d x +2 B \ln \left (b x +a \right ) b d x -2 B \ln \left (-d x -c \right ) a d +2 B \ln \left (b x +a \right ) a d +A d a -A b c -2 B a d +2 B b c}{g^{2} \left (b x +a \right ) b \left (d a -b c \right )}\) | \(132\) |
derivativedivides | \(-\frac {\frac {A}{g^{2} \left (b x +a \right )}+\frac {B \left (\frac {\ln \left (\frac {e \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2}}{b^{2}}\right )}{b x +a}-\left (2 d a -2 b c \right ) \left (\frac {1}{\left (b x +a \right ) \left (d a -b c \right )}+\frac {d \ln \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )}{\left (d a -b c \right )^{2}}\right )\right )}{g^{2}}}{b}\) | \(134\) |
default | \(-\frac {\frac {A}{g^{2} \left (b x +a \right )}+\frac {B \left (\frac {\ln \left (\frac {e \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2}}{b^{2}}\right )}{b x +a}-\left (2 d a -2 b c \right ) \left (\frac {1}{\left (b x +a \right ) \left (d a -b c \right )}+\frac {d \ln \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )}{\left (d a -b c \right )^{2}}\right )\right )}{g^{2}}}{b}\) | \(134\) |
parts | \(-\frac {A}{g^{2} \left (b x +a \right ) b}-\frac {B \left (\frac {\ln \left (\frac {e \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )^{2}}{b^{2}}\right )}{b x +a}-\left (2 d a -2 b c \right ) \left (\frac {1}{\left (b x +a \right ) \left (d a -b c \right )}+\frac {d \ln \left (\frac {a d}{b x +a}-\frac {b c}{b x +a}-d \right )}{\left (d a -b c \right )^{2}}\right )\right )}{g^{2} b}\) | \(137\) |
orering | \(\frac {3 \left (A +B \ln \left (\frac {e \left (d x +c \right )^{2}}{\left (b x +a \right )^{2}}\right )\right ) \left (d x +c \right ) \left (b x +a \right )}{\left (b g x +a g \right )^{2} \left (d a -b c \right )}+\frac {\left (b x +a \right )^{2} \left (d x +c \right ) \left (\frac {B \left (\frac {2 e \left (d x +c \right ) d}{\left (b x +a \right )^{2}}-\frac {2 e \left (d x +c \right )^{2} b}{\left (b x +a \right )^{3}}\right ) \left (b x +a \right )^{2}}{e \left (d x +c \right )^{2} \left (b g x +a g \right )^{2}}-\frac {2 \left (A +B \ln \left (\frac {e \left (d x +c \right )^{2}}{\left (b x +a \right )^{2}}\right )\right ) b g}{\left (b g x +a g \right )^{3}}\right )}{b \left (d a -b c \right )}\) | \(181\) |
Input:
int((A+B*ln(e*(d*x+c)^2/(b*x+a)^2))/(b*g*x+a*g)^2,x,method=_RETURNVERBOSE)
Output:
((A-2*B)/g/a*x+B*c/g/(a*d-b*c)*ln(e*(d*x+c)^2/(b*x+a)^2)+d*B/g/(a*d-b*c)*x *ln(e*(d*x+c)^2/(b*x+a)^2))/g/(b*x+a)
Time = 0.09 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.08 \[ \int \frac {A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )}{(a g+b g x)^2} \, dx=-\frac {{\left (A - 2 \, B\right )} b c - {\left (A - 2 \, B\right )} a d + {\left (B b d x + B b c\right )} \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 )}{{\left (b^{3} c - a b^{2} d\right )} g^{2} x + {\left (a b^{2} c - a^{2} b d\right )} g^{2}} \] Input:
integrate((A+B*log(e*(d*x+c)^2/(b*x+a)^2))/(b*g*x+a*g)^2,x, algorithm="fri cas")
Output:
-((A - 2*B)*b*c - (A - 2*B)*a*d + (B*b*d*x + B*b*c)*log((d^2*e*x^2 + 2*c*d *e*x + c^2*e)/(b^2*x^2 + 2*a*b*x + a^2)))/((b^3*c - a*b^2*d)*g^2*x + (a*b^ 2*c - a^2*b*d)*g^2)
Leaf count of result is larger than twice the leaf count of optimal. 253 vs. \(2 (83) = 166\).
Time = 0.72 (sec) , antiderivative size = 253, normalized size of antiderivative = 2.48 \[ \int \frac {A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )}{(a g+b g x)^2} \, dx=- \frac {B \log {\left (\frac {e \left (c + d x\right )^{2}}{\left (a + b x\right )^{2}} \right )}}{a b g^{2} + b^{2} g^{2} x} + \frac {2 B d \log {\left (x + \frac {- \frac {2 B a^{2} d^{3}}{a d - b c} + \frac {4 B a b c d^{2}}{a d - b c} + 2 B a d^{2} - \frac {2 B b^{2} c^{2} d}{a d - b c} + 2 B b c d}{4 B b d^{2}} \right )}}{b g^{2} \left (a d - b c\right )} - \frac {2 B d \log {\left (x + \frac {\frac {2 B a^{2} d^{3}}{a d - b c} - \frac {4 B a b c d^{2}}{a d - b c} + 2 B a d^{2} + \frac {2 B b^{2} c^{2} d}{a d - b c} + 2 B b c d}{4 B b d^{2}} \right )}}{b g^{2} \left (a d - b c\right )} + \frac {- A + 2 B}{a b g^{2} + b^{2} g^{2} x} \] Input:
integrate((A+B*ln(e*(d*x+c)**2/(b*x+a)**2))/(b*g*x+a*g)**2,x)
Output:
-B*log(e*(c + d*x)**2/(a + b*x)**2)/(a*b*g**2 + b**2*g**2*x) + 2*B*d*log(x + (-2*B*a**2*d**3/(a*d - b*c) + 4*B*a*b*c*d**2/(a*d - b*c) + 2*B*a*d**2 - 2*B*b**2*c**2*d/(a*d - b*c) + 2*B*b*c*d)/(4*B*b*d**2))/(b*g**2*(a*d - b*c )) - 2*B*d*log(x + (2*B*a**2*d**3/(a*d - b*c) - 4*B*a*b*c*d**2/(a*d - b*c) + 2*B*a*d**2 + 2*B*b**2*c**2*d/(a*d - b*c) + 2*B*b*c*d)/(4*B*b*d**2))/(b* g**2*(a*d - b*c)) + (-A + 2*B)/(a*b*g**2 + b**2*g**2*x)
Time = 0.04 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.83 \[ \int \frac {A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )}{(a g+b g x)^2} \, dx=-B {\left (\frac {\log \left (\frac {d^{2} e x^{2}}{b^{2} x^{2} + 2 \, a b x + a^{2}} + \frac {2 \, c d e x}{b^{2} x^{2} + 2 \, a b x + a^{2}} + \frac {c^{2} e}{b^{2} x^{2} + 2 \, a b x + a^{2}}\right )}{b^{2} g^{2} x + a b g^{2}} - \frac {2}{b^{2} g^{2} x + a b g^{2}} - \frac {2 \, d \log \left (b x + a\right )}{{\left (b^{2} c - a b d\right )} g^{2}} + \frac {2 \, d \log \left (d x + c\right )}{{\left (b^{2} c - a b d\right )} g^{2}}\right )} - \frac {A}{b^{2} g^{2} x + a b g^{2}} \] Input:
integrate((A+B*log(e*(d*x+c)^2/(b*x+a)^2))/(b*g*x+a*g)^2,x, algorithm="max ima")
Output:
-B*(log(d^2*e*x^2/(b^2*x^2 + 2*a*b*x + a^2) + 2*c*d*e*x/(b^2*x^2 + 2*a*b*x + a^2) + c^2*e/(b^2*x^2 + 2*a*b*x + a^2))/(b^2*g^2*x + a*b*g^2) - 2/(b^2* g^2*x + a*b*g^2) - 2*d*log(b*x + a)/((b^2*c - a*b*d)*g^2) + 2*d*log(d*x + c)/((b^2*c - a*b*d)*g^2)) - A/(b^2*g^2*x + a*b*g^2)
Time = 0.14 (sec) , antiderivative size = 187, normalized size of antiderivative = 1.83 \[ \int \frac {A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )}{(a g+b g x)^2} \, dx=-{\left (2 \, {\left (b^{2} c g^{2} - a b d g^{2}\right )} {\left (\frac {d \log \left ({\left | \frac {b c g}{b g x + a g} - \frac {a d g}{b g x + a g} + d \right |}\right )}{b^{4} c^{2} g^{4} - 2 \, a b^{3} c d g^{4} + a^{2} b^{2} d^{2} g^{4}} - \frac {1}{{\left (b^{2} c g^{2} - a b d g^{2}\right )} {\left (b g x + a g\right )} b g}\right )} + \frac {\log \left (\frac {{\left (d x + c\right )}^{2} e}{{\left (b x + a\right )}^{2}}\right )}{{\left (b g x + a g\right )} b g}\right )} B - \frac {A}{{\left (b g x + a g\right )} b g} \] Input:
integrate((A+B*log(e*(d*x+c)^2/(b*x+a)^2))/(b*g*x+a*g)^2,x, algorithm="gia c")
Output:
-(2*(b^2*c*g^2 - a*b*d*g^2)*(d*log(abs(b*c*g/(b*g*x + a*g) - a*d*g/(b*g*x + a*g) + d))/(b^4*c^2*g^4 - 2*a*b^3*c*d*g^4 + a^2*b^2*d^2*g^4) - 1/((b^2*c *g^2 - a*b*d*g^2)*(b*g*x + a*g)*b*g)) + log((d*x + c)^2*e/(b*x + a)^2)/((b *g*x + a*g)*b*g))*B - A/((b*g*x + a*g)*b*g)
Time = 27.47 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.06 \[ \int \frac {A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )}{(a g+b g x)^2} \, dx=-\frac {A-2\,B}{x\,b^2\,g^2+a\,b\,g^2}-\frac {B\,\ln \left (\frac {e\,{\left (c+d\,x\right )}^2}{{\left (a+b\,x\right )}^2}\right )}{b^2\,g^2\,\left (x+\frac {a}{b}\right )}+\frac {B\,d\,\mathrm {atan}\left (\frac {b\,c\,2{}\mathrm {i}+b\,d\,x\,2{}\mathrm {i}}{a\,d-b\,c}+1{}\mathrm {i}\right )\,4{}\mathrm {i}}{b\,g^2\,\left (a\,d-b\,c\right )} \] Input:
int((A + B*log((e*(c + d*x)^2)/(a + b*x)^2))/(a*g + b*g*x)^2,x)
Output:
(B*d*atan((b*c*2i + b*d*x*2i)/(a*d - b*c) + 1i)*4i)/(b*g^2*(a*d - b*c)) - (B*log((e*(c + d*x)^2)/(a + b*x)^2))/(b^2*g^2*(x + a/b)) - (A - 2*B)/(b^2* g^2*x + a*b*g^2)
Time = 0.15 (sec) , antiderivative size = 198, normalized size of antiderivative = 1.94 \[ \int \frac {A+B \log \left (\frac {e (c+d x)^2}{(a+b x)^2}\right )}{(a g+b g x)^2} \, dx=\frac {-2 \,\mathrm {log}\left (b x +a \right ) a b c -2 \,\mathrm {log}\left (b x +a \right ) b^{2} c x +2 \,\mathrm {log}\left (d x +c \right ) a b c +2 \,\mathrm {log}\left (d x +c \right ) b^{2} c x +\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 ) a b d x -\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^{2} c x +a^{2} d x -a b c x -2 a b d x +2 b^{2} c x}{a \,g^{2} \left (a b d x -b^{2} c x +a^{2} d -a b c \right )} \] Input:
int((A+B*log(e*(d*x+c)^2/(b*x+a)^2))/(b*g*x+a*g)^2,x)
Output:
( - 2*log(a + b*x)*a*b*c - 2*log(a + b*x)*b**2*c*x + 2*log(c + d*x)*a*b*c + 2*log(c + d*x)*b**2*c*x + 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*d*x - log((c**2*e + 2*c*d*e*x + d**2*e*x**2)/(a **2 + 2*a*b*x + b**2*x**2))*b**2*c*x + a**2*d*x - a*b*c*x - 2*a*b*d*x + 2* b**2*c*x)/(a*g**2*(a**2*d - a*b*c + a*b*d*x - b**2*c*x))