Integrand size = 28, antiderivative size = 187 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f (g+h x)^q\right )\right )}{x^3} \, dx=-\frac {3 b e h n q}{4 g x}-\frac {b e h^2 n q \log (x)}{4 g^2}-\frac {e h q \left (a+b \log \left (c x^n\right )\right )}{2 g x}+\frac {e h^2 q \log \left (1+\frac {g}{h x}\right ) \left (a+b \log \left (c x^n\right )\right )}{2 g^2}+\frac {b e h^2 n q \log (g+h x)}{4 g^2}-\frac {b n \left (d+e \log \left (f (g+h x)^q\right )\right )}{4 x^2}-\frac {\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f (g+h x)^q\right )\right )}{2 x^2}-\frac {b e h^2 n q \operatorname {PolyLog}\left (2,-\frac {g}{h x}\right )}{2 g^2} \] Output:
-3/4*b*e*h*n*q/g/x-1/4*b*e*h^2*n*q*ln(x)/g^2-1/2*e*h*q*(a+b*ln(c*x^n))/g/x +1/2*e*h^2*q*ln(1+g/h/x)*(a+b*ln(c*x^n))/g^2+1/4*b*e*h^2*n*q*ln(h*x+g)/g^2 -1/4*b*n*(d+e*ln(f*(h*x+g)^q))/x^2-1/2*(a+b*ln(c*x^n))*(d+e*ln(f*(h*x+g)^q ))/x^2-1/2*b*e*h^2*n*q*polylog(2,-g/h/x)/g^2
Time = 0.25 (sec) , antiderivative size = 271, normalized size of antiderivative = 1.45 \[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f (g+h x)^q\right )\right )}{x^3} \, dx=-\frac {2 a d g^2+b d g^2 n+2 a e g h q x+3 b e g h n q x-b e h^2 n q x^2 \log ^2(x)+2 b d g^2 \log \left (c x^n\right )+2 b e g h q x \log \left (c x^n\right )-2 a e h^2 q x^2 \log (g+h x)-b e h^2 n q x^2 \log (g+h x)-2 b e h^2 q x^2 \log \left (c x^n\right ) \log (g+h x)+2 a e g^2 \log \left (f (g+h x)^q\right )+b e g^2 n \log \left (f (g+h x)^q\right )+2 b e g^2 \log \left (c x^n\right ) \log \left (f (g+h x)^q\right )+e h^2 q x^2 \log (x) \left (2 a+b n+2 b \log \left (c x^n\right )+2 b n \log (g+h x)-2 b n \log \left (1+\frac {h x}{g}\right )\right )-2 b e h^2 n q x^2 \operatorname {PolyLog}\left (2,-\frac {h x}{g}\right )}{4 g^2 x^2} \] Input:
Integrate[((a + b*Log[c*x^n])*(d + e*Log[f*(g + h*x)^q]))/x^3,x]
Output:
-1/4*(2*a*d*g^2 + b*d*g^2*n + 2*a*e*g*h*q*x + 3*b*e*g*h*n*q*x - b*e*h^2*n* q*x^2*Log[x]^2 + 2*b*d*g^2*Log[c*x^n] + 2*b*e*g*h*q*x*Log[c*x^n] - 2*a*e*h ^2*q*x^2*Log[g + h*x] - b*e*h^2*n*q*x^2*Log[g + h*x] - 2*b*e*h^2*q*x^2*Log [c*x^n]*Log[g + h*x] + 2*a*e*g^2*Log[f*(g + h*x)^q] + b*e*g^2*n*Log[f*(g + h*x)^q] + 2*b*e*g^2*Log[c*x^n]*Log[f*(g + h*x)^q] + e*h^2*q*x^2*Log[x]*(2 *a + b*n + 2*b*Log[c*x^n] + 2*b*n*Log[g + h*x] - 2*b*n*Log[1 + (h*x)/g]) - 2*b*e*h^2*n*q*x^2*PolyLog[2, -((h*x)/g)])/(g^2*x^2)
Time = 1.20 (sec) , antiderivative size = 180, normalized size of antiderivative = 0.96, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2889, 2780, 2741, 2779, 2838, 2842, 54, 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 {\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f (g+h x)^q\right )\right )}{x^3} \, dx\) |
\(\Big \downarrow \) 2889 |
\(\displaystyle \frac {1}{2} e h q \int \frac {a+b \log \left (c x^n\right )}{x^2 (g+h x)}dx+\frac {1}{2} b n \int \frac {d+e \log \left (f (g+h x)^q\right )}{x^3}dx-\frac {\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f (g+h x)^q\right )\right )}{2 x^2}\) |
\(\Big \downarrow \) 2780 |
\(\displaystyle \frac {1}{2} e h q \left (\frac {\int \frac {a+b \log \left (c x^n\right )}{x^2}dx}{g}-\frac {h \int \frac {a+b \log \left (c x^n\right )}{x (g+h x)}dx}{g}\right )+\frac {1}{2} b n \int \frac {d+e \log \left (f (g+h x)^q\right )}{x^3}dx-\frac {\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f (g+h x)^q\right )\right )}{2 x^2}\) |
\(\Big \downarrow \) 2741 |
\(\displaystyle \frac {1}{2} e h q \left (\frac {-\frac {a+b \log \left (c x^n\right )}{x}-\frac {b n}{x}}{g}-\frac {h \int \frac {a+b \log \left (c x^n\right )}{x (g+h x)}dx}{g}\right )+\frac {1}{2} b n \int \frac {d+e \log \left (f (g+h x)^q\right )}{x^3}dx-\frac {\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f (g+h x)^q\right )\right )}{2 x^2}\) |
\(\Big \downarrow \) 2779 |
\(\displaystyle \frac {1}{2} e h q \left (\frac {-\frac {a+b \log \left (c x^n\right )}{x}-\frac {b n}{x}}{g}-\frac {h \left (\frac {b n \int \frac {\log \left (\frac {g}{h x}+1\right )}{x}dx}{g}-\frac {\log \left (\frac {g}{h x}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{g}\right )}{g}\right )+\frac {1}{2} b n \int \frac {d+e \log \left (f (g+h x)^q\right )}{x^3}dx-\frac {\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f (g+h x)^q\right )\right )}{2 x^2}\) |
\(\Big \downarrow \) 2838 |
\(\displaystyle \frac {1}{2} b n \int \frac {d+e \log \left (f (g+h x)^q\right )}{x^3}dx-\frac {\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f (g+h x)^q\right )\right )}{2 x^2}+\frac {1}{2} e h q \left (\frac {-\frac {a+b \log \left (c x^n\right )}{x}-\frac {b n}{x}}{g}-\frac {h \left (\frac {b n \operatorname {PolyLog}\left (2,-\frac {g}{h x}\right )}{g}-\frac {\log \left (\frac {g}{h x}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{g}\right )}{g}\right )\) |
\(\Big \downarrow \) 2842 |
\(\displaystyle \frac {1}{2} b n \left (\frac {1}{2} e h q \int \frac {1}{x^2 (g+h x)}dx-\frac {d+e \log \left (f (g+h x)^q\right )}{2 x^2}\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f (g+h x)^q\right )\right )}{2 x^2}+\frac {1}{2} e h q \left (\frac {-\frac {a+b \log \left (c x^n\right )}{x}-\frac {b n}{x}}{g}-\frac {h \left (\frac {b n \operatorname {PolyLog}\left (2,-\frac {g}{h x}\right )}{g}-\frac {\log \left (\frac {g}{h x}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{g}\right )}{g}\right )\) |
\(\Big \downarrow \) 54 |
\(\displaystyle \frac {1}{2} b n \left (\frac {1}{2} e h q \int \left (\frac {h^2}{g^2 (g+h x)}-\frac {h}{g^2 x}+\frac {1}{g x^2}\right )dx-\frac {d+e \log \left (f (g+h x)^q\right )}{2 x^2}\right )-\frac {\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f (g+h x)^q\right )\right )}{2 x^2}+\frac {1}{2} e h q \left (\frac {-\frac {a+b \log \left (c x^n\right )}{x}-\frac {b n}{x}}{g}-\frac {h \left (\frac {b n \operatorname {PolyLog}\left (2,-\frac {g}{h x}\right )}{g}-\frac {\log \left (\frac {g}{h x}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{g}\right )}{g}\right )\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f (g+h x)^q\right )\right )}{2 x^2}+\frac {1}{2} e h q \left (\frac {-\frac {a+b \log \left (c x^n\right )}{x}-\frac {b n}{x}}{g}-\frac {h \left (\frac {b n \operatorname {PolyLog}\left (2,-\frac {g}{h x}\right )}{g}-\frac {\log \left (\frac {g}{h x}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{g}\right )}{g}\right )+\frac {1}{2} b n \left (\frac {1}{2} e h q \left (-\frac {h \log (x)}{g^2}+\frac {h \log (g+h x)}{g^2}-\frac {1}{g x}\right )-\frac {d+e \log \left (f (g+h x)^q\right )}{2 x^2}\right )\) |
Input:
Int[((a + b*Log[c*x^n])*(d + e*Log[f*(g + h*x)^q]))/x^3,x]
Output:
-1/2*((a + b*Log[c*x^n])*(d + e*Log[f*(g + h*x)^q]))/x^2 + (b*n*((e*h*q*(- (1/(g*x)) - (h*Log[x])/g^2 + (h*Log[g + h*x])/g^2))/2 - (d + e*Log[f*(g + h*x)^q])/(2*x^2)))/2 + (e*h*q*((-((b*n)/x) - (a + b*Log[c*x^n])/x)/g - (h* (-((Log[1 + g/(h*x)]*(a + b*Log[c*x^n]))/g) + (b*n*PolyLog[2, -(g/(h*x))]) /g))/g))/2
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[E xpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && ILtQ[m, 0] && IntegerQ[n] && !(IGtQ[n, 0] && LtQ[m + n + 2, 0])
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[(d*x)^(m + 1)*((a + b*Log[c*x^n])/(d*(m + 1))), x] - Simp[b*n*((d*x)^( m + 1)/(d*(m + 1)^2)), x] /; FreeQ[{a, b, c, d, m, n}, x] && NeQ[m, -1]
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((x_)*((d_) + (e_.)*(x_)^(r _.))), x_Symbol] :> Simp[(-Log[1 + d/(e*x^r)])*((a + b*Log[c*x^n])^p/(d*r)) , x] + Simp[b*n*(p/(d*r)) Int[Log[1 + d/(e*x^r)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, b, c, d, e, n, r}, x] && IGtQ[p, 0]
Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.))/((d_) + (e_.)* (x_)^(r_.)), x_Symbol] :> Simp[1/d Int[x^m*(a + b*Log[c*x^n])^p, x], x] - Simp[e/d Int[(x^(m + r)*(a + b*Log[c*x^n])^p)/(d + e*x^r), x], x] /; Fre eQ[{a, b, c, d, e, m, n, r}, x] && IGtQ[p, 0] && IGtQ[r, 0] && ILtQ[m, -1]
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 , (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_ ))^(q_.), x_Symbol] :> Simp[(f + g*x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/( g*(q + 1))), x] - Simp[b*e*(n/(g*(q + 1))) Int[(f + g*x)^(q + 1)/(d + e*x ), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + Log [(h_.)*((i_.) + (j_.)*(x_))^(m_.)]*(g_.))*(x_)^(r_.), x_Symbol] :> Simp[x^( r + 1)*(a + b*Log[c*(d + e*x)^n])^p*((f + g*Log[h*(i + j*x)^m])/(r + 1)), x ] + (-Simp[g*j*(m/(r + 1)) Int[x^(r + 1)*((a + b*Log[c*(d + e*x)^n])^p/(i + j*x)), x], x] - Simp[b*e*n*(p/(r + 1)) Int[x^(r + 1)*(a + b*Log[c*(d + e*x)^n])^(p - 1)*((f + g*Log[h*(i + j*x)^m])/(d + e*x)), x], x]) /; FreeQ[ {a, b, c, d, e, f, g, h, i, j, m, n}, x] && IGtQ[p, 0] && IntegerQ[r] && (E qQ[p, 1] || GtQ[r, 0]) && NeQ[r, -1]
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 33.98 (sec) , antiderivative size = 988, normalized size of antiderivative = 5.28
Input:
int((a+b*ln(c*x^n))*(d+e*ln(f*(h*x+g)^q))/x^3,x,method=_RETURNVERBOSE)
Output:
(1/4*I*e*Pi*csgn(I*(h*x+g)^q)*csgn(I*f*(h*x+g)^q)^2-1/4*I*e*Pi*csgn(I*(h*x +g)^q)*csgn(I*f*(h*x+g)^q)*csgn(I*f)-1/4*I*e*Pi*csgn(I*f*(h*x+g)^q)^3+1/4* I*e*Pi*csgn(I*f*(h*x+g)^q)^2*csgn(I*f)+1/2*ln(f)*e+1/2*d)*(-1/2*(I*Pi*b*cs gn(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*a)/x^2-b/x^ 2*ln(x^n)-1/2*b*n/x^2)+(-1/2*b*e/x^2*ln(x^n)-1/4*(I*Pi*b*e*csgn(I*x^n)*csg n(I*c*x^n)^2-I*Pi*b*e*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)-I*Pi*b*e*csgn(I* c*x^n)^3+I*Pi*b*e*csgn(I*c*x^n)^2*csgn(I*c)+2*ln(c)*b*e+b*e*n+2*e*a)/x^2)* ln((h*x+g)^q)-1/4*I*h^2*q*e/g^2*ln(h*x+g)*Pi*csgn(I*c*x^n)^3*b+1/4*I*h*q*e /g/x*Pi*csgn(I*c*x^n)^3*b+1/4*I*h^2*q*e/g^2*ln(x)*Pi*csgn(I*c*x^n)^3*b-1/2 *h^2*q*b*e*n/g^2*ln(h*x+g)*ln(-h*x/g)+1/2*h^2*q*e/g^2*ln(h*x+g)*a-1/2*h^2* q*e/g^2*ln(x)*a-1/4*I*h*q*e/g/x*Pi*csgn(I*c*x^n)^2*csgn(I*c)*b-1/4*I*h*q*e /g/x*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2*b+1/4*I*h^2*q*e/g^2*ln(h*x+g)*Pi*csgn( I*x^n)*csgn(I*c*x^n)^2*b+1/4*I*h^2*q*e/g^2*ln(h*x+g)*Pi*csgn(I*c*x^n)^2*cs gn(I*c)*b-1/4*I*h^2*q*e/g^2*ln(x)*Pi*csgn(I*x^n)*csgn(I*c*x^n)^2*b-1/4*I*h ^2*q*e/g^2*ln(x)*Pi*csgn(I*c*x^n)^2*csgn(I*c)*b-1/4*I*h^2*q*e/g^2*ln(h*x+g )*Pi*csgn(I*x^n)*csgn(I*c*x^n)*csgn(I*c)*b+1/4*I*h^2*q*e/g^2*ln(x)*Pi*csgn (I*x^n)*csgn(I*c*x^n)*csgn(I*c)*b+1/4*I*h*q*e/g/x*Pi*csgn(I*x^n)*csgn(I*c* x^n)*csgn(I*c)*b+1/2*h^2*q*b*e*ln(x^n)/g^2*ln(h*x+g)-1/2*h^2*q*b*e*ln(x^n) /g^2*ln(x)-1/2*h^2*q*b*e*n/g^2*dilog(-h*x/g)+1/4*h^2*q*b*e*n/g^2*ln(x)^...
\[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f (g+h x)^q\right )\right )}{x^3} \, dx=\int { \frac {{\left (e \log \left ({\left (h x + g\right )}^{q} f\right ) + d\right )} {\left (b \log \left (c x^{n}\right ) + a\right )}}{x^{3}} \,d x } \] Input:
integrate((a+b*log(c*x^n))*(d+e*log(f*(h*x+g)^q))/x^3,x, algorithm="fricas ")
Output:
integral((b*d*log(c*x^n) + a*d + (b*e*log(c*x^n) + a*e)*log((h*x + g)^q*f) )/x^3, x)
Timed out. \[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f (g+h x)^q\right )\right )}{x^3} \, dx=\text {Timed out} \] Input:
integrate((a+b*ln(c*x**n))*(d+e*ln(f*(h*x+g)**q))/x**3,x)
Output:
Timed out
\[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f (g+h x)^q\right )\right )}{x^3} \, dx=\int { \frac {{\left (e \log \left ({\left (h x + g\right )}^{q} f\right ) + d\right )} {\left (b \log \left (c x^{n}\right ) + a\right )}}{x^{3}} \,d x } \] Input:
integrate((a+b*log(c*x^n))*(d+e*log(f*(h*x+g)^q))/x^3,x, algorithm="maxima ")
Output:
1/2*a*e*h*q*(h*log(h*x + g)/g^2 - h*log(x)/g^2 - 1/(g*x)) - 1/4*b*e*((2*h^ 2*n*q*x^2*log(h*x + g)*log(x) + (g^2*n + 2*g^2*log(c) + 2*g^2*log(x^n))*lo g((h*x + g)^q) - 2*(h^2*q*x^2*log(h*x + g) - h^2*q*x^2*log(x) - g*h*q*x - g^2*log(f))*log(x^n))/(g^2*x^2) - 4*integrate(1/4*(2*g*h^2*n*q*x^2 + 2*g^3 *n*log(f) + 4*g^3*log(c)*log(f) + (3*g^2*h*n*q + 2*g^2*h*n*log(f) + 2*(g^2 *h*q + 2*g^2*h*log(f))*log(c))*x + 2*(2*h^3*n*q*x^3 + g*h^2*n*q*x^2)*log(x ))/(g^2*h*x^4 + g^3*x^3), x)) - 1/4*b*d*n/x^2 - 1/2*a*e*log((h*x + g)^q*f) /x^2 - 1/2*b*d*log(c*x^n)/x^2 - 1/2*a*d/x^2
\[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f (g+h x)^q\right )\right )}{x^3} \, dx=\int { \frac {{\left (e \log \left ({\left (h x + g\right )}^{q} f\right ) + d\right )} {\left (b \log \left (c x^{n}\right ) + a\right )}}{x^{3}} \,d x } \] Input:
integrate((a+b*log(c*x^n))*(d+e*log(f*(h*x+g)^q))/x^3,x, algorithm="giac")
Output:
integrate((e*log((h*x + g)^q*f) + d)*(b*log(c*x^n) + a)/x^3, x)
Timed out. \[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f (g+h x)^q\right )\right )}{x^3} \, dx=\int \frac {\left (d+e\,\ln \left (f\,{\left (g+h\,x\right )}^q\right )\right )\,\left (a+b\,\ln \left (c\,x^n\right )\right )}{x^3} \,d x \] Input:
int(((d + e*log(f*(g + h*x)^q))*(a + b*log(c*x^n)))/x^3,x)
Output:
int(((d + e*log(f*(g + h*x)^q))*(a + b*log(c*x^n)))/x^3, x)
\[ \int \frac {\left (a+b \log \left (c x^n\right )\right ) \left (d+e \log \left (f (g+h x)^q\right )\right )}{x^3} \, dx=\frac {-4 \left (\int \frac {\mathrm {log}\left (x^{n} c \right )}{h \,x^{4}+g \,x^{3}}d x \right ) b e \,g^{3} q \,x^{2}-4 \,\mathrm {log}\left (\left (h x +g \right )^{q} f \right ) \mathrm {log}\left (x^{n} c \right ) b e \,g^{2}-4 \,\mathrm {log}\left (\left (h x +g \right )^{q} f \right ) a e \,g^{2}+4 \,\mathrm {log}\left (\left (h x +g \right )^{q} f \right ) a e \,h^{2} x^{2}-2 \,\mathrm {log}\left (\left (h x +g \right )^{q} f \right ) b e \,g^{2} n +2 \,\mathrm {log}\left (\left (h x +g \right )^{q} f \right ) b e \,h^{2} n \,x^{2}-4 \,\mathrm {log}\left (x^{n} c \right ) b d \,g^{2}-2 \,\mathrm {log}\left (x^{n} c \right ) b e \,g^{2} q -4 \,\mathrm {log}\left (x \right ) a e \,h^{2} q \,x^{2}-2 \,\mathrm {log}\left (x \right ) b e \,h^{2} n q \,x^{2}-4 a d \,g^{2}-4 a e g h q x -2 b d \,g^{2} n -b e \,g^{2} n q -2 b e g h n q x}{8 g^{2} x^{2}} \] Input:
int((a+b*log(c*x^n))*(d+e*log(f*(h*x+g)^q))/x^3,x)
Output:
( - 4*int(log(x**n*c)/(g*x**3 + h*x**4),x)*b*e*g**3*q*x**2 - 4*log((g + h* x)**q*f)*log(x**n*c)*b*e*g**2 - 4*log((g + h*x)**q*f)*a*e*g**2 + 4*log((g + h*x)**q*f)*a*e*h**2*x**2 - 2*log((g + h*x)**q*f)*b*e*g**2*n + 2*log((g + h*x)**q*f)*b*e*h**2*n*x**2 - 4*log(x**n*c)*b*d*g**2 - 2*log(x**n*c)*b*e*g **2*q - 4*log(x)*a*e*h**2*q*x**2 - 2*log(x)*b*e*h**2*n*q*x**2 - 4*a*d*g**2 - 4*a*e*g*h*q*x - 2*b*d*g**2*n - b*e*g**2*n*q - 2*b*e*g*h*n*q*x)/(8*g**2* x**2)