\(\int \frac {x^4 (a+b \log (c x^n))}{d+e x^2} \, dx\) [216]

Optimal result
Mathematica [A] (verified)
Rubi [C] (verified)
Maple [C] (warning: unable to verify)
Fricas [F]
Sympy [F]
Maxima [F(-2)]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 23, antiderivative size = 166 \[ \int \frac {x^4 \left (a+b \log \left (c x^n\right )\right )}{d+e x^2} \, dx=-\frac {a d x}{e^2}+\frac {b d n x}{e^2}-\frac {b n x^3}{9 e}-\frac {b d x \log \left (c x^n\right )}{e^2}+\frac {x^3 \left (a+b \log \left (c x^n\right )\right )}{3 e}+\frac {d^{3/2} \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{e^{5/2}}-\frac {b (-d)^{3/2} n \operatorname {PolyLog}\left (2,-\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{2 e^{5/2}}+\frac {b (-d)^{3/2} n \operatorname {PolyLog}\left (2,\frac {\sqrt {e} x}{\sqrt {-d}}\right )}{2 e^{5/2}} \] Output:

-a*d*x/e^2+b*d*n*x/e^2-1/9*b*n*x^3/e-b*d*x*ln(c*x^n)/e^2+1/3*x^3*(a+b*ln(c 
*x^n))/e+d^(3/2)*arctan(e^(1/2)*x/d^(1/2))*(a+b*ln(c*x^n))/e^(5/2)-1/2*b*( 
-d)^(3/2)*n*polylog(2,-e^(1/2)*x/(-d)^(1/2))/e^(5/2)+1/2*b*(-d)^(3/2)*n*po 
lylog(2,e^(1/2)*x/(-d)^(1/2))/e^(5/2)
 

Mathematica [A] (verified)

Time = 0.18 (sec) , antiderivative size = 208, normalized size of antiderivative = 1.25 \[ \int \frac {x^4 \left (a+b \log \left (c x^n\right )\right )}{d+e x^2} \, dx=\frac {-18 a d \sqrt {e} x+18 b d \sqrt {e} n x-2 b e^{3/2} n x^3-18 b d \sqrt {e} x \log \left (c x^n\right )+6 e^{3/2} x^3 \left (a+b \log \left (c x^n\right )\right )+9 \sqrt {-d} d \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {\sqrt {e} x}{\sqrt {-d}}\right )+9 (-d)^{3/2} \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {d \sqrt {e} x}{(-d)^{3/2}}\right )+9 b (-d)^{3/2} n \operatorname {PolyLog}\left (2,\frac {\sqrt {e} x}{\sqrt {-d}}\right )-9 b (-d)^{3/2} n \operatorname {PolyLog}\left (2,\frac {d \sqrt {e} x}{(-d)^{3/2}}\right )}{18 e^{5/2}} \] Input:

Integrate[(x^4*(a + b*Log[c*x^n]))/(d + e*x^2),x]
 

Output:

(-18*a*d*Sqrt[e]*x + 18*b*d*Sqrt[e]*n*x - 2*b*e^(3/2)*n*x^3 - 18*b*d*Sqrt[ 
e]*x*Log[c*x^n] + 6*e^(3/2)*x^3*(a + b*Log[c*x^n]) + 9*Sqrt[-d]*d*(a + b*L 
og[c*x^n])*Log[1 + (Sqrt[e]*x)/Sqrt[-d]] + 9*(-d)^(3/2)*(a + b*Log[c*x^n]) 
*Log[1 + (d*Sqrt[e]*x)/(-d)^(3/2)] + 9*b*(-d)^(3/2)*n*PolyLog[2, (Sqrt[e]* 
x)/Sqrt[-d]] - 9*b*(-d)^(3/2)*n*PolyLog[2, (d*Sqrt[e]*x)/(-d)^(3/2)])/(18* 
e^(5/2))
 

Rubi [C] (verified)

Result contains complex when optimal does not.

Time = 0.41 (sec) , antiderivative size = 167, 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^4 \left (a+b \log \left (c x^n\right )\right )}{d+e x^2} \, dx\)

\(\Big \downarrow \) 2793

