\(\int \frac {A+B x+C x^2}{(a+b x) (c+d x) (e+f x) (g+h x)} \, dx\) [16]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [F(-1)]
Sympy [F(-1)]
Maxima [A] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 39, antiderivative size = 216 \[ \int \frac {A+B x+C x^2}{(a+b x) (c+d x) (e+f x) (g+h x)} \, dx=\frac {\left (A b^2-a (b B-a C)\right ) \log (a+b x)}{(b c-a d) (b e-a f) (b g-a h)}-\frac {\left (c^2 C-B c d+A d^2\right ) \log (c+d x)}{(b c-a d) (d e-c f) (d g-c h)}+\frac {\left (C e^2-B e f+A f^2\right ) \log (e+f x)}{(b e-a f) (d e-c f) (f g-e h)}-\frac {\left (C g^2-B g h+A h^2\right ) \log (g+h x)}{(b g-a h) (d g-c h) (f g-e h)} \] Output:

(A*b^2-a*(B*b-C*a))*ln(b*x+a)/(-a*d+b*c)/(-a*f+b*e)/(-a*h+b*g)-(A*d^2-B*c* 
d+C*c^2)*ln(d*x+c)/(-a*d+b*c)/(-c*f+d*e)/(-c*h+d*g)+(A*f^2-B*e*f+C*e^2)*ln 
(f*x+e)/(-a*f+b*e)/(-c*f+d*e)/(-e*h+f*g)-(A*h^2-B*g*h+C*g^2)*ln(h*x+g)/(-a 
*h+b*g)/(-c*h+d*g)/(-e*h+f*g)
 

Mathematica [A] (verified)

Time = 0.14 (sec) , antiderivative size = 218, normalized size of antiderivative = 1.01 \[ \int \frac {A+B x+C x^2}{(a+b x) (c+d x) (e+f x) (g+h x)} \, dx=-\frac {\left (-A b^2+a b B-a^2 C\right ) \log (a+b x)}{(b c-a d) (b e-a f) (b g-a h)}-\frac {\left (c^2 C-B c d+A d^2\right ) \log (c+d x)}{(b c-a d) (-d e+c f) (-d g+c h)}+\frac {\left (-C e^2+B e f-A f^2\right ) \log (e+f x)}{(b e-a f) (d e-c f) (-f g+e h)}-\frac {\left (C g^2-B g h+A h^2\right ) \log (g+h x)}{(b g-a h) (d g-c h) (f g-e h)} \] Input:

Integrate[(A + B*x + C*x^2)/((a + b*x)*(c + d*x)*(e + f*x)*(g + h*x)),x]
 

Output:

-(((-(A*b^2) + a*b*B - a^2*C)*Log[a + b*x])/((b*c - a*d)*(b*e - a*f)*(b*g 
- a*h))) - ((c^2*C - B*c*d + A*d^2)*Log[c + d*x])/((b*c - a*d)*(-(d*e) + c 
*f)*(-(d*g) + c*h)) + ((-(C*e^2) + B*e*f - A*f^2)*Log[e + f*x])/((b*e - a* 
f)*(d*e - c*f)*(-(f*g) + e*h)) - ((C*g^2 - B*g*h + A*h^2)*Log[g + h*x])/(( 
b*g - a*h)*(d*g - c*h)*(f*g - e*h))
 

Rubi [A] (verified)

Time = 0.72 (sec) , antiderivative size = 216, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.051, Rules used = {2109, 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 {A+B x+C x^2}{(a+b x) (c+d x) (e+f x) (g+h x)} \, dx\)

\(\Big \downarrow \) 2109

