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

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

Optimal result

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

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

Mathematica [A] (verified)

Time = 0.15 (sec) , antiderivative size = 332, normalized size of antiderivative = 1.71 \[ \int \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 \sqrt {f} m x+4 b \sqrt {f} m n x+2 a \sqrt {e} m \arctan \left (\frac {\sqrt {f} x}{\sqrt {e}}\right )-2 b \sqrt {e} m n \arctan \left (\frac {\sqrt {f} x}{\sqrt {e}}\right )-2 b \sqrt {e} m n \arctan \left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) \log (x)-2 b \sqrt {f} m x \log \left (c x^n\right )+2 b \sqrt {e} m \arctan \left (\frac {\sqrt {f} x}{\sqrt {e}}\right ) \log \left (c x^n\right )+i b \sqrt {e} m n \log (x) \log \left (1-\frac {i \sqrt {f} x}{\sqrt {e}}\right )-i b \sqrt {e} m n \log (x) \log \left (1+\frac {i \sqrt {f} x}{\sqrt {e}}\right )+a \sqrt {f} x \log \left (d \left (e+f x^2\right )^m\right )-b \sqrt {f} n x \log \left (d \left (e+f x^2\right )^m\right )+b \sqrt {f} x \log \left (c x^n\right ) \log \left (d \left (e+f x^2\right )^m\right )-i b \sqrt {e} m n \operatorname {PolyLog}\left (2,-\frac {i \sqrt {f} x}{\sqrt {e}}\right )+i b \sqrt {e} m n \operatorname {PolyLog}\left (2,\frac {i \sqrt {f} x}{\sqrt {e}}\right )}{\sqrt {f}} \] Input:

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

Output:

(-2*a*Sqrt[f]*m*x + 4*b*Sqrt[f]*m*n*x + 2*a*Sqrt[e]*m*ArcTan[(Sqrt[f]*x)/S 
qrt[e]] - 2*b*Sqrt[e]*m*n*ArcTan[(Sqrt[f]*x)/Sqrt[e]] - 2*b*Sqrt[e]*m*n*Ar 
cTan[(Sqrt[f]*x)/Sqrt[e]]*Log[x] - 2*b*Sqrt[f]*m*x*Log[c*x^n] + 2*b*Sqrt[e 
]*m*ArcTan[(Sqrt[f]*x)/Sqrt[e]]*Log[c*x^n] + I*b*Sqrt[e]*m*n*Log[x]*Log[1 
- (I*Sqrt[f]*x)/Sqrt[e]] - I*b*Sqrt[e]*m*n*Log[x]*Log[1 + (I*Sqrt[f]*x)/Sq 
rt[e]] + a*Sqrt[f]*x*Log[d*(e + f*x^2)^m] - b*Sqrt[f]*n*x*Log[d*(e + f*x^2 
)^m] + b*Sqrt[f]*x*Log[c*x^n]*Log[d*(e + f*x^2)^m] - I*b*Sqrt[e]*m*n*PolyL 
og[2, ((-I)*Sqrt[f]*x)/Sqrt[e]] + I*b*Sqrt[e]*m*n*PolyLog[2, (I*Sqrt[f]*x) 
/Sqrt[e]])/Sqrt[f]
 

Rubi [A] (verified)

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

\(\Big \downarrow \) 2817

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

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

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

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

Time = 19.63 (sec) , antiderivative size = 841, normalized size of antiderivative = 4.34

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

Input:

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

Output:

(b*x*ln(x^n)+1/2*x*(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*n*b+2*a))*ln((f*x^2+e)^m)+(-1/4*I*Pi*csgn(I*d)*csgn(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))*(I*Pi*b*x*csgn(I*x^n)*csgn(I*c*x^n)^2+I*Pi*b*x*cs 
gn(I*c*x^n)^2*csgn(I*c)+2*a*x+2*ln(c)*b*x+2*b*x*ln(x^n)-2*b*n*x-I*Pi*b*x*c 
sgn(I*c*x^n)^3-I*Pi*b*x*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c))-I*m*x*Pi*b*cs 
gn(I*c*x^n)^2*csgn(I*c)+I*m*x*Pi*b*csgn(I*c*x^n)^3+I*m*e/(e*f)^(1/2)*arcta 
n(x*f/(e*f)^(1/2))*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2+I*m*e/(e*f)^(1/2)*arct 
an(x*f/(e*f)^(1/2))*Pi*b*csgn(I*c*x^n)^2*csgn(I*c)-2*x*ln(c)*b*m+4*b*m*n*x 
-2*a*m*x-I*m*x*Pi*b*csgn(I*x^n)*csgn(I*c*x^n)^2+I*m*x*Pi*b*csgn(I*x^n)*csg 
n(I*c*x^n)*csgn(I*c)-I*m*e/(e*f)^(1/2)*arctan(x*f/(e*f)^(1/2))*Pi*b*csgn(I 
*x^n)*csgn(I*c*x^n)*csgn(I*c)-I*m*e/(e*f)^(1/2)*arctan(x*f/(e*f)^(1/2))*Pi 
*b*csgn(I*c*x^n)^3+2*m*e/(e*f)^(1/2)*arctan(x*f/(e*f)^(1/2))*b*ln(c)-2*m*e 
/(e*f)^(1/2)*arctan(x*f/(e*f)^(1/2))*n*b+2*a*m*e/(e*f)^(1/2)*arctan(x*f/(e 
*f)^(1/2))-2*m*b*ln(x^n)*x-2*m*b*e/(e*f)^(1/2)*arctan(x*f/(e*f)^(1/2))*n*l 
n(x)+2*m*b*e/(e*f)^(1/2)*arctan(x*f/(e*f)^(1/2))*ln(x^n)+m*b*n*e*ln(x)/(-e 
*f)^(1/2)*ln((-f*x+(-e*f)^(1/2))/(-e*f)^(1/2))-m*b*n*e*ln(x)/(-e*f)^(1/2)* 
ln((f*x+(-e*f)^(1/2))/(-e*f)^(1/2))+m*b*n*e/(-e*f)^(1/2)*dilog((-f*x+(-...
 

Fricas [F]

\[ \int \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 )} \log \left ({\left (f x^{2} + e\right )}^{m} d\right ) \,d x } \] Input:

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

Output:

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

Sympy [F(-1)]

Timed out. \[ \int \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((a+b*ln(c*x**n))*ln(d*(f*x**2+e)**m),x)
 

Output:

Timed out
 

Maxima [F(-2)]

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

integrate((a+b*log(c*x^n))*log(d*(f*x^2+e)^m),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 \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 )} \log \left ({\left (f x^{2} + e\right )}^{m} d\right ) \,d x } \] Input:

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

Output:

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

Mupad [F(-1)]

Timed out. \[ \int \left (a+b \log \left (c x^n\right )\right ) \log \left (d \left (e+f x^2\right )^m\right ) \, dx=\int \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(log(d*(e + f*x^2)^m)*(a + b*log(c*x^n)),x)
 

Output:

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

Reduce [F]

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

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

Output:

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