\(\displaystyle \int \left (\frac {d^2 \left (a+b \log \left (c x^n\right )\right )}{e^2 \left (d+e x^2\right )}-\frac {d \left (a+b \log \left (c x^n\right )\right )}{e^2}+\frac {x^2 \left (a+b \log \left (c x^n\right )\right )}{e}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {d^{3/2} \arctan \left (\frac {\sqrt {e} x}{\sqrt {d}}\right ) \left (a+b \log \left (c x^n\right )\right )}{e^{5/2}}+\frac {x^3 \left (a+b \log \left (c x^n\right )\right )}{3 e}-\frac {a d x}{e^2}-\frac {b d x \log \left (c x^n\right )}{e^2}-\frac {i b d^{3/2} n \operatorname {PolyLog}\left (2,-\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{2 e^{5/2}}+\frac {i b d^{3/2} n \operatorname {PolyLog}\left (2,\frac {i \sqrt {e} x}{\sqrt {d}}\right )}{2 e^{5/2}}+\frac {b d n x}{e^2}-\frac {b n x^3}{9 e}\)

Input:

Int[(x^4*(a + b*Log[c*x^n]))/(d + e*x^2),x]
 

Output:

-((a*d*x)/e^2) + (b*d*n*x)/e^2 - (b*n*x^3)/(9*e) - (b*d*x*Log[c*x^n])/e^2 
+ (x^3*(a + b*Log[c*x^n]))/(3*e) + (d^(3/2)*ArcTan[(Sqrt[e]*x)/Sqrt[d]]*(a 
 + b*Log[c*x^n]))/e^(5/2) - ((I/2)*b*d^(3/2)*n*PolyLog[2, ((-I)*Sqrt[e]*x) 
/Sqrt[d]])/e^(5/2) + ((I/2)*b*d^(3/2)*n*PolyLog[2, (I*Sqrt[e]*x)/Sqrt[d]]) 
/e^(5/2)
 

Defintions of rubi rules used

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2793
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]))
 
Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 0.68 (sec) , antiderivative size = 365, normalized size of antiderivative = 2.20

method result size
risch \(\frac {b \ln \left (x^{n}\right ) x^{3}}{3 e}-\frac {b \ln \left (x^{n}\right ) d x}{e^{2}}-\frac {b \,d^{2} \arctan \left (\frac {x e}{\sqrt {d e}}\right ) n \ln \left (x \right )}{e^{2} \sqrt {d e}}+\frac {b \,d^{2} \arctan \left (\frac {x e}{\sqrt {d e}}\right ) \ln \left (x^{n}\right )}{e^{2} \sqrt {d e}}-\frac {b n \,x^{3}}{9 e}+\frac {b d n x}{e^{2}}+\frac {b n \,d^{2} \ln \left (x \right ) \ln \left (\frac {-e x +\sqrt {-d e}}{\sqrt {-d e}}\right )}{2 e^{2} \sqrt {-d e}}-\frac {b n \,d^{2} \ln \left (x \right ) \ln \left (\frac {e x +\sqrt {-d e}}{\sqrt {-d e}}\right )}{2 e^{2} \sqrt {-d e}}+\frac {b n \,d^{2} \operatorname {dilog}\left (\frac {-e x +\sqrt {-d e}}{\sqrt {-d e}}\right )}{2 e^{2} \sqrt {-d e}}-\frac {b n \,d^{2} \operatorname {dilog}\left (\frac {e x +\sqrt {-d e}}{\sqrt {-d e}}\right )}{2 e^{2} \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 {\frac {1}{3} e \,x^{3}-d x}{e^{2}}+\frac {d^{2} \arctan \left (\frac {x e}{\sqrt {d e}}\right )}{e^{2} \sqrt {d e}}\right )\) \(365\)

Input:

int(x^4*(a+b*ln(c*x^n))/(e*x^2+d),x,method=_RETURNVERBOSE)
 

Output:

