Integrand size = 31, antiderivative size = 120 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(g+h x)^2} \, dx=\frac {b B n \log (a+b x)}{h (b g-a h)}-\frac {B d n \log (c+d x)}{h (d g-c h)}-\frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{h (g+h x)}+\frac {B (b c-a d) n \log (g+h x)}{(b g-a h) (d g-c h)} \] Output:
b*B*n*ln(b*x+a)/h/(-a*h+b*g)-B*d*n*ln(d*x+c)/h/(-c*h+d*g)-(A+B*ln(e*(b*x+a )^n/((d*x+c)^n)))/h/(h*x+g)+B*(-a*d+b*c)*n*ln(h*x+g)/(-a*h+b*g)/(-c*h+d*g)
Time = 0.21 (sec) , antiderivative size = 117, normalized size of antiderivative = 0.98 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(g+h x)^2} \, dx=\frac {-\frac {A}{g+h x}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{g+h x}+\frac {B n (b (d g-c h) \log (a+b x)+(-b d g+a d h) \log (c+d x)+(b c-a d) h \log (g+h x))}{(b g-a h) (d g-c h)}}{h} \] Input:
Integrate[(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])/(g + h*x)^2,x]
Output:
(-(A/(g + h*x)) - (B*Log[(e*(a + b*x)^n)/(c + d*x)^n])/(g + h*x) + (B*n*(b *(d*g - c*h)*Log[a + b*x] + (-(b*d*g) + a*d*h)*Log[c + d*x] + (b*c - a*d)* h*Log[g + h*x]))/((b*g - a*h)*(d*g - c*h)))/h
Time = 0.35 (sec) , antiderivative size = 136, normalized size of antiderivative = 1.13, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {2948, 93, 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 (e (a+b x)^n (c+d x)^{-n}\right )+A}{(g+h x)^2} \, dx\) |
\(\Big \downarrow \) 2948 |
\(\displaystyle \frac {B n (b c-a d) \int \frac {1}{(a+b x) (c+d x) (g+h x)}dx}{h}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A}{h (g+h x)}\) |
\(\Big \downarrow \) 93 |
\(\displaystyle \frac {B n (b c-a d) \int \left (\frac {b^2}{(b c-a d) (b g-a h) (a+b x)}+\frac {d^2}{(b c-a d) (c h-d g) (c+d x)}+\frac {h^2}{(b g-a h) (d g-c h) (g+h x)}\right )dx}{h}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A}{h (g+h x)}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {B n (b c-a d) \left (\frac {b \log (a+b x)}{(b c-a d) (b g-a h)}-\frac {d \log (c+d x)}{(b c-a d) (d g-c h)}+\frac {h \log (g+h x)}{(b g-a h) (d g-c h)}\right )}{h}-\frac {B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A}{h (g+h x)}\) |
Input:
Int[(A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])/(g + h*x)^2,x]
Output:
-((A + B*Log[(e*(a + b*x)^n)/(c + d*x)^n])/(h*(g + h*x))) + (B*(b*c - a*d) *n*((b*Log[a + b*x])/((b*c - a*d)*(b*g - a*h)) - (d*Log[c + d*x])/((b*c - a*d)*(d*g - c*h)) + (h*Log[g + h*x])/((b*g - a*h)*(d*g - c*h))))/h
Int[((e_.) + (f_.)*(x_))^(p_)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_] :> Int[ExpandIntegrand[(e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; Fre eQ[{a, b, c, d, e, f}, x] && IntegerQ[p]
Int[((A_.) + Log[(e_.)*((a_.) + (b_.)*(x_))^(n_.)*((c_.) + (d_.)*(x_))^(mn_ )]*(B_.))*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(f + g*x)^(m + 1)*( (A + B*Log[e*((a + b*x)^n/(c + d*x)^n)])/(g*(m + 1))), x] - Simp[B*n*((b*c - a*d)/(g*(m + 1))) Int[(f + g*x)^(m + 1)/((a + b*x)*(c + d*x)), x], x] / ; FreeQ[{a, b, c, d, e, f, g, A, B, m, n}, x] && EqQ[n + mn, 0] && NeQ[b*c - a*d, 0] && NeQ[m, -1] && !(EqQ[m, -2] && IntegerQ[n])
Leaf count of result is larger than twice the leaf count of optimal. \(367\) vs. \(2(120)=240\).
Time = 9.31 (sec) , antiderivative size = 368, normalized size of antiderivative = 3.07
method | result | size |
parallelrisch | \(\frac {-A x \,a^{2} c d g h n -A x a b \,c^{2} g h n +A x a b c d \,g^{2} n +A x \,a^{2} c^{2} h^{2} n -B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) a^{2} c^{2} g h n +B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) a b \,c^{2} g^{2} n +B \ln \left (b x +a \right ) a^{2} c d \,g^{2} n^{2}-B \ln \left (b x +a \right ) a b \,c^{2} g^{2} n^{2}-B \ln \left (h x +g \right ) a^{2} c d \,g^{2} n^{2}+B \ln \left (h x +g \right ) a b \,c^{2} g^{2} n^{2}+B \ln \left (b x +a \right ) x \,a^{2} c d g h \,n^{2}-B \ln \left (b x +a \right ) x a b \,c^{2} g h \,n^{2}-B \ln \left (h x +g \right ) x \,a^{2} c d g h \,n^{2}+B \ln \left (h x +g \right ) x a b \,c^{2} g h \,n^{2}-B x \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) a^{2} c d g h n +B x \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) a b c d \,g^{2} n}{\left (a h -b g \right ) \left (h x +g \right ) n \left (c h -d g \right ) a c g}\) | \(368\) |
risch | \(\text {Expression too large to display}\) | \(1797\) |
Input:
int((A+B*ln(e*(b*x+a)^n/((d*x+c)^n)))/(h*x+g)^2,x,method=_RETURNVERBOSE)
Output:
(-A*x*a^2*c*d*g*h*n-A*x*a*b*c^2*g*h*n+A*x*a*b*c*d*g^2*n+A*x*a^2*c^2*h^2*n- B*ln(e*(b*x+a)^n/((d*x+c)^n))*a^2*c^2*g*h*n+B*ln(e*(b*x+a)^n/((d*x+c)^n))* a*b*c^2*g^2*n+B*ln(b*x+a)*a^2*c*d*g^2*n^2-B*ln(b*x+a)*a*b*c^2*g^2*n^2-B*ln (h*x+g)*a^2*c*d*g^2*n^2+B*ln(h*x+g)*a*b*c^2*g^2*n^2+B*ln(b*x+a)*x*a^2*c*d* g*h*n^2-B*ln(b*x+a)*x*a*b*c^2*g*h*n^2-B*ln(h*x+g)*x*a^2*c*d*g*h*n^2+B*ln(h *x+g)*x*a*b*c^2*g*h*n^2-B*x*ln(e*(b*x+a)^n/((d*x+c)^n))*a^2*c*d*g*h*n+B*x* ln(e*(b*x+a)^n/((d*x+c)^n))*a*b*c*d*g^2*n)/(a*h-b*g)/(h*x+g)/n/(c*h-d*g)/a /c/g
Leaf count of result is larger than twice the leaf count of optimal. 250 vs. \(2 (120) = 240\).
Time = 2.91 (sec) , antiderivative size = 250, normalized size of antiderivative = 2.08 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(g+h x)^2} \, dx=-\frac {A b d g^{2} + A a c h^{2} - {\left (A b c + A a d\right )} g h - {\left ({\left (B b d g h - B b c h^{2}\right )} n x + {\left (B a d g h - B a c h^{2}\right )} n\right )} \log \left (b x + a\right ) + {\left ({\left (B b d g h - B a d h^{2}\right )} n x + {\left (B b c g h - B a c h^{2}\right )} n\right )} \log \left (d x + c\right ) - {\left ({\left (B b c - B a d\right )} h^{2} n x + {\left (B b c - B a d\right )} g h n\right )} \log \left (h x + g\right ) + {\left (B b d g^{2} + B a c h^{2} - {\left (B b c + B a d\right )} g h\right )} \log \left (e\right )}{b d g^{3} h + a c g h^{3} - {\left (b c + a d\right )} g^{2} h^{2} + {\left (b d g^{2} h^{2} + a c h^{4} - {\left (b c + a d\right )} g h^{3}\right )} x} \] Input:
integrate((A+B*log(e*(b*x+a)^n/((d*x+c)^n)))/(h*x+g)^2,x, algorithm="frica s")
Output:
-(A*b*d*g^2 + A*a*c*h^2 - (A*b*c + A*a*d)*g*h - ((B*b*d*g*h - B*b*c*h^2)*n *x + (B*a*d*g*h - B*a*c*h^2)*n)*log(b*x + a) + ((B*b*d*g*h - B*a*d*h^2)*n* x + (B*b*c*g*h - B*a*c*h^2)*n)*log(d*x + c) - ((B*b*c - B*a*d)*h^2*n*x + ( B*b*c - B*a*d)*g*h*n)*log(h*x + g) + (B*b*d*g^2 + B*a*c*h^2 - (B*b*c + B*a *d)*g*h)*log(e))/(b*d*g^3*h + a*c*g*h^3 - (b*c + a*d)*g^2*h^2 + (b*d*g^2*h ^2 + a*c*h^4 - (b*c + a*d)*g*h^3)*x)
Timed out. \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(g+h x)^2} \, dx=\text {Timed out} \] Input:
integrate((A+B*ln(e*(b*x+a)**n/((d*x+c)**n)))/(h*x+g)**2,x)
Output:
Timed out
Time = 0.04 (sec) , antiderivative size = 151, normalized size of antiderivative = 1.26 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(g+h x)^2} \, dx=\frac {{\left (\frac {b e n \log \left (b x + a\right )}{b g h - a h^{2}} - \frac {d e n \log \left (d x + c\right )}{d g h - c h^{2}} - \frac {{\left (b c e n - a d e n\right )} \log \left (h x + g\right )}{{\left (d g h - c h^{2}\right )} a - {\left (d g^{2} - c g h\right )} b}\right )} B}{e} - \frac {B \log \left (\frac {{\left (b x + a\right )}^{n} e}{{\left (d x + c\right )}^{n}}\right )}{h^{2} x + g h} - \frac {A}{h^{2} x + g h} \] Input:
integrate((A+B*log(e*(b*x+a)^n/((d*x+c)^n)))/(h*x+g)^2,x, algorithm="maxim a")
Output:
(b*e*n*log(b*x + a)/(b*g*h - a*h^2) - d*e*n*log(d*x + c)/(d*g*h - c*h^2) - (b*c*e*n - a*d*e*n)*log(h*x + g)/((d*g*h - c*h^2)*a - (d*g^2 - c*g*h)*b)) *B/e - B*log((b*x + a)^n*e/(d*x + c)^n)/(h^2*x + g*h) - A/(h^2*x + g*h)
Time = 0.15 (sec) , antiderivative size = 169, normalized size of antiderivative = 1.41 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(g+h x)^2} \, dx=\frac {B b^{2} n \log \left ({\left | b x + a \right |}\right )}{b^{2} g h - a b h^{2}} - \frac {B d^{2} n \log \left ({\left | -d x - c \right |}\right )}{d^{2} g h - c d h^{2}} - \frac {B n \log \left (b x + a\right )}{h^{2} x + g h} + \frac {B n \log \left (d x + c\right )}{h^{2} x + g h} + \frac {{\left (B b c n - B a d n\right )} \log \left (h x + g\right )}{b d g^{2} - b c g h - a d g h + a c h^{2}} - \frac {B \log \left (e\right ) + A}{h^{2} x + g h} \] Input:
integrate((A+B*log(e*(b*x+a)^n/((d*x+c)^n)))/(h*x+g)^2,x, algorithm="giac" )
Output:
B*b^2*n*log(abs(b*x + a))/(b^2*g*h - a*b*h^2) - B*d^2*n*log(abs(-d*x - c)) /(d^2*g*h - c*d*h^2) - B*n*log(b*x + a)/(h^2*x + g*h) + B*n*log(d*x + c)/( h^2*x + g*h) + (B*b*c*n - B*a*d*n)*log(h*x + g)/(b*d*g^2 - b*c*g*h - a*d*g *h + a*c*h^2) - (B*log(e) + A)/(h^2*x + g*h)
Time = 25.86 (sec) , antiderivative size = 141, normalized size of antiderivative = 1.18 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(g+h x)^2} \, dx=\frac {B\,d\,n\,\ln \left (c+d\,x\right )}{c\,h^2-d\,g\,h}-\frac {\ln \left (g+h\,x\right )\,\left (B\,a\,d\,n-B\,b\,c\,n\right )}{a\,c\,h^2+b\,d\,g^2-a\,d\,g\,h-b\,c\,g\,h}-\frac {B\,\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )}{h\,\left (g+h\,x\right )}-\frac {B\,b\,n\,\ln \left (a+b\,x\right )}{a\,h^2-b\,g\,h}-\frac {A}{x\,h^2+g\,h} \] Input:
int((A + B*log((e*(a + b*x)^n)/(c + d*x)^n))/(g + h*x)^2,x)
Output:
(B*d*n*log(c + d*x))/(c*h^2 - d*g*h) - (log(g + h*x)*(B*a*d*n - B*b*c*n))/ (a*c*h^2 + b*d*g^2 - a*d*g*h - b*c*g*h) - (B*log((e*(a + b*x)^n)/(c + d*x) ^n))/(h*(g + h*x)) - (B*b*n*log(a + b*x))/(a*h^2 - b*g*h) - A/(g*h + h^2*x )
Time = 0.29 (sec) , antiderivative size = 392, normalized size of antiderivative = 3.27 \[ \int \frac {A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )}{(g+h x)^2} \, dx=\frac {-\mathrm {log}\left (b x +a \right ) a b c g h n -\mathrm {log}\left (b x +a \right ) a b c \,h^{2} n x +\mathrm {log}\left (b x +a \right ) a b d \,g^{2} n +\mathrm {log}\left (b x +a \right ) a b d g h n x +\mathrm {log}\left (d x +c \right ) a b c g h n +\mathrm {log}\left (d x +c \right ) a b c \,h^{2} n x -\mathrm {log}\left (d x +c \right ) b^{2} c \,g^{2} n -\mathrm {log}\left (d x +c \right ) b^{2} c g h n x -\mathrm {log}\left (h x +g \right ) a b d \,g^{2} n -\mathrm {log}\left (h x +g \right ) a b d g h n x +\mathrm {log}\left (h x +g \right ) b^{2} c \,g^{2} n +\mathrm {log}\left (h x +g \right ) b^{2} c g h n x +\mathrm {log}\left (\frac {\left (b x +a \right )^{n} e}{\left (d x +c \right )^{n}}\right ) a b c \,h^{2} x -\mathrm {log}\left (\frac {\left (b x +a \right )^{n} e}{\left (d x +c \right )^{n}}\right ) a b d g h x -\mathrm {log}\left (\frac {\left (b x +a \right )^{n} e}{\left (d x +c \right )^{n}}\right ) b^{2} c g h x +\mathrm {log}\left (\frac {\left (b x +a \right )^{n} e}{\left (d x +c \right )^{n}}\right ) b^{2} d \,g^{2} x +a^{2} c \,h^{2} x -a^{2} d g h x -a b c g h x +a b d \,g^{2} x}{g \left (a c \,h^{3} x -a d g \,h^{2} x -b c g \,h^{2} x +b d \,g^{2} h x +a c g \,h^{2}-a d \,g^{2} h -b c \,g^{2} h +b d \,g^{3}\right )} \] Input:
int((A+B*log(e*(b*x+a)^n/((d*x+c)^n)))/(h*x+g)^2,x)
Output:
( - log(a + b*x)*a*b*c*g*h*n - log(a + b*x)*a*b*c*h**2*n*x + log(a + b*x)* a*b*d*g**2*n + log(a + b*x)*a*b*d*g*h*n*x + log(c + d*x)*a*b*c*g*h*n + log (c + d*x)*a*b*c*h**2*n*x - log(c + d*x)*b**2*c*g**2*n - log(c + d*x)*b**2* c*g*h*n*x - log(g + h*x)*a*b*d*g**2*n - log(g + h*x)*a*b*d*g*h*n*x + log(g + h*x)*b**2*c*g**2*n + log(g + h*x)*b**2*c*g*h*n*x + log(((a + b*x)**n*e) /(c + d*x)**n)*a*b*c*h**2*x - log(((a + b*x)**n*e)/(c + d*x)**n)*a*b*d*g*h *x - log(((a + b*x)**n*e)/(c + d*x)**n)*b**2*c*g*h*x + log(((a + b*x)**n*e )/(c + d*x)**n)*b**2*d*g**2*x + a**2*c*h**2*x - a**2*d*g*h*x - a*b*c*g*h*x + a*b*d*g**2*x)/(g*(a*c*g*h**2 + a*c*h**3*x - a*d*g**2*h - a*d*g*h**2*x - b*c*g**2*h - b*c*g*h**2*x + b*d*g**3 + b*d*g**2*h*x))