\(\displaystyle \int \left (\frac {b \left (A b^2-a (b B-a C)\right )}{(a+b x) (b c-a d) (b e-a f) (b g-a h)}-\frac {d \left (A d^2-B c d+c^2 C\right )}{(c+d x) (b c-a d) (c f-d e) (c h-d g)}-\frac {f \left (A f^2-B e f+C e^2\right )}{(e+f x) (b e-a f) (d e-c f) (e h-f g)}-\frac {h \left (A h^2-B g h+C g^2\right )}{(g+h x) (b g-a h) (d g-c h) (f g-e h)}\right )dx\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {\log (a+b x) \left (A b^2-a (b B-a C)\right )}{(b c-a d) (b e-a f) (b g-a h)}-\frac {\log (c+d x) \left (A d^2-B c d+c^2 C\right )}{(b c-a d) (d e-c f) (d g-c h)}+\frac {\log (e+f x) \left (A f^2-B e f+C e^2\right )}{(b e-a f) (d e-c f) (f g-e h)}-\frac {\log (g+h x) \left (A h^2-B g h+C g^2\right )}{(b g-a h) (d g-c h) (f g-e h)}\)

Input:

Int[(A + B*x + C*x^2)/((a + b*x)*(c + d*x)*(e + f*x)*(g + h*x)),x]
 

Output:

((A*b^2 - a*(b*B - a*C))*Log[a + b*x])/((b*c - a*d)*(b*e - a*f)*(b*g - a*h 
)) - ((c^2*C - B*c*d + A*d^2)*Log[c + d*x])/((b*c - a*d)*(d*e - c*f)*(d*g 
- c*h)) + ((C*e^2 - B*e*f + A*f^2)*Log[e + f*x])/((b*e - a*f)*(d*e - c*f)* 
(f*g - e*h)) - ((C*g^2 - B*g*h + A*h^2)*Log[g + h*x])/((b*g - a*h)*(d*g - 
c*h)*(f*g - e*h))
 

Defintions of rubi rules used

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

rule 2109
Int[(Px_)*((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f 
_.)*(x_))^(p_.)*((g_.) + (h_.)*(x_))^(q_.), x_Symbol] :> Int[ExpandIntegran 
d[Px*(a + b*x)^m*(c + d*x)^n*(e + f*x)^p*(g + h*x)^q, x], x] /; FreeQ[{a, b 
, c, d, e, f, g, h, m, n, p, q}, x] && PolyQ[Px, x] && IntegersQ[m, n]
 
Maple [A] (verified)

Time = 1.37 (sec) , antiderivative size = 216, normalized size of antiderivative = 1.00