1/3*b*ln(x^n)/e*x^3-b*ln(x^n)/e^2*d*x-b*d^2/e^2/(d*e)^(1/2)*arctan(x*e/(d* 
e)^(1/2))*n*ln(x)+b*d^2/e^2/(d*e)^(1/2)*arctan(x*e/(d*e)^(1/2))*ln(x^n)-1/ 
9*b*n*x^3/e+b*d*n*x/e^2+1/2*b*n*d^2/e^2*ln(x)/(-d*e)^(1/2)*ln((-e*x+(-d*e) 
^(1/2))/(-d*e)^(1/2))-1/2*b*n*d^2/e^2*ln(x)/(-d*e)^(1/2)*ln((e*x+(-d*e)^(1 
/2))/(-d*e)^(1/2))+1/2*b*n*d^2/e^2/(-d*e)^(1/2)*dilog((-e*x+(-d*e)^(1/2))/ 
(-d*e)^(1/2))-1/2*b*n*d^2/e^2/(-d*e)^(1/2)*dilog((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)*csg 
n(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 
*csgn(I*c)+b*ln(c)+a)*(1/e^2*(1/3*e*x^3-d*x)+d^2/e^2/(d*e)^(1/2)*arctan(x* 
e/(d*e)^(1/2)))
 

Fricas [F]

\[ \int \frac {x^4 \left (a+b \log \left (c x^n\right )\right )}{d+e x^2} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )} x^{4}}{e x^{2} + d} \,d x } \] Input:

integrate(x^4*(a+b*log(c*x^n))/(e*x^2+d),x, algorithm="fricas")
 

Output:

integral((b*x^4*log(c*x^n) + a*x^4)/(e*x^2 + d), x)
 

Sympy [F]

\[ \int \frac {x^4 \left (a+b \log \left (c x^n\right )\right )}{d+e x^2} \, dx=\int \frac {x^{4} \left (a + b \log {\left (c x^{n} \right )}\right )}{d + e x^{2}}\, dx \] Input:

integrate(x**4*(a+b*ln(c*x**n))/(e*x**2+d),x)
 

Output:

Integral(x**4*(a + b*log(c*x**n))/(d + e*x**2), x)
 

Maxima [F(-2)]

Exception generated. \[ \int \frac {x^4 \left (a+b \log \left (c x^n\right )\right )}{d+e x^2} \, dx=\text {Exception raised: ValueError} \] Input:

integrate(x^4*(a+b*log(c*x^n))/(e*x^2+d),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
 

Giac [F]

\[ \int \frac {x^4 \left (a+b \log \left (c x^n\right )\right )}{d+e x^2} \, dx=\int { \frac {{\left (b \log \left (c x^{n}\right ) + a\right )} x^{4}}{e x^{2} + d} \,d x } \] Input:

integrate(x^4*(a+b*log(c*x^n))/(e*x^2+d),x, algorithm="giac")
 

Output:

integrate((b*log(c*x^n) + a)*x^4/(e*x^2 + d), x)
                                                                                    
                                                                                    
 

Mupad [F(-1)]

Timed out. \[ \int \frac {x^4 \left (a+b \log \left (c x^n\right )\right )}{d+e x^2} \, dx=\int \frac {x^4\,\left (a+b\,\ln \left (c\,x^n\right )\right )}{e\,x^2+d} \,d x \] Input:

int((x^4*(a + b*log(c*x^n)))/(d + e*x^2),x)
 

Output:

int((x^4*(a + b*log(c*x^n)))/(d + e*x^2), x)
 

Reduce [F]

\[ \int \frac {x^4 \left (a+b \log \left (c x^n\right )\right )}{d+e x^2} \, dx=\frac {9 \sqrt {e}\, \sqrt {d}\, \mathit {atan} \left (\frac {e x}{\sqrt {e}\, \sqrt {d}}\right ) a d +9 \left (\int \frac {\mathrm {log}\left (x^{n} c \right )}{e \,x^{2}+d}d x \right ) b \,d^{2} e -9 \,\mathrm {log}\left (x^{n} c \right ) b d e x +3 \,\mathrm {log}\left (x^{n} c \right ) b \,e^{2} x^{3}-9 a d e x +3 a \,e^{2} x^{3}+9 b d e n x -b \,e^{2} n \,x^{3}}{9 e^{3}} \] Input:

int(x^4*(a+b*log(c*x^n))/(e*x^2+d),x)
 

Output:

(9*sqrt(e)*sqrt(d)*atan((e*x)/(sqrt(e)*sqrt(d)))*a*d + 9*int(log(x**n*c)/( 
d + e*x**2),x)*b*d**2*e - 9*log(x**n*c)*b*d*e*x + 3*log(x**n*c)*b*e**2*x** 
3 - 9*a*d*e*x + 3*a*e**2*x**3 + 9*b*d*e*n*x - b*e**2*n*x**3)/(9*e**3)