\(\int x (a+b \log (c x^n)) \log (d (e+f x^2)^m) \, dx\) [97]

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

Optimal result

Integrand size = 24, antiderivative size = 148 \[ \int x \left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right ) \, dx=\frac {1}{2} b m n x^2-\frac {1}{2} m x^2 \left (a+b \log \left (c x^n\right )\right )-\frac {b n \left (e+f x^2\right ) \log \left (d \left (e+f x^2\right )^m\right )}{4 f}-\frac {b e n \log \left (-\frac {f x^2}{e}\right ) \log \left (d \left (e+f x^2\right )^m\right )}{4 f}+\frac {\left (e+f x^2\right ) \left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right )}{2 f}-\frac {b e m n \operatorname {PolyLog}\left (2,1+\frac {f x^2}{e}\right )}{4 f} \] Output:

1/2*b*m*n*x^2-1/2*m*x^2*(a+b*ln(c*x^n))-1/4*b*n*(f*x^2+e)*ln(d*(f*x^2+e)^m 
)/f-1/4*b*e*n*ln(-f*x^2/e)*ln(d*(f*x^2+e)^m)/f+1/2*(f*x^2+e)*(a+b*ln(c*x^n 
))*ln(d*(f*x^2+e)^m)/f-1/4*b*e*m*n*polylog(2,1+f*x^2/e)/f
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.14 (sec) , antiderivative size = 266, normalized size of antiderivative = 1.80 \[ \int x \left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right ) \, dx=\frac {-2 a f m x^2+2 b f m n x^2-2 b f m x^2 \log \left (c x^n\right )+2 b e m n \log (x) \log \left (1-\frac {i \sqrt {f} x}{\sqrt {e}}\right )+2 b e m n \log (x) \log \left (1+\frac {i \sqrt {f} x}{\sqrt {e}}\right )-b e m n \log \left (e+f x^2\right )-2 b e m n \log (x) \log \left (e+f x^2\right )+2 b e m \log \left (c x^n\right ) \log \left (e+f x^2\right )+2 a e \log \left (d \left (e+f x^2\right )^m\right )+2 a f x^2 \log \left (d \left (e+f x^2\right )^m\right )-b f n x^2 \log \left (d \left (e+f x^2\right )^m\right )+2 b f x^2 \log \left (c x^n\right ) \log \left (d \left (e+f x^2\right )^m\right )+2 b e m n \operatorname {PolyLog}\left (2,-\frac {i \sqrt {f} x}{\sqrt {e}}\right )+2 b e m n \operatorname {PolyLog}\left (2,\frac {i \sqrt {f} x}{\sqrt {e}}\right )}{4 f} \] Input:

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

Output:

(-2*a*f*m*x^2 + 2*b*f*m*n*x^2 - 2*b*f*m*x^2*Log[c*x^n] + 2*b*e*m*n*Log[x]* 
Log[1 - (I*Sqrt[f]*x)/Sqrt[e]] + 2*b*e*m*n*Log[x]*Log[1 + (I*Sqrt[f]*x)/Sq 
rt[e]] - b*e*m*n*Log[e + f*x^2] - 2*b*e*m*n*Log[x]*Log[e + f*x^2] + 2*b*e* 
m*Log[c*x^n]*Log[e + f*x^2] + 2*a*e*Log[d*(e + f*x^2)^m] + 2*a*f*x^2*Log[d 
*(e + f*x^2)^m] - b*f*n*x^2*Log[d*(e + f*x^2)^m] + 2*b*f*x^2*Log[c*x^n]*Lo 
g[d*(e + f*x^2)^m] + 2*b*e*m*n*PolyLog[2, ((-I)*Sqrt[f]*x)/Sqrt[e]] + 2*b* 
e*m*n*PolyLog[2, (I*Sqrt[f]*x)/Sqrt[e]])/(4*f)
 

Rubi [A] (verified)

Time = 0.47 (sec) , antiderivative size = 145, normalized size of antiderivative = 0.98, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.083, Rules used = {2823, 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 x \left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right ) \, dx\)

\(\Big \downarrow \) 2823

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\left (e+f x^2\right ) \left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right )}{2 f}-\frac {1}{2} m x^2 \left (a+b \log \left (c x^n\right )\right )-b n \left (\frac {\left (e+f x^2\right ) \log \left (d \left (e+f x^2\right )^m\right )}{4 f}+\frac {e \log \left (-\frac {f x^2}{e}\right ) \log \left (d \left (e+f x^2\right )^m\right )}{4 f}+\frac {e m \operatorname {PolyLog}\left (2,\frac {f x^2}{e}+1\right )}{4 f}-\frac {m x^2}{2}\right )\)

Input:

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

Output:

-1/2*(m*x^2*(a + b*Log[c*x^n])) + ((e + f*x^2)*(a + b*Log[c*x^n])*Log[d*(e 
 + f*x^2)^m])/(2*f) - b*n*(-1/2*(m*x^2) + ((e + f*x^2)*Log[d*(e + f*x^2)^m 
])/(4*f) + (e*Log[-((f*x^2)/e)]*Log[d*(e + f*x^2)^m])/(4*f) + (e*m*PolyLog 
[2, 1 + (f*x^2)/e])/(4*f))
 

Defintions of rubi rules used

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

rule 2823
Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_. 
)]*(b_.))*((g_.)*(x_))^(q_.), x_Symbol] :> With[{u = IntHide[(g*x)^q*Log[d* 
(e + f*x^m)^r], x]}, Simp[(a + b*Log[c*x^n])   u, x] - Simp[b*n   Int[1/x 
 u, x], x]] /; FreeQ[{a, b, c, d, e, f, g, r, m, n, q}, x] && (IntegerQ[(q 
+ 1)/m] || (RationalQ[m] && RationalQ[q])) && NeQ[q, -1]
 
Maple [C] (warning: unable to verify)

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

Time = 46.08 (sec) , antiderivative size = 828, normalized size of antiderivative = 5.59

method result size
risch \(\text {Expression too large to display}\) \(828\)

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F(-1)]

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

integrate(x*(a+b*ln(c*x**n))*ln(d*(f*x**2+e)**m),x)
 

Output:

Timed out
 

Maxima [F]

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

integrate(x*(a+b*log(c*x^n))*log(d*(f*x^2+e)^m),x, algorithm="maxima")
 

Output:

1/4*(2*b*x^2*log(x^n) - (b*(n - 2*log(c)) - 2*a)*x^2)*log((f*x^2 + e)^m) + 
 integrate(-1/2*((2*(f*m - f*log(d))*a - (f*m*n - 2*(f*m - f*log(d))*log(c 
))*b)*x^3 - 2*(b*e*log(c)*log(d) + a*e*log(d))*x + 2*((f*m - f*log(d))*b*x 
^3 - b*e*x*log(d))*log(x^n))/(f*x^2 + e), x)
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

( - 4*int(log(x**n*c)/(e*x + f*x**3),x)*b*e**2*m*n + 2*log((e + f*x**2)**m 
*d)*log(x**n*c)*b*f*n*x**2 + 2*log((e + f*x**2)**m*d)*a*e*n + 2*log((e + f 
*x**2)**m*d)*a*f*n*x**2 - log((e + f*x**2)**m*d)*b*e*n**2 - log((e + f*x** 
2)**m*d)*b*f*n**2*x**2 + 2*log(x**n*c)**2*b*e*m - 2*log(x**n*c)*b*f*m*n*x* 
*2 - 2*a*f*m*n*x**2 + 2*b*f*m*n**2*x**2)/(4*f*n)