\(\int (a+b \log (c x^n))^2 \log (d (\frac {1}{d}+f x^2)) \, dx\) [43]

Optimal result
Mathematica [C] (verified)
Rubi [C] (verified)
Maple [F]
Fricas [F]
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 25, antiderivative size = 469 \[ \int \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (\frac {1}{d}+f x^2\right )\right ) \, dx=4 a b n x-8 b^2 n^2 x+4 b n (a-b n) x-\frac {4 b n (a-b n) \arctan \left (\sqrt {d} \sqrt {f} x\right )}{\sqrt {d} \sqrt {f}}+8 b^2 n x \log \left (c x^n\right )-\frac {4 b^2 n \arctan \left (\sqrt {d} \sqrt {f} x\right ) \log \left (c x^n\right )}{\sqrt {d} \sqrt {f}}-2 x \left (a+b \log \left (c x^n\right )\right )^2+\frac {2 \arctan \left (\sqrt {d} \sqrt {f} x\right ) \left (a+b \log \left (c x^n\right )\right )^2}{\sqrt {d} \sqrt {f}}-2 a b n x \log \left (1+d f x^2\right )+2 b^2 n^2 x \log \left (1+d f x^2\right )-2 b^2 n x \log \left (c x^n\right ) \log \left (1+d f x^2\right )+x \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+d f x^2\right )-\frac {2 b^2 n^2 \operatorname {PolyLog}\left (2,-\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}+\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \operatorname {PolyLog}\left (2,-\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}+\frac {2 b^2 n^2 \operatorname {PolyLog}\left (2,\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \operatorname {PolyLog}\left (2,\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}-\frac {2 b^2 n^2 \operatorname {PolyLog}\left (3,-\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}}+\frac {2 b^2 n^2 \operatorname {PolyLog}\left (3,\sqrt {-d} \sqrt {f} x\right )}{\sqrt {-d} \sqrt {f}} \] Output:

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

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 0.41 (sec) , antiderivative size = 544, normalized size of antiderivative = 1.16 \[ \int \left (a+b \log \left (c x^n\right )\right )^2 \log \left (d \left (\frac {1}{d}+f x^2\right )\right ) \, dx=\frac {-2 \sqrt {d} \sqrt {f} x \left (a^2-2 a b n+2 b^2 n^2+2 b^2 n \left (n \log (x)-\log \left (c x^n\right )\right )+2 a b \left (-n \log (x)+\log \left (c x^n\right )\right )+b^2 \left (-n \log (x)+\log \left (c x^n\right )\right )^2\right )+2 \arctan \left (\sqrt {d} \sqrt {f} x\right ) \left (a^2-2 a b n+2 b^2 n^2+2 b^2 n \left (n \log (x)-\log \left (c x^n\right )\right )+2 a b \left (-n \log (x)+\log \left (c x^n\right )\right )+b^2 \left (-n \log (x)+\log \left (c x^n\right )\right )^2\right )+\sqrt {d} \sqrt {f} x \left (a^2-2 a b n+2 b^2 n^2+2 b (a-b n) \log \left (c x^n\right )+b^2 \log ^2\left (c x^n\right )\right ) \log \left (1+d f x^2\right )+2 b n \left (a-b n-b n \log (x)+b \log \left (c x^n\right )\right ) \left (-2 \sqrt {d} \sqrt {f} x (-1+\log (x))-i \left (\log (x) \log \left (1+i \sqrt {d} \sqrt {f} x\right )+\operatorname {PolyLog}\left (2,-i \sqrt {d} \sqrt {f} x\right )\right )+i \left (\log (x) \log \left (1-i \sqrt {d} \sqrt {f} x\right )+\operatorname {PolyLog}\left (2,i \sqrt {d} \sqrt {f} x\right )\right )\right )-2 b^2 n^2 \left (\sqrt {d} \sqrt {f} x \left (2-2 \log (x)+\log ^2(x)\right )+\frac {1}{2} i \left (\log ^2(x) \log \left (1+i \sqrt {d} \sqrt {f} x\right )+2 \log (x) \operatorname {PolyLog}\left (2,-i \sqrt {d} \sqrt {f} x\right )-2 \operatorname {PolyLog}\left (3,-i \sqrt {d} \sqrt {f} x\right )\right )-\frac {1}{2} i \left (\log ^2(x) \log \left (1-i \sqrt {d} \sqrt {f} x\right )+2 \log (x) \operatorname {PolyLog}\left (2,i \sqrt {d} \sqrt {f} x\right )-2 \operatorname {PolyLog}\left (3,i \sqrt {d} \sqrt {f} x\right )\right )\right )}{\sqrt {d} \sqrt {f}} \] Input:

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

Output:

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

Rubi [C] (verified)

Result contains complex when optimal does not.

Time = 1.08 (sec) , antiderivative size = 540, normalized size of antiderivative = 1.15, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.120, Rules used = {2818, 6, 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 \log \left (d \left (\frac {1}{d}+f x^2\right )\right ) \left (a+b \log \left (c x^n\right )\right )^2 \, dx\)

\(\Big \downarrow \) 2818

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

\(\Big \downarrow \) 6

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 6
Int[(u_.)*((v_.) + (a_.)*(Fx_) + (b_.)*(Fx_))^(p_.), x_Symbol] :> Int[u*(v 
+ (a + b)*Fx)^p, x] /; FreeQ[{a, b}, x] &&  !FreeQ[Fx, x]
 

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

rule 2818
Int[Log[(d_.)*((e_) + (f_.)*(x_)^(m_.))^(r_.)]*((a_.) + Log[(c_.)*(x_)^(n_. 
)]*(b_.))^(p_.), x_Symbol] :> With[{u = IntHide[(a + b*Log[c*x^n])^p, x]}, 
Simp[Log[d*(e + f*x^m)^r]   u, x] - Simp[f*m*r   Int[x^(m - 1)/(e + f*x^m) 
  u, x], x]] /; FreeQ[{a, b, c, d, e, f, r, m, n}, x] && IGtQ[p, 0] && Inte 
gerQ[m]
 
Maple [F]

\[\int {\left (a +b \ln \left (c \,x^{n}\right )\right )}^{2} \ln \left (d \left (\frac {1}{d}+f \,x^{2}\right )\right )d x\]

Input:

int((a+b*ln(c*x^n))^2*ln(d*(1/d+f*x^2)),x)
 

Output:

int((a+b*ln(c*x^n))^2*ln(d*(1/d+f*x^2)),x)
 

Fricas [F]

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

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

Output:

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

Sympy [F]

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

integrate((a+b*ln(c*x**n))**2*ln(d*(1/d+f*x**2)),x)
 

Output:

Integral((a + b*log(c*x**n))**2*log(d*f*x**2 + 1), x)
 

Maxima [F]

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

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

Output:

(b^2*x*log(x^n)^2 - 2*(b^2*(n - log(c)) - a*b)*x*log(x^n) + ((2*n^2 - 2*n* 
log(c) + log(c)^2)*b^2 - 2*a*b*(n - log(c)) + a^2)*x)*log(d*f*x^2 + 1) - i 
ntegrate(2*(b^2*d*f*x^2*log(x^n)^2 + 2*(a*b*d*f - (d*f*n - d*f*log(c))*b^2 
)*x^2*log(x^n) + (a^2*d*f - 2*(d*f*n - d*f*log(c))*a*b + (2*d*f*n^2 - 2*d* 
f*n*log(c) + d*f*log(c)^2)*b^2)*x^2)/(d*f*x^2 + 1), x)
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

(2*sqrt(f)*sqrt(d)*atan((d*f*x)/(sqrt(f)*sqrt(d)))*a**2 - 4*sqrt(f)*sqrt(d 
)*atan((d*f*x)/(sqrt(f)*sqrt(d)))*a*b*n + 4*sqrt(f)*sqrt(d)*atan((d*f*x)/( 
sqrt(f)*sqrt(d)))*b**2*n**2 + 2*int(log(x**n*c)**2/(d*f*x**2 + 1),x)*b**2* 
d*f + 4*int(log(x**n*c)/(d*f*x**2 + 1),x)*a*b*d*f - 4*int(log(x**n*c)/(d*f 
*x**2 + 1),x)*b**2*d*f*n + log(d*f*x**2 + 1)*log(x**n*c)**2*b**2*d*f*x + 2 
*log(d*f*x**2 + 1)*log(x**n*c)*a*b*d*f*x - 2*log(d*f*x**2 + 1)*log(x**n*c) 
*b**2*d*f*n*x + log(d*f*x**2 + 1)*a**2*d*f*x - 2*log(d*f*x**2 + 1)*a*b*d*f 
*n*x + 2*log(d*f*x**2 + 1)*b**2*d*f*n**2*x - 2*log(x**n*c)**2*b**2*d*f*x - 
 4*log(x**n*c)*a*b*d*f*x + 8*log(x**n*c)*b**2*d*f*n*x - 2*a**2*d*f*x + 8*a 
*b*d*f*n*x - 12*b**2*d*f*n**2*x)/(d*f)