Integrand size = 27, antiderivative size = 74 \[ \int \frac {a+b \log \left (c (d+e x)^n\right )}{\left (f+\frac {g}{x}\right )^2 x^2} \, dx=-\frac {b e n \log (d+e x)}{f (d f-e g)}-\frac {a+b \log \left (c (d+e x)^n\right )}{f (g+f x)}+\frac {b e n \log (g+f x)}{f (d f-e g)} \] Output:
-b*e*n*ln(e*x+d)/f/(d*f-e*g)-(a+b*ln(c*(e*x+d)^n))/f/(f*x+g)+b*e*n*ln(f*x+ g)/f/(d*f-e*g)
Time = 0.08 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.77 \[ \int \frac {a+b \log \left (c (d+e x)^n\right )}{\left (f+\frac {g}{x}\right )^2 x^2} \, dx=\frac {-\frac {a+b \log \left (c (d+e x)^n\right )}{g+f x}+\frac {b e n (\log (d+e x)-\log (g+f x))}{-d f+e g}}{f} \] Input:
Integrate[(a + b*Log[c*(d + e*x)^n])/((f + g/x)^2*x^2),x]
Output:
(-((a + b*Log[c*(d + e*x)^n])/(g + f*x)) + (b*e*n*(Log[d + e*x] - Log[g + f*x]))/(-(d*f) + e*g))/f
Time = 0.39 (sec) , antiderivative size = 70, normalized size of antiderivative = 0.95, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2005, 2842, 47, 16}
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 {a+b \log \left (c (d+e x)^n\right )}{x^2 \left (f+\frac {g}{x}\right )^2} \, dx\) |
\(\Big \downarrow \) 2005 |
\(\displaystyle \int \frac {a+b \log \left (c (d+e x)^n\right )}{(f x+g)^2}dx\) |
\(\Big \downarrow \) 2842 |
\(\displaystyle \frac {b e n \int \frac {1}{(d+e x) (g+f x)}dx}{f}-\frac {a+b \log \left (c (d+e x)^n\right )}{f (f x+g)}\) |
\(\Big \downarrow \) 47 |
\(\displaystyle \frac {b e n \left (\frac {f \int \frac {1}{g+f x}dx}{d f-e g}-\frac {e \int \frac {1}{d+e x}dx}{d f-e g}\right )}{f}-\frac {a+b \log \left (c (d+e x)^n\right )}{f (f x+g)}\) |
\(\Big \downarrow \) 16 |
\(\displaystyle \frac {b e n \left (\frac {\log (f x+g)}{d f-e g}-\frac {\log (d+e x)}{d f-e g}\right )}{f}-\frac {a+b \log \left (c (d+e x)^n\right )}{f (f x+g)}\) |
Input:
Int[(a + b*Log[c*(d + e*x)^n])/((f + g/x)^2*x^2),x]
Output:
-((a + b*Log[c*(d + e*x)^n])/(f*(g + f*x))) + (b*e*n*(-(Log[d + e*x]/(d*f - e*g)) + Log[g + f*x]/(d*f - e*g)))/f
Int[(c_.)/((a_.) + (b_.)*(x_)), x_Symbol] :> Simp[c*(Log[RemoveContent[a + b*x, x]]/b), x] /; FreeQ[{a, b, c}, x]
Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Simp[b/(b*c - a*d) Int[1/(a + b*x), x], x] - Simp[d/(b*c - a*d) Int[1/(c + d*x), x ], x] /; FreeQ[{a, b, c, d}, x]
Int[(Fx_)*(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[x^(m + n*p)*(b + a/x^n)^p*Fx, x] /; FreeQ[{a, b, m, n}, x] && IntegerQ[p] && Neg Q[n]
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_ ))^(q_.), x_Symbol] :> Simp[(f + g*x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/( g*(q + 1))), x] - Simp[b*e*(n/(g*(q + 1))) Int[(f + g*x)^(q + 1)/(d + e*x ), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]
Time = 0.94 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.72
method | result | size |
parallelrisch | \(-\frac {\ln \left (e x +d \right ) x b \,e^{2} f n -\ln \left (f x +g \right ) x b \,e^{2} f n +\ln \left (e x +d \right ) b \,e^{2} g n -\ln \left (f x +g \right ) b \,e^{2} g n +\ln \left (c \left (e x +d \right )^{n}\right ) b d e f -\ln \left (c \left (e x +d \right )^{n}\right ) b \,e^{2} g +a d e f -a \,e^{2} g}{\left (d f -e g \right ) \left (f x +g \right ) e f}\) | \(127\) |
risch | \(-\frac {b \ln \left (\left (e x +d \right )^{n}\right )}{f \left (f x +g \right )}-\frac {i \pi b e g \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}-i \pi b e g \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} \operatorname {csgn}\left (i c \right )-i \operatorname {csgn}\left (i \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \right ) \pi b d f -i \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3} \pi b d f -i \pi b e g \,\operatorname {csgn}\left (i \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}+i \operatorname {csgn}\left (i \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} \pi b d f +i \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} \operatorname {csgn}\left (i c \right ) \pi b d f +i \pi b e g \,\operatorname {csgn}\left (i \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \right )+2 \ln \left (e x +d \right ) b e f n x -2 \ln \left (-f x -g \right ) b e f n x +2 \ln \left (e x +d \right ) b e g n -2 \ln \left (-f x -g \right ) b e g n +2 \ln \left (c \right ) b d f -2 \ln \left (c \right ) b e g +2 a d f -2 a e g}{2 \left (f x +g \right ) f \left (d f -e g \right )}\) | \(354\) |
Input:
int((a+b*ln(c*(e*x+d)^n))/(f+g/x)^2/x^2,x,method=_RETURNVERBOSE)
Output:
-(ln(e*x+d)*x*b*e^2*f*n-ln(f*x+g)*x*b*e^2*f*n+ln(e*x+d)*b*e^2*g*n-ln(f*x+g )*b*e^2*g*n+ln(c*(e*x+d)^n)*b*d*e*f-ln(c*(e*x+d)^n)*b*e^2*g+a*d*e*f-a*e^2* g)/(d*f-e*g)/(f*x+g)/e/f
Time = 0.11 (sec) , antiderivative size = 95, normalized size of antiderivative = 1.28 \[ \int \frac {a+b \log \left (c (d+e x)^n\right )}{\left (f+\frac {g}{x}\right )^2 x^2} \, dx=-\frac {a d f - a e g + {\left (b e f n x + b d f n\right )} \log \left (e x + d\right ) - {\left (b e f n x + b e g n\right )} \log \left (f x + g\right ) + {\left (b d f - b e g\right )} \log \left (c\right )}{d f^{2} g - e f g^{2} + {\left (d f^{3} - e f^{2} g\right )} x} \] Input:
integrate((a+b*log(c*(e*x+d)^n))/(f+g/x)^2/x^2,x, algorithm="fricas")
Output:
-(a*d*f - a*e*g + (b*e*f*n*x + b*d*f*n)*log(e*x + d) - (b*e*f*n*x + b*e*g* n)*log(f*x + g) + (b*d*f - b*e*g)*log(c))/(d*f^2*g - e*f*g^2 + (d*f^3 - e* f^2*g)*x)
Leaf count of result is larger than twice the leaf count of optimal. 333 vs. \(2 (60) = 120\).
Time = 23.09 (sec) , antiderivative size = 333, normalized size of antiderivative = 4.50 \[ \int \frac {a+b \log \left (c (d+e x)^n\right )}{\left (f+\frac {g}{x}\right )^2 x^2} \, dx=\begin {cases} \frac {a x + \frac {b d \log {\left (c \left (d + e x\right )^{n} \right )}}{e} - b n x + b x \log {\left (c \left (d + e x\right )^{n} \right )}}{g^{2}} & \text {for}\: f = 0 \\- \frac {a}{f^{2} x + f g} - \frac {b n}{f^{2} x + f g} - \frac {b \log {\left (c \left (e x + \frac {e g}{f}\right )^{n} \right )}}{f^{2} x + f g} & \text {for}\: d = \frac {e g}{f} \\- \frac {a d f}{d f^{3} x + d f^{2} g - e f^{2} g x - e f g^{2}} + \frac {a e g}{d f^{3} x + d f^{2} g - e f^{2} g x - e f g^{2}} - \frac {b d f \log {\left (c \left (d + e x\right )^{n} \right )}}{d f^{3} x + d f^{2} g - e f^{2} g x - e f g^{2}} + \frac {b e f n x \log {\left (x + \frac {g}{f} \right )}}{d f^{3} x + d f^{2} g - e f^{2} g x - e f g^{2}} - \frac {b e f x \log {\left (c \left (d + e x\right )^{n} \right )}}{d f^{3} x + d f^{2} g - e f^{2} g x - e f g^{2}} + \frac {b e g n \log {\left (x + \frac {g}{f} \right )}}{d f^{3} x + d f^{2} g - e f^{2} g x - e f g^{2}} & \text {otherwise} \end {cases} \] Input:
integrate((a+b*ln(c*(e*x+d)**n))/(f+g/x)**2/x**2,x)
Output:
Piecewise(((a*x + b*d*log(c*(d + e*x)**n)/e - b*n*x + b*x*log(c*(d + e*x)* *n))/g**2, Eq(f, 0)), (-a/(f**2*x + f*g) - b*n/(f**2*x + f*g) - b*log(c*(e *x + e*g/f)**n)/(f**2*x + f*g), Eq(d, e*g/f)), (-a*d*f/(d*f**3*x + d*f**2* g - e*f**2*g*x - e*f*g**2) + a*e*g/(d*f**3*x + d*f**2*g - e*f**2*g*x - e*f *g**2) - b*d*f*log(c*(d + e*x)**n)/(d*f**3*x + d*f**2*g - e*f**2*g*x - e*f *g**2) + b*e*f*n*x*log(x + g/f)/(d*f**3*x + d*f**2*g - e*f**2*g*x - e*f*g* *2) - b*e*f*x*log(c*(d + e*x)**n)/(d*f**3*x + d*f**2*g - e*f**2*g*x - e*f* g**2) + b*e*g*n*log(x + g/f)/(d*f**3*x + d*f**2*g - e*f**2*g*x - e*f*g**2) , True))
Time = 0.03 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.16 \[ \int \frac {a+b \log \left (c (d+e x)^n\right )}{\left (f+\frac {g}{x}\right )^2 x^2} \, dx=-b e n {\left (\frac {\log \left (e x + d\right )}{d f^{2} - e f g} - \frac {\log \left (f x + g\right )}{d f^{2} - e f g}\right )} - \frac {b \log \left ({\left (e x + d\right )}^{n} c\right )}{f^{2} x + f g} - \frac {a}{f^{2} x + f g} \] Input:
integrate((a+b*log(c*(e*x+d)^n))/(f+g/x)^2/x^2,x, algorithm="maxima")
Output:
-b*e*n*(log(e*x + d)/(d*f^2 - e*f*g) - log(f*x + g)/(d*f^2 - e*f*g)) - b*l og((e*x + d)^n*c)/(f^2*x + f*g) - a/(f^2*x + f*g)
Time = 0.12 (sec) , antiderivative size = 88, normalized size of antiderivative = 1.19 \[ \int \frac {a+b \log \left (c (d+e x)^n\right )}{\left (f+\frac {g}{x}\right )^2 x^2} \, dx=-\frac {b e n \log \left (e x + d\right )}{d f^{2} - e f g} + \frac {b e n \log \left (f x + g\right )}{d f^{2} - e f g} - \frac {b n \log \left (e x + d\right )}{f^{2} x + f g} - \frac {b \log \left (c\right ) + a}{f^{2} x + f g} \] Input:
integrate((a+b*log(c*(e*x+d)^n))/(f+g/x)^2/x^2,x, algorithm="giac")
Output:
-b*e*n*log(e*x + d)/(d*f^2 - e*f*g) + b*e*n*log(f*x + g)/(d*f^2 - e*f*g) - b*n*log(e*x + d)/(f^2*x + f*g) - (b*log(c) + a)/(f^2*x + f*g)
Time = 27.00 (sec) , antiderivative size = 84, normalized size of antiderivative = 1.14 \[ \int \frac {a+b \log \left (c (d+e x)^n\right )}{\left (f+\frac {g}{x}\right )^2 x^2} \, dx=-\frac {a}{x\,f^2+g\,f}-\frac {b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )}{f\,\left (g+f\,x\right )}+\frac {b\,e\,n\,\mathrm {atan}\left (\frac {e\,g\,2{}\mathrm {i}+e\,f\,x\,2{}\mathrm {i}}{d\,f-e\,g}+1{}\mathrm {i}\right )\,2{}\mathrm {i}}{f\,\left (d\,f-e\,g\right )} \] Input:
int((a + b*log(c*(d + e*x)^n))/(x^2*(f + g/x)^2),x)
Output:
(b*e*n*atan((e*g*2i + e*f*x*2i)/(d*f - e*g) + 1i)*2i)/(f*(d*f - e*g)) - (b *log(c*(d + e*x)^n))/(f*(g + f*x)) - a/(f*g + f^2*x)
Time = 0.18 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.82 \[ \int \frac {a+b \log \left (c (d+e x)^n\right )}{\left (f+\frac {g}{x}\right )^2 x^2} \, dx=\frac {\mathrm {log}\left (f x +g \right ) b e f g n x +\mathrm {log}\left (f x +g \right ) b e \,g^{2} n -\mathrm {log}\left (e x +d \right ) b d \,f^{2} n x -\mathrm {log}\left (e x +d \right ) b d f g n +\mathrm {log}\left (\left (e x +d \right )^{n} c \right ) b d \,f^{2} x -\mathrm {log}\left (\left (e x +d \right )^{n} c \right ) b e f g x +a d \,f^{2} x -a e f g x}{f g \left (d \,f^{2} x -e f g x +d f g -e \,g^{2}\right )} \] Input:
int((a+b*log(c*(e*x+d)^n))/(f+g/x)^2/x^2,x)
Output:
(log(f*x + g)*b*e*f*g*n*x + log(f*x + g)*b*e*g**2*n - log(d + e*x)*b*d*f** 2*n*x - log(d + e*x)*b*d*f*g*n + log((d + e*x)**n*c)*b*d*f**2*x - log((d + e*x)**n*c)*b*e*f*g*x + a*d*f**2*x - a*e*f*g*x)/(f*g*(d*f**2*x + d*f*g - e *f*g*x - e*g**2))