method result size
default \(\frac {\left (d^{2} A -c d B +C \,c^{2}\right ) \ln \left (x d +c \right )}{\left (c h -d g \right ) \left (c f -d e \right ) \left (a d -b c \right )}-\frac {\left (b^{2} A -a b B +a^{2} C \right ) \ln \left (b x +a \right )}{\left (a h -b g \right ) \left (a f -b e \right ) \left (a d -b c \right )}+\frac {\left (A \,h^{2}-B g h +C \,g^{2}\right ) \ln \left (h x +g \right )}{\left (a h -b g \right ) \left (c h -d g \right ) \left (e h -f g \right )}-\frac {\left (A \,f^{2}-B e f +C \,e^{2}\right ) \ln \left (f x +e \right )}{\left (c f -d e \right ) \left (a f -b e \right ) \left (e h -f g \right )}\) \(216\)
norman \(\frac {\left (A \,h^{2}-B g h +C \,g^{2}\right ) \ln \left (h x +g \right )}{a c e \,h^{3}-a c f g \,h^{2}-a d e g \,h^{2}+a d f \,g^{2} h -b c e g \,h^{2}+b c f \,g^{2} h +b d e \,g^{2} h -b d f \,g^{3}}+\frac {\left (d^{2} A -c d B +C \,c^{2}\right ) \ln \left (x d +c \right )}{\left (c h -d g \right ) \left (c f -d e \right ) \left (a d -b c \right )}-\frac {\left (A \,f^{2}-B e f +C \,e^{2}\right ) \ln \left (f x +e \right )}{\left (a c \,f^{2}-a d e f -b c e f +b d \,e^{2}\right ) \left (e h -f g \right )}-\frac {\left (b^{2} A -a b B +a^{2} C \right ) \ln \left (b x +a \right )}{\left (a h -b g \right ) \left (a f -b e \right ) \left (a d -b c \right )}\) \(262\)
risch \(-\frac {\ln \left (-f x -e \right ) A \,f^{2}}{a c e \,f^{2} h -a c \,f^{3} g -a d \,e^{2} f h +a d e \,f^{2} g -b c \,e^{2} f h +b c e \,f^{2} g +b d \,e^{3} h -b d \,e^{2} f g}+\frac {\ln \left (-f x -e \right ) B e f}{a c e \,f^{2} h -a c \,f^{3} g -a d \,e^{2} f h +a d e \,f^{2} g -b c \,e^{2} f h +b c e \,f^{2} g +b d \,e^{3} h -b d \,e^{2} f g}-\frac {\ln \left (-f x -e \right ) C \,e^{2}}{a c e \,f^{2} h -a c \,f^{3} g -a d \,e^{2} f h +a d e \,f^{2} g -b c \,e^{2} f h +b c e \,f^{2} g +b d \,e^{3} h -b d \,e^{2} f g}+\frac {\ln \left (-x d -c \right ) d^{2} A}{a \,c^{2} d f h -a c \,d^{2} e h -a c \,d^{2} f g +a \,d^{3} e g -c^{3} h b f +b \,c^{2} d e h +b \,c^{2} d f g -b c \,d^{2} e g}-\frac {\ln \left (-x d -c \right ) c d B}{a \,c^{2} d f h -a c \,d^{2} e h -a c \,d^{2} f g +a \,d^{3} e g -c^{3} h b f +b \,c^{2} d e h +b \,c^{2} d f g -b c \,d^{2} e g}+\frac {\ln \left (-x d -c \right ) C \,c^{2}}{a \,c^{2} d f h -a c \,d^{2} e h -a c \,d^{2} f g +a \,d^{3} e g -c^{3} h b f +b \,c^{2} d e h +b \,c^{2} d f g -b c \,d^{2} e g}-\frac {\ln \left (b x +a \right ) b^{2} A}{a^{3} d f h -a^{2} b c f h -a^{2} b d e h -a^{2} b d f g +a \,b^{2} c e h +a \,b^{2} c f g +a \,b^{2} d e g -b^{3} c e g}+\frac {\ln \left (b x +a \right ) a b B}{a^{3} d f h -a^{2} b c f h -a^{2} b d e h -a^{2} b d f g +a \,b^{2} c e h +a \,b^{2} c f g +a \,b^{2} d e g -b^{3} c e g}-\frac {\ln \left (b x +a \right ) a^{2} C}{a^{3} d f h -a^{2} b c f h -a^{2} b d e h -a^{2} b d f g +a \,b^{2} c e h +a \,b^{2} c f g +a \,b^{2} d e g -b^{3} c e g}+\frac {\ln \left (h x +g \right ) A \,h^{2}}{a c e \,h^{3}-a c f g \,h^{2}-a d e g \,h^{2}+a d f \,g^{2} h -b c e g \,h^{2}+b c f \,g^{2} h +b d e \,g^{2} h -b d f \,g^{3}}-\frac {\ln \left (h x +g \right ) B g h}{a c e \,h^{3}-a c f g \,h^{2}-a d e g \,h^{2}+a d f \,g^{2} h -b c e g \,h^{2}+b c f \,g^{2} h +b d e \,g^{2} h -b d f \,g^{3}}+\frac {\ln \left (h x +g \right ) C \,g^{2}}{a c e \,h^{3}-a c f g \,h^{2}-a d e g \,h^{2}+a d f \,g^{2} h -b c e g \,h^{2}+b c f \,g^{2} h +b d e \,g^{2} h -b d f \,g^{3}}\) \(982\)
parallelrisch \(\text {Expression too large to display}\) \(1490\)

