Integrand size = 23, antiderivative size = 163 \[ \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{\left (d+e x^2\right )^2} \, dx=\frac {b n \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{2 \sqrt {d} e^{3/2}}-\frac {x \left (a+b \log \left (c x^n\right )\right )}{2 e \left (d+e x^2\right )}+\frac {\arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 \sqrt {d} e^{3/2}}-\frac {b n \operatorname {PolyLog}\left (2,-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{4 \sqrt {-d} e^{3/2}}+\frac {b n \operatorname {PolyLog}\left (2,\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{4 \sqrt {-d} e^{3/2}} \] Output:
1/2*b*n*arctan(e^(1/2)*x/d^(1/2))/d^(1/2)/e^(3/2)-1/2*x*(a+b*ln(c*x^n))/e/ (e*x^2+d)+1/2*arctan(e^(1/2)*x/d^(1/2))*(a+b*ln(c*x^n))/d^(1/2)/e^(3/2)-1/ 4*b*n*polylog(2,-e^(1/2)*x/(-d)^(1/2))/(-d)^(1/2)/e^(3/2)+1/4*b*n*polylog( 2,e^(1/2)*x/(-d)^(1/2))/(-d)^(1/2)/e^(3/2)
Time = 0.60 (sec) , antiderivative size = 258, normalized size of antiderivative = 1.58 \[ \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{\left (d+e x^2\right )^2} \, dx=\frac {\frac {a+b \log \left (c x^n\right )}{\sqrt {-d}-\sqrt {e} x}-\frac {a+b \log \left (c x^n\right )}{\sqrt {-d}+\sqrt {e} x}+\frac {b d n \left (\log (x)-\log \left (\sqrt {-d}-\sqrt {e} x\right )\right )}{(-d)^{3/2}}+\frac {b n \left (\log (x)-\log \left (\sqrt {-d}+\sqrt {e} x\right )\right )}{\sqrt {-d}}+\frac {d \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{(-d)^{3/2}}+\frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {d \sqrt {e} x}{(-d)^{3/2}}\right )}{\sqrt {-d}}+\frac {b n \operatorname {PolyLog}\left (2,\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{\sqrt {-d}}+\frac {b d n \operatorname {PolyLog}\left (2,\frac {d \sqrt {e} x}{(-d)^{3/2}}\right )}{(-d)^{3/2}}}{4 e^{3/2}} \] Input:
Integrate[(x^2*(a + b*Log[c*x^n]))/(d + e*x^2)^2,x]
Output:
((a + b*Log[c*x^n])/(Sqrt[-d] - Sqrt[e]*x) - (a + b*Log[c*x^n])/(Sqrt[-d] + Sqrt[e]*x) + (b*d*n*(Log[x] - Log[Sqrt[-d] - Sqrt[e]*x]))/(-d)^(3/2) + ( b*n*(Log[x] - Log[Sqrt[-d] + Sqrt[e]*x]))/Sqrt[-d] + (d*(a + b*Log[c*x^n]) *Log[1 + (Sqrt[e]*x)/Sqrt[-d]])/(-d)^(3/2) + ((a + b*Log[c*x^n])*Log[1 + ( d*Sqrt[e]*x)/(-d)^(3/2)])/Sqrt[-d] + (b*n*PolyLog[2, (Sqrt[e]*x)/Sqrt[-d]] )/Sqrt[-d] + (b*d*n*PolyLog[2, (d*Sqrt[e]*x)/(-d)^(3/2)])/(-d)^(3/2))/(4*e ^(3/2))
Result contains complex when optimal does not.
Time = 0.48 (sec) , antiderivative size = 164, normalized size of antiderivative = 1.01, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.087, Rules used = {2793, 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 {x^2 \left (a+b \log \left (c x^n\right )\right )}{\left (d+e x^2\right )^2} \, dx\) |
\(\Big \downarrow \) 2793 |
\(\displaystyle \int \left (\frac {a+b \log \left (c x^n\right )}{e \left (d+e x^2\right )}-\frac {d \left (a+b \log \left (c x^n\right )\right )}{e \left (d+e x^2\right )^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 \sqrt {d} e^{3/2}}-\frac {x \left (a+b \log \left (c x^n\right )\right )}{2 e \left (d+e x^2\right )}+\frac {b n \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right )}{2 \sqrt {d} e^{3/2}}-\frac {i b n \operatorname {PolyLog}\left (2,-\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{4 \sqrt {d} e^{3/2}}+\frac {i b n \operatorname {PolyLog}\left (2,\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{4 \sqrt {d} e^{3/2}}\) |
Input:
Int[(x^2*(a + b*Log[c*x^n]))/(d + e*x^2)^2,x]
Output:
(b*n*ArcTan[(Sqrt[e]*x)/Sqrt[d]])/(2*Sqrt[d]*e^(3/2)) - (x*(a + b*Log[c*x^ n]))/(2*e*(d + e*x^2)) + (ArcTan[(Sqrt[e]*x)/Sqrt[d]]*(a + b*Log[c*x^n]))/ (2*Sqrt[d]*e^(3/2)) - ((I/4)*b*n*PolyLog[2, ((-I)*Sqrt[e]*x)/Sqrt[d]])/(Sq rt[d]*e^(3/2)) + ((I/4)*b*n*PolyLog[2, (I*Sqrt[e]*x)/Sqrt[d]])/(Sqrt[d]*e^ (3/2))
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)* (x_)^(r_.))^(q_.), x_Symbol] :> With[{u = ExpandIntegrand[a + b*Log[c*x^n], (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, f, m, n, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[m] && Integer Q[r]))
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.72 (sec) , antiderivative size = 516, normalized size of antiderivative = 3.17
method | result | size |
risch | \(-\frac {b \ln \left (x^{n}\right ) x}{2 e \left (e \,x^{2}+d \right )}-\frac {b \arctan \left (\frac {x e}{\sqrt {d e}}\right ) n \ln \left (x \right )}{2 e \sqrt {d e}}+\frac {b \arctan \left (\frac {x e}{\sqrt {d e}}\right ) \ln \left (x^{n}\right )}{2 e \sqrt {d e}}+\frac {b n \arctan \left (\frac {x e}{\sqrt {d e}}\right )}{2 e \sqrt {d e}}-\frac {b n \ln \left (x \right ) \ln \left (\frac {-e x +\sqrt {-d e}}{\sqrt {-d e}}\right ) x^{2}}{4 \left (e \,x^{2}+d \right ) \sqrt {-d e}}+\frac {b n \ln \left (x \right ) \ln \left (\frac {e x +\sqrt {-d e}}{\sqrt {-d e}}\right ) x^{2}}{4 \left (e \,x^{2}+d \right ) \sqrt {-d e}}-\frac {b n d \ln \left (x \right ) \ln \left (\frac {-e x +\sqrt {-d e}}{\sqrt {-d e}}\right )}{4 e \left (e \,x^{2}+d \right ) \sqrt {-d e}}+\frac {b n d \ln \left (x \right ) \ln \left (\frac {e x +\sqrt {-d e}}{\sqrt {-d e}}\right )}{4 e \left (e \,x^{2}+d \right ) \sqrt {-d e}}+\frac {b n \operatorname {dilog}\left (\frac {-e x +\sqrt {-d e}}{\sqrt {-d e}}\right )}{4 e \sqrt {-d e}}-\frac {b n \operatorname {dilog}\left (\frac {e x +\sqrt {-d e}}{\sqrt {-d e}}\right )}{4 e \sqrt {-d e}}+\frac {b n \ln \left (x \right ) \ln \left (\frac {-e x +\sqrt {-d e}}{\sqrt {-d e}}\right )}{2 e \sqrt {-d e}}-\frac {b n \ln \left (x \right ) \ln \left (\frac {e x +\sqrt {-d e}}{\sqrt {-d e}}\right )}{2 e \sqrt {-d e}}+\left (\frac {i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right )^{2}}{2}-\frac {i b \pi \,\operatorname {csgn}\left (i x^{n}\right ) \operatorname {csgn}\left (i c \,x^{n}\right ) \operatorname {csgn}\left (i c \right )}{2}-\frac {i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{3}}{2}+\frac {i b \pi \operatorname {csgn}\left (i c \,x^{n}\right )^{2} \operatorname {csgn}\left (i c \right )}{2}+b \ln \left (c \right )+a \right ) \left (-\frac {x}{2 e \left (e \,x^{2}+d \right )}+\frac {\arctan \left (\frac {x e}{\sqrt {d e}}\right )}{2 e \sqrt {d e}}\right )\) | \(516\) |
Input:
int(x^2*(a+b*ln(c*x^n))/(e*x^2+d)^2,x,method=_RETURNVERBOSE)
Output:
-1/2*b*ln(x^n)/e*x/(e*x^2+d)-1/2*b/e/(d*e)^(1/2)*arctan(x*e/(d*e)^(1/2))*n *ln(x)+1/2*b/e/(d*e)^(1/2)*arctan(x*e/(d*e)^(1/2))*ln(x^n)+1/2*b*n/e/(d*e) ^(1/2)*arctan(x*e/(d*e)^(1/2))-1/4*b*n*ln(x)/(e*x^2+d)/(-d*e)^(1/2)*ln((-e *x+(-d*e)^(1/2))/(-d*e)^(1/2))*x^2+1/4*b*n*ln(x)/(e*x^2+d)/(-d*e)^(1/2)*ln ((e*x+(-d*e)^(1/2))/(-d*e)^(1/2))*x^2-1/4*b*n*d/e*ln(x)/(e*x^2+d)/(-d*e)^( 1/2)*ln((-e*x+(-d*e)^(1/2))/(-d*e)^(1/2))+1/4*b*n*d/e*ln(x)/(e*x^2+d)/(-d* e)^(1/2)*ln((e*x+(-d*e)^(1/2))/(-d*e)^(1/2))+1/4*b*n/e/(-d*e)^(1/2)*dilog( (-e*x+(-d*e)^(1/2))/(-d*e)^(1/2))-1/4*b*n/e/(-d*e)^(1/2)*dilog((e*x+(-d*e) ^(1/2))/(-d*e)^(1/2))+1/2*b*n/e*ln(x)/(-d*e)^(1/2)*ln((-e*x+(-d*e)^(1/2))/ (-d*e)^(1/2))-1/2*b*n/e*ln(x)/(-d*e)^(1/2)*ln((e*x+(-d*e)^(1/2))/(-d*e)^(1 /2))+(1/2*I*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2-1/2*I*Pi*b*csgn(I*x^n)*csgn(I *c*x^n)*csgn(I*c)-1/2*I*Pi*b*csgn(I*c*x^n)^3+1/2*I*Pi*b*csgn(I*c*x^n)^2*cs gn(I*c)+b*ln(c)+a)*(-1/2/e*x/(e*x^2+d)+1/2/e/(d*e)^(1/2)*arctan(x*e/(d*e)^ (1/2)))
\[ \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{\left (d+e x^2\right )^2} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )} x^{2}}{{\left (e x^{2} + d\right )}^{2}} \,d x } \] Input:
integrate(x^2*(a+b*log(c*x^n))/(e*x^2+d)^2,x, algorithm="fricas")
Output:
integral((b*x^2*log(c*x^n) + a*x^2)/(e^2*x^4 + 2*d*e*x^2 + d^2), x)
\[ \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{\left (d+e x^2\right )^2} \, dx=\int \frac {x^{2} \left (a + b \log {\left (c x^{n} \right )}\right )}{\left (d + e x^{2}\right )^{2}}\, dx \] Input:
integrate(x**2*(a+b*ln(c*x**n))/(e*x**2+d)**2,x)
Output:
Integral(x**2*(a + b*log(c*x**n))/(d + e*x**2)**2, x)
Exception generated. \[ \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{\left (d+e x^2\right )^2} \, dx=\text {Exception raised: ValueError} \] Input:
integrate(x^2*(a+b*log(c*x^n))/(e*x^2+d)^2,x, algorithm="maxima")
Output:
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(e>0)', see `assume?` for more de tails)Is e
\[ \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{\left (d+e x^2\right )^2} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )} x^{2}}{{\left (e x^{2} + d\right )}^{2}} \,d x } \] Input:
integrate(x^2*(a+b*log(c*x^n))/(e*x^2+d)^2,x, algorithm="giac")
Output:
integrate((b*log(c*x^n) + a)*x^2/(e*x^2 + d)^2, x)
Timed out. \[ \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{\left (d+e x^2\right )^2} \, dx=\int \frac {x^2\,\left (a+b\,\ln \left (c\,x^n\right )\right )}{{\left (e\,x^2+d\right )}^2} \,d x \] Input:
int((x^2*(a + b*log(c*x^n)))/(d + e*x^2)^2,x)
Output:
int((x^2*(a + b*log(c*x^n)))/(d + e*x^2)^2, x)
\[ \int \frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{\left (d+e x^2\right )^2} \, dx=\frac {\sqrt {e}\, \sqrt {d}\, \mathit {atan} \left (\frac {e x}{\sqrt {e}\, \sqrt {d}}\right ) a d +\sqrt {e}\, \sqrt {d}\, \mathit {atan} \left (\frac {e x}{\sqrt {e}\, \sqrt {d}}\right ) a e \,x^{2}+2 \sqrt {e}\, \sqrt {d}\, \mathit {atan} \left (\frac {e x}{\sqrt {e}\, \sqrt {d}}\right ) b d n +2 \sqrt {e}\, \sqrt {d}\, \mathit {atan} \left (\frac {e x}{\sqrt {e}\, \sqrt {d}}\right ) b e n \,x^{2}+2 \left (\int \frac {\mathrm {log}\left (x^{n} c \right )}{e^{2} x^{4}+2 d e \,x^{2}+d^{2}}d x \right ) b \,d^{3} e +2 \left (\int \frac {\mathrm {log}\left (x^{n} c \right )}{e^{2} x^{4}+2 d e \,x^{2}+d^{2}}d x \right ) b \,d^{2} e^{2} x^{2}-2 \,\mathrm {log}\left (x^{n} c \right ) b d e x -a d e x}{2 d \,e^{2} \left (e \,x^{2}+d \right )} \] Input:
int(x^2*(a+b*log(c*x^n))/(e*x^2+d)^2,x)
Output:
(sqrt(e)*sqrt(d)*atan((e*x)/(sqrt(e)*sqrt(d)))*a*d + sqrt(e)*sqrt(d)*atan( (e*x)/(sqrt(e)*sqrt(d)))*a*e*x**2 + 2*sqrt(e)*sqrt(d)*atan((e*x)/(sqrt(e)* sqrt(d)))*b*d*n + 2*sqrt(e)*sqrt(d)*atan((e*x)/(sqrt(e)*sqrt(d)))*b*e*n*x* *2 + 2*int(log(x**n*c)/(d**2 + 2*d*e*x**2 + e**2*x**4),x)*b*d**3*e + 2*int (log(x**n*c)/(d**2 + 2*d*e*x**2 + e**2*x**4),x)*b*d**2*e**2*x**2 - 2*log(x **n*c)*b*d*e*x - a*d*e*x)/(2*d*e**2*(d + e*x**2))