Integrand size = 25, antiderivative size = 94 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x \left (d+e x^r\right )} \, dx=-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {d x^{-r}}{e}\right )}{d r}+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \operatorname {PolyLog}\left (2,-\frac {d x^{-r}}{e}\right )}{d r^2}+\frac {2 b^2 n^2 \operatorname {PolyLog}\left (3,-\frac {d x^{-r}}{e}\right )}{d r^3} \] Output:
-(a+b*ln(c*x^n))^2*ln(1+d/e/(x^r))/d/r+2*b*n*(a+b*ln(c*x^n))*polylog(2,-d/ e/(x^r))/d/r^2+2*b^2*n^2*polylog(3,-d/e/(x^r))/d/r^3
Leaf count is larger than twice the leaf count of optimal. \(270\) vs. \(2(94)=188\).
Time = 0.35 (sec) , antiderivative size = 270, normalized size of antiderivative = 2.87 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x \left (d+e x^r\right )} \, dx=-\frac {a^2 r^2 \log \left (d-d x^r\right )-2 a b r^2 \left (n \log (x)-\log \left (c x^n\right )\right ) \log \left (d-d x^r\right )+b^2 r^2 \left (-n \log (x)+\log \left (c x^n\right )\right )^2 \log \left (d-d x^r\right )-2 a b n r \left (\frac {1}{2} r^2 \log ^2(x)+\left (-r \log (x)+\log \left (-\frac {e x^r}{d}\right )\right ) \log \left (d+e x^r\right )+\operatorname {PolyLog}\left (2,1+\frac {e x^r}{d}\right )\right )+2 b^2 n r \left (n \log (x)-\log \left (c x^n\right )\right ) \left (\frac {1}{2} r^2 \log ^2(x)+\left (-r \log (x)+\log \left (-\frac {e x^r}{d}\right )\right ) \log \left (d+e x^r\right )+\operatorname {PolyLog}\left (2,1+\frac {e x^r}{d}\right )\right )+b^2 n^2 \left (r^2 \log ^2(x) \log \left (1+\frac {d x^{-r}}{e}\right )-2 r \log (x) \operatorname {PolyLog}\left (2,-\frac {d x^{-r}}{e}\right )-2 \operatorname {PolyLog}\left (3,-\frac {d x^{-r}}{e}\right )\right )}{d r^3} \] Input:
Integrate[(a + b*Log[c*x^n])^2/(x*(d + e*x^r)),x]
Output:
-((a^2*r^2*Log[d - d*x^r] - 2*a*b*r^2*(n*Log[x] - Log[c*x^n])*Log[d - d*x^ r] + b^2*r^2*(-(n*Log[x]) + Log[c*x^n])^2*Log[d - d*x^r] - 2*a*b*n*r*((r^2 *Log[x]^2)/2 + (-(r*Log[x]) + Log[-((e*x^r)/d)])*Log[d + e*x^r] + PolyLog[ 2, 1 + (e*x^r)/d]) + 2*b^2*n*r*(n*Log[x] - Log[c*x^n])*((r^2*Log[x]^2)/2 + (-(r*Log[x]) + Log[-((e*x^r)/d)])*Log[d + e*x^r] + PolyLog[2, 1 + (e*x^r) /d]) + b^2*n^2*(r^2*Log[x]^2*Log[1 + d/(e*x^r)] - 2*r*Log[x]*PolyLog[2, -( d/(e*x^r))] - 2*PolyLog[3, -(d/(e*x^r))]))/(d*r^3))
Time = 0.45 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.97, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {2779, 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 (a+b \log \left (c x^n\right )\right )^2}{x \left (d+e x^r\right )} \, dx\) |
\(\Big \downarrow \) 2779 |
\(\displaystyle \frac {2 b n \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (\frac {d x^{-r}}{e}+1\right )}{x}dx}{d r}-\frac {\log \left (\frac {d x^{-r}}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{d r}\) |
\(\Big \downarrow \) 2821 |
\(\displaystyle \frac {2 b n \left (\frac {\operatorname {PolyLog}\left (2,-\frac {d x^{-r}}{e}\right ) \left (a+b \log \left (c x^n\right )\right )}{r}-\frac {b n \int \frac {\operatorname {PolyLog}\left (2,-\frac {d x^{-r}}{e}\right )}{x}dx}{r}\right )}{d r}-\frac {\log \left (\frac {d x^{-r}}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{d r}\) |
\(\Big \downarrow \) 7143 |
\(\displaystyle \frac {2 b n \left (\frac {\operatorname {PolyLog}\left (2,-\frac {d x^{-r}}{e}\right ) \left (a+b \log \left (c x^n\right )\right )}{r}+\frac {b n \operatorname {PolyLog}\left (3,-\frac {d x^{-r}}{e}\right )}{r^2}\right )}{d r}-\frac {\log \left (\frac {d x^{-r}}{e}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{d r}\) |
Input:
Int[(a + b*Log[c*x^n])^2/(x*(d + e*x^r)),x]
Output:
-(((a + b*Log[c*x^n])^2*Log[1 + d/(e*x^r)])/(d*r)) + (2*b*n*(((a + b*Log[c *x^n])*PolyLog[2, -(d/(e*x^r))])/r + (b*n*PolyLog[3, -(d/(e*x^r))])/r^2))/ (d*r)
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^(r _.))), x_Symbol] :> Simp[(-Log[1 + d/(e*x^r)])*((a + b*Log[c*x^n])^p/(d*r)) , x] + Simp[b*n*(p/(d*r)) Int[Log[1 + d/(e*x^r)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, n, r}, 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[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]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.90 (sec) , antiderivative size = 580, normalized size of antiderivative = 6.17
method | result | size |
risch | \(-\frac {b^{2} \ln \left (d +e \,x^{r}\right ) \ln \left (x \right )^{2} n^{2}}{r d}+\frac {2 b^{2} \ln \left (d +e \,x^{r}\right ) \ln \left (x \right ) \ln \left (x^{n}\right ) n}{r d}-\frac {b^{2} \ln \left (d +e \,x^{r}\right ) \ln \left (x^{n}\right )^{2}}{r d}+\frac {b^{2} \ln \left (x^{r}\right ) \ln \left (x \right )^{2} n^{2}}{r d}-\frac {2 b^{2} \ln \left (x^{r}\right ) \ln \left (x \right ) \ln \left (x^{n}\right ) n}{r d}+\frac {b^{2} \ln \left (x^{r}\right ) \ln \left (x^{n}\right )^{2}}{r d}-\frac {2 b^{2} n^{2} \ln \left (x \right )^{3}}{3 d}+\frac {b^{2} n^{2} \ln \left (x \right )^{2} \ln \left (1+\frac {e \,x^{r}}{d}\right )}{r d}+\frac {2 b^{2} n^{2} \operatorname {polylog}\left (3, -\frac {e \,x^{r}}{d}\right )}{r^{3} d}+\frac {b^{2} n \ln \left (x \right )^{2} \ln \left (x^{n}\right )}{d}-\frac {2 b^{2} n \ln \left (x \right ) \ln \left (x^{n}\right ) \ln \left (1+\frac {e \,x^{r}}{d}\right )}{r d}-\frac {2 b^{2} n \ln \left (x^{n}\right ) \operatorname {polylog}\left (2, -\frac {e \,x^{r}}{d}\right )}{r^{2} d}+\frac {\left (i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )-i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )+2 b \ln \left (c \right )+2 a \right ) b \left (\left (\ln \left (x^{n}\right )-n \ln \left (x \right )\right ) \left (-\frac {\ln \left (d +e \,x^{r}\right )}{d}+\frac {\ln \left (x^{r}\right )}{d}\right )-\frac {n \left (-\frac {r^{2} \ln \left (x \right )^{2}}{2}+r \ln \left (x \right ) \ln \left (1+\frac {e \,x^{r}}{d}\right )+\operatorname {polylog}\left (2, -\frac {e \,x^{r}}{d}\right )\right )}{r d}\right )}{r}+\frac {{\left (i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}-i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )-i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}+i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )+2 b \ln \left (c \right )+2 a \right )}^{2} \left (-\frac {\ln \left (d +e \,x^{r}\right )}{r d}+\frac {\ln \left (x^{r}\right )}{r d}\right )}{4}\) | \(580\) |
Input:
int((a+b*ln(c*x^n))^2/x/(d+e*x^r),x,method=_RETURNVERBOSE)
Output:
-b^2/r/d*ln(d+e*x^r)*ln(x)^2*n^2+2*b^2/r/d*ln(d+e*x^r)*ln(x)*ln(x^n)*n-b^2 /r/d*ln(d+e*x^r)*ln(x^n)^2+b^2/r/d*ln(x^r)*ln(x)^2*n^2-2*b^2/r/d*ln(x^r)*l n(x)*ln(x^n)*n+b^2/r/d*ln(x^r)*ln(x^n)^2-2/3*b^2*n^2/d*ln(x)^3+b^2/r*n^2/d *ln(x)^2*ln(1+e*x^r/d)+2*b^2/r^3*n^2/d*polylog(3,-e*x^r/d)+b^2*n/d*ln(x)^2 *ln(x^n)-2*b^2/r*n/d*ln(x)*ln(x^n)*ln(1+e*x^r/d)-2*b^2/r^2*n/d*ln(x^n)*pol ylog(2,-e*x^r/d)+(I*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2-I*Pi*b*csgn(I*x^n)*cs gn(I*c*x^n)*csgn(I*c)-I*Pi*b*csgn(I*c*x^n)^3+I*Pi*b*csgn(I*c*x^n)^2*csgn(I *c)+2*b*ln(c)+2*a)*b/r*((ln(x^n)-n*ln(x))*(-1/d*ln(d+e*x^r)+1/d*ln(x^r))-n /r/d*(-1/2*r^2*ln(x)^2+r*ln(x)*ln(1+e*x^r/d)+polylog(2,-e*x^r/d)))+1/4*(I* Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2-I*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c )-I*Pi*b*csgn(I*c*x^n)^3+I*Pi*b*csgn(I*c*x^n)^2*csgn(I*c)+2*b*ln(c)+2*a)^2 *(-1/r/d*ln(d+e*x^r)+1/r/d*ln(x^r))
Leaf count of result is larger than twice the leaf count of optimal. 228 vs. \(2 (93) = 186\).
Time = 0.09 (sec) , antiderivative size = 228, normalized size of antiderivative = 2.43 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x \left (d+e x^r\right )} \, dx=\frac {b^{2} n^{2} r^{3} \log \left (x\right )^{3} + 6 \, b^{2} n^{2} {\rm polylog}\left (3, -\frac {e x^{r}}{d}\right ) + 3 \, {\left (b^{2} n r^{3} \log \left (c\right ) + a b n r^{3}\right )} \log \left (x\right )^{2} - 6 \, {\left (b^{2} n^{2} r \log \left (x\right ) + b^{2} n r \log \left (c\right ) + a b n r\right )} {\rm Li}_2\left (-\frac {e x^{r} + d}{d} + 1\right ) - 3 \, {\left (b^{2} r^{2} \log \left (c\right )^{2} + 2 \, a b r^{2} \log \left (c\right ) + a^{2} r^{2}\right )} \log \left (e x^{r} + d\right ) + 3 \, {\left (b^{2} r^{3} \log \left (c\right )^{2} + 2 \, a b r^{3} \log \left (c\right ) + a^{2} r^{3}\right )} \log \left (x\right ) - 3 \, {\left (b^{2} n^{2} r^{2} \log \left (x\right )^{2} + 2 \, {\left (b^{2} n r^{2} \log \left (c\right ) + a b n r^{2}\right )} \log \left (x\right )\right )} \log \left (\frac {e x^{r} + d}{d}\right )}{3 \, d r^{3}} \] Input:
integrate((a+b*log(c*x^n))^2/x/(d+e*x^r),x, algorithm="fricas")
Output:
1/3*(b^2*n^2*r^3*log(x)^3 + 6*b^2*n^2*polylog(3, -e*x^r/d) + 3*(b^2*n*r^3* log(c) + a*b*n*r^3)*log(x)^2 - 6*(b^2*n^2*r*log(x) + b^2*n*r*log(c) + a*b* n*r)*dilog(-(e*x^r + d)/d + 1) - 3*(b^2*r^2*log(c)^2 + 2*a*b*r^2*log(c) + a^2*r^2)*log(e*x^r + d) + 3*(b^2*r^3*log(c)^2 + 2*a*b*r^3*log(c) + a^2*r^3 )*log(x) - 3*(b^2*n^2*r^2*log(x)^2 + 2*(b^2*n*r^2*log(c) + a*b*n*r^2)*log( x))*log((e*x^r + d)/d))/(d*r^3)
\[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x \left (d+e x^r\right )} \, dx=\int \frac {\left (a + b \log {\left (c x^{n} \right )}\right )^{2}}{x \left (d + e x^{r}\right )}\, dx \] Input:
integrate((a+b*ln(c*x**n))**2/x/(d+e*x**r),x)
Output:
Integral((a + b*log(c*x**n))**2/(x*(d + e*x**r)), x)
\[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x \left (d+e x^r\right )} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )}^{2}}{{\left (e x^{r} + d\right )} x} \,d x } \] Input:
integrate((a+b*log(c*x^n))^2/x/(d+e*x^r),x, algorithm="maxima")
Output:
a^2*(log(x)/d - log((e*x^r + d)/e)/(d*r)) + integrate((b^2*log(c)^2 + b^2* log(x^n)^2 + 2*a*b*log(c) + 2*(b^2*log(c) + a*b)*log(x^n))/(e*x*x^r + d*x) , x)
\[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x \left (d+e x^r\right )} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )}^{2}}{{\left (e x^{r} + d\right )} x} \,d x } \] Input:
integrate((a+b*log(c*x^n))^2/x/(d+e*x^r),x, algorithm="giac")
Output:
integrate((b*log(c*x^n) + a)^2/((e*x^r + d)*x), x)
Timed out. \[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x \left (d+e x^r\right )} \, dx=\int \frac {{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{x\,\left (d+e\,x^r\right )} \,d x \] Input:
int((a + b*log(c*x^n))^2/(x*(d + e*x^r)),x)
Output:
int((a + b*log(c*x^n))^2/(x*(d + e*x^r)), x)
\[ \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x \left (d+e x^r\right )} \, dx=\frac {\left (\int \frac {\mathrm {log}\left (x^{n} c \right )^{2}}{x^{r} e x +d x}d x \right ) b^{2} d r +2 \left (\int \frac {\mathrm {log}\left (x^{n} c \right )}{x^{r} e x +d x}d x \right ) a b d r -\mathrm {log}\left (x^{r} e +d \right ) a^{2}+\mathrm {log}\left (x \right ) a^{2} r}{d r} \] Input:
int((a+b*log(c*x^n))^2/x/(d+e*x^r),x)
Output:
(int(log(x**n*c)**2/(x**r*e*x + d*x),x)*b**2*d*r + 2*int(log(x**n*c)/(x**r *e*x + d*x),x)*a*b*d*r - log(x**r*e + d)*a**2 + log(x)*a**2*r)/(d*r)