Input:

int((C*x^2+B*x+A)/(b*x+a)/(d*x+c)/(f*x+e)/(h*x+g),x,method=_RETURNVERBOSE)
 

Output:

(A*d^2-B*c*d+C*c^2)/(c*h-d*g)/(c*f-d*e)/(a*d-b*c)*ln(d*x+c)-(A*b^2-B*a*b+C 
*a^2)/(a*h-b*g)/(a*f-b*e)/(a*d-b*c)*ln(b*x+a)+(A*h^2-B*g*h+C*g^2)/(a*h-b*g 
)/(c*h-d*g)/(e*h-f*g)*ln(h*x+g)-(A*f^2-B*e*f+C*e^2)/(c*f-d*e)/(a*f-b*e)/(e 
*h-f*g)*ln(f*x+e)
 

Fricas [F(-1)]

Timed out. \[ \int \frac {A+B x+C x^2}{(a+b x) (c+d x) (e+f x) (g+h x)} \, dx=\text {Timed out} \] Input:

integrate((C*x^2+B*x+A)/(b*x+a)/(d*x+c)/(f*x+e)/(h*x+g),x, algorithm="fric 
as")
 

Output:

Timed out
 

Sympy [F(-1)]

Timed out. \[ \int \frac {A+B x+C x^2}{(a+b x) (c+d x) (e+f x) (g+h x)} \, dx=\text {Timed out} \] Input:

integrate((C*x**2+B*x+A)/(b*x+a)/(d*x+c)/(f*x+e)/(h*x+g),x)
 

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 362, normalized size of antiderivative = 1.68 \[ \int \frac {A+B x+C x^2}{(a+b x) (c+d x) (e+f x) (g+h x)} \, dx=\frac {{\left (C a^{2} - B a b + A b^{2}\right )} \log \left (b x + a\right )}{{\left ({\left (b^{3} c - a b^{2} d\right )} e - {\left (a b^{2} c - a^{2} b d\right )} f\right )} g - {\left ({\left (a b^{2} c - a^{2} b d\right )} e - {\left (a^{2} b c - a^{3} d\right )} f\right )} h} - \frac {{\left (C c^{2} - B c d + A d^{2}\right )} \log \left (d x + c\right )}{{\left ({\left (b c d^{2} - a d^{3}\right )} e - {\left (b c^{2} d - a c d^{2}\right )} f\right )} g - {\left ({\left (b c^{2} d - a c d^{2}\right )} e - {\left (b c^{3} - a c^{2} d\right )} f\right )} h} + \frac {{\left (C e^{2} - B e f + A f^{2}\right )} \log \left (f x + e\right )}{{\left (b d e^{2} f + a c f^{3} - {\left (b c + a d\right )} e f^{2}\right )} g - {\left (b d e^{3} + a c e f^{2} - {\left (b c + a d\right )} e^{2} f\right )} h} - \frac {{\left (C g^{2} - B g h + A h^{2}\right )} \log \left (h x + g\right )}{b d f g^{3} - a c e h^{3} - {\left (b d e + {\left (b c + a d\right )} f\right )} g^{2} h + {\left (a c f + {\left (b c + a d\right )} e\right )} g h^{2}} \] Input:

integrate((C*x^2+B*x+A)/(b*x+a)/(d*x+c)/(f*x+e)/(h*x+g),x, algorithm="maxi 
ma")
 

Output:

(C*a^2 - B*a*b + A*b^2)*log(b*x + a)/(((b^3*c - a*b^2*d)*e - (a*b^2*c - a^ 
2*b*d)*f)*g - ((a*b^2*c - a^2*b*d)*e - (a^2*b*c - a^3*d)*f)*h) - (C*c^2 - 
B*c*d + A*d^2)*log(d*x + c)/(((b*c*d^2 - a*d^3)*e - (b*c^2*d - a*c*d^2)*f) 
*g - ((b*c^2*d - a*c*d^2)*e - (b*c^3 - a*c^2*d)*f)*h) + (C*e^2 - B*e*f + A 
*f^2)*log(f*x + e)/((b*d*e^2*f + a*c*f^3 - (b*c + a*d)*e*f^2)*g - (b*d*e^3 
 + a*c*e*f^2 - (b*c + a*d)*e^2*f)*h) - (C*g^2 - B*g*h + A*h^2)*log(h*x + g 
)/(b*d*f*g^3 - a*c*e*h^3 - (b*d*e + (b*c + a*d)*f)*g^2*h + (a*c*f + (b*c + 
 a*d)*e)*g*h^2)
 

Giac [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 415, normalized size of antiderivative = 1.92 \[ \int \frac {A+B x+C x^2}{(a+b x) (c+d x) (e+f x) (g+h x)} \, dx=\frac {{\left (C a^{2} b - B a b^{2} + A b^{3}\right )} \log \left ({\left | b x + a \right |}\right )}{b^{4} c e g - a b^{3} d e g - a b^{3} c f g + a^{2} b^{2} d f g - a b^{3} c e h + a^{2} b^{2} d e h + a^{2} b^{2} c f h - a^{3} b d f h} - \frac {{\left (C c^{2} d - B c d^{2} + A d^{3}\right )} \log \left ({\left | d x + c \right |}\right )}{b c d^{3} e g - a d^{4} e g - b c^{2} d^{2} f g + a c d^{3} f g - b c^{2} d^{2} e h + a c d^{3} e h + b c^{3} d f h - a c^{2} d^{2} f h} + \frac {{\left (C e^{2} f - B e f^{2} + A f^{3}\right )} \log \left ({\left | f x + e \right |}\right )}{b d e^{2} f^{2} g - b c e f^{3} g - a d e f^{3} g + a c f^{4} g - b d e^{3} f h + b c e^{2} f^{2} h + a d e^{2} f^{2} h - a c e f^{3} h} - \frac {{\left (C g^{2} h - B g h^{2} + A h^{3}\right )} \log \left ({\left | h x + g \right |}\right )}{b d f g^{3} h - b d e g^{2} h^{2} - b c f g^{2} h^{2} - a d f g^{2} h^{2} + b c e g h^{3} + a d e g h^{3} + a c f g h^{3} - a c e h^{4}} \] Input:

integrate((C*x^2+B*x+A)/(b*x+a)/(d*x+c)/(f*x+e)/(h*x+g),x, algorithm="giac 
")
 

Output:

(C*a^2*b - B*a*b^2 + A*b^3)*log(abs(b*x + a))/(b^4*c*e*g - a*b^3*d*e*g - a 
*b^3*c*f*g + a^2*b^2*d*f*g - a*b^3*c*e*h + a^2*b^2*d*e*h + a^2*b^2*c*f*h - 
 a^3*b*d*f*h) - (C*c^2*d - B*c*d^2 + A*d^3)*log(abs(d*x + c))/(b*c*d^3*e*g 
 - a*d^4*e*g - b*c^2*d^2*f*g + a*c*d^3*f*g - b*c^2*d^2*e*h + a*c*d^3*e*h + 
 b*c^3*d*f*h - a*c^2*d^2*f*h) + (C*e^2*f - B*e*f^2 + A*f^3)*log(abs(f*x + 
e))/(b*d*e^2*f^2*g - b*c*e*f^3*g - a*d*e*f^3*g + a*c*f^4*g - b*d*e^3*f*h + 
 b*c*e^2*f^2*h + a*d*e^2*f^2*h - a*c*e*f^3*h) - (C*g^2*h - B*g*h^2 + A*h^3 
)*log(abs(h*x + g))/(b*d*f*g^3*h - b*d*e*g^2*h^2 - b*c*f*g^2*h^2 - a*d*f*g 
^2*h^2 + b*c*e*g*h^3 + a*d*e*g*h^3 + a*c*f*g*h^3 - a*c*e*h^4)
 

Mupad [B] (verification not implemented)

Time = 10.59 (sec) , antiderivative size = 82899, normalized size of antiderivative = 383.79 \[ \int \frac {A+B x+C x^2}{(a+b x) (c+d x) (e+f x) (g+h x)} \, dx=\text {Too large to display} \] Input:

int((A + B*x + C*x^2)/((e + f*x)*(g + h*x)*(a + b*x)*(c + d*x)),x)
 

Output:

symsum(log(x*(B^3*b^2*d^2*f^2*h^2 - 2*A*B*C*b^2*d^2*f^2*h^2 + A*C^2*a*b*d^ 
2*f^2*h^2 - B^2*C*a*b*d^2*f^2*h^2 + A*C^2*b^2*c*d*f^2*h^2 - B^2*C*b^2*c*d* 
f^2*h^2 + A*C^2*b^2*d^2*e*f*h^2 - B^2*C*b^2*d^2*e*f*h^2 + A*C^2*b^2*d^2*f^ 
2*g*h - B^2*C*b^2*d^2*f^2*g*h - C^3*a*b*c*d*e*f*h^2 - C^3*a*b*c*d*f^2*g*h 
- C^3*a*b*d^2*e*f*g*h - C^3*b^2*c*d*e*f*g*h + B*C^2*a*b*c*d*f^2*h^2 + B*C^ 
2*a*b*d^2*e*f*h^2 + B*C^2*a*b*d^2*f^2*g*h + B*C^2*b^2*c*d*e*f*h^2 + B*C^2* 
b^2*c*d*f^2*g*h + B*C^2*b^2*d^2*e*f*g*h) - root(4*a^5*b*c^3*d^3*e^2*f^4*g^ 
2*h^4*z^4 + 4*a^5*b*c^2*d^4*e^3*f^3*g^2*h^4*z^4 + 4*a^5*b*c^2*d^4*e^2*f^4* 
g^3*h^3*z^4 + 4*a^4*b^2*c^4*d^2*e^3*f^3*g*h^5*z^4 + 4*a^4*b^2*c^4*d^2*e*f^ 
5*g^3*h^3*z^4 + 4*a^4*b^2*c^3*d^3*e^4*f^2*g*h^5*z^4 + 4*a^4*b^2*c^3*d^3*e* 
f^5*g^4*h^2*z^4 + 4*a^4*b^2*c*d^5*e^4*f^2*g^3*h^3*z^4 + 4*a^4*b^2*c*d^5*e^ 
3*f^3*g^4*h^2*z^4 + 4*a^3*b^3*c^5*d*e^2*f^4*g^2*h^4*z^4 + 4*a^3*b^3*c^4*d^ 
2*e^4*f^2*g*h^5*z^4 + 4*a^3*b^3*c^4*d^2*e*f^5*g^4*h^2*z^4 + 4*a^3*b^3*c^2* 
d^4*e^5*f*g^2*h^4*z^4 + 4*a^3*b^3*c^2*d^4*e^2*f^4*g^5*h*z^4 + 4*a^3*b^3*c* 
d^5*e^4*f^2*g^4*h^2*z^4 + 4*a^2*b^4*c^5*d*e^3*f^3*g^2*h^4*z^4 + 4*a^2*b^4* 
c^5*d*e^2*f^4*g^3*h^3*z^4 + 4*a^2*b^4*c^3*d^3*e^5*f*g^2*h^4*z^4 + 4*a^2*b^ 
4*c^3*d^3*e^2*f^4*g^5*h*z^4 + 4*a^2*b^4*c^2*d^4*e^5*f*g^3*h^3*z^4 + 4*a^2* 
b^4*c^2*d^4*e^3*f^3*g^5*h*z^4 + 4*a*b^5*c^4*d^2*e^4*f^2*g^3*h^3*z^4 + 4*a* 
b^5*c^4*d^2*e^3*f^3*g^4*h^2*z^4 + 4*a*b^5*c^3*d^3*e^4*f^2*g^4*h^2*z^4 + 4* 
a^5*b*c^5*d*e*f^5*g*h^5*z^4 + 4*a^5*b*c*d^5*e^5*f*g*h^5*z^4 + 4*a^5*b*c...
 

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 1523, normalized size of antiderivative = 7.05 \[ \int \frac {A+B x+C x^2}{(a+b x) (c+d x) (e+f x) (g+h x)} \, dx =\text {Too large to display} \] Input:

int((C*x^2+B*x+A)/(b*x+a)/(d*x+c)/(f*x+e)/(h*x+g),x)
 

Output:

( - log(a + b*x)*a**2*c**3*e*f*h**2 + log(a + b*x)*a**2*c**3*f**2*g*h + lo 
g(a + b*x)*a**2*c**2*d*e**2*h**2 - log(a + b*x)*a**2*c**2*d*f**2*g**2 - lo 
g(a + b*x)*a**2*c*d**2*e**2*g*h + log(a + b*x)*a**2*c*d**2*e*f*g**2 + log( 
c + d*x)*a**3*d**2*e*f*h**2 - log(c + d*x)*a**3*d**2*f**2*g*h - log(c + d* 
x)*a**2*b*c*d*e*f*h**2 + log(c + d*x)*a**2*b*c*d*f**2*g*h - log(c + d*x)*a 
**2*b*d**2*e**2*h**2 + log(c + d*x)*a**2*b*d**2*f**2*g**2 + log(c + d*x)*a 
**2*c**3*e*f*h**2 - log(c + d*x)*a**2*c**3*f**2*g*h + log(c + d*x)*a*b**2* 
c*d*e**2*h**2 - log(c + d*x)*a*b**2*c*d*f**2*g**2 + log(c + d*x)*a*b**2*d* 
*2*e**2*g*h - log(c + d*x)*a*b**2*d**2*e*f*g**2 - log(c + d*x)*a*b*c**3*e* 
*2*h**2 + log(c + d*x)*a*b*c**3*f**2*g**2 - log(c + d*x)*b**3*c*d*e**2*g*h 
 + log(c + d*x)*b**3*c*d*e*f*g**2 + log(c + d*x)*b**2*c**3*e**2*g*h - log( 
c + d*x)*b**2*c**3*e*f*g**2 - log(e + f*x)*a**3*c*d*f**2*h**2 + log(e + f* 
x)*a**3*d**2*f**2*g*h + log(e + f*x)*a**2*b*c**2*f**2*h**2 + log(e + f*x)* 
a**2*b*c*d*e*f*h**2 - log(e + f*x)*a**2*b*d**2*e*f*g*h - log(e + f*x)*a**2 
*b*d**2*f**2*g**2 - log(e + f*x)*a**2*c**2*d*e**2*h**2 + log(e + f*x)*a**2 
*c*d**2*e**2*g*h - log(e + f*x)*a*b**2*c**2*e*f*h**2 - log(e + f*x)*a*b**2 
*c**2*f**2*g*h + log(e + f*x)*a*b**2*c*d*f**2*g**2 + log(e + f*x)*a*b**2*d 
**2*e*f*g**2 + log(e + f*x)*a*b*c**3*e**2*h**2 - log(e + f*x)*a*b*c*d**2*e 
**2*g**2 + log(e + f*x)*b**3*c**2*e*f*g*h - log(e + f*x)*b**3*c*d*e*f*g**2 
 - log(e + f*x)*b**2*c**3*e**2*g*h + log(e + f*x)*b**2*c**2*d*e**2*g**2...