\(\int \frac {A+B \log (e (\frac {a+b x}{c+d x})^n)}{(a g+b g x)^3} \, dx\) [7]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
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 = 33, antiderivative size = 151 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x)^3} \, dx=-\frac {B n}{4 b g^3 (a+b x)^2}+\frac {B d n}{2 b (b c-a d) g^3 (a+b x)}+\frac {B d^2 n \log (a+b x)}{2 b (b c-a d)^2 g^3}-\frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{2 b g^3 (a+b x)^2}-\frac {B d^2 n \log (c+d x)}{2 b (b c-a d)^2 g^3} \] Output:

-1/4*B*n/b/g^3/(b*x+a)^2+1/2*B*d*n/b/(-a*d+b*c)/g^3/(b*x+a)+1/2*B*d^2*n*ln 
(b*x+a)/b/(-a*d+b*c)^2/g^3-1/2*(A+B*ln(e*((b*x+a)/(d*x+c))^n))/b/g^3/(b*x+ 
a)^2-1/2*B*d^2*n*ln(d*x+c)/b/(-a*d+b*c)^2/g^3
 

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.75 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x)^3} \, dx=-\frac {2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )+\frac {B n \left ((b c-a d) (-3 a d+b (c-2 d x))-2 d^2 (a+b x)^2 \log (a+b x)+2 d^2 (a+b x)^2 \log (c+d x)\right )}{(b c-a d)^2}}{4 b g^3 (a+b x)^2} \] Input:

Integrate[(A + B*Log[e*((a + b*x)/(c + d*x))^n])/(a*g + b*g*x)^3,x]
 

Output:

-1/4*(2*(A + B*Log[e*((a + b*x)/(c + d*x))^n]) + (B*n*((b*c - a*d)*(-3*a*d 
 + b*(c - 2*d*x)) - 2*d^2*(a + b*x)^2*Log[a + b*x] + 2*d^2*(a + b*x)^2*Log 
[c + d*x]))/(b*c - a*d)^2)/(b*g^3*(a + b*x)^2)
 

Rubi [A] (verified)

Time = 0.35 (sec) , antiderivative size = 142, normalized size of antiderivative = 0.94, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.121, Rules used = {2947, 27, 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 {B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A}{(a g+b g x)^3} \, dx\)

\(\Big \downarrow \) 2947

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 54

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {B n (b c-a d) \left (\frac {d^2 \log (a+b x)}{(b c-a d)^3}-\frac {d^2 \log (c+d x)}{(b c-a d)^3}+\frac {d}{(a+b x) (b c-a d)^2}-\frac {1}{2 (a+b x)^2 (b c-a d)}\right )}{2 b g^3}-\frac {B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A}{2 b g^3 (a+b x)^2}\)

Input:

Int[(A + B*Log[e*((a + b*x)/(c + d*x))^n])/(a*g + b*g*x)^3,x]
 

Output:

-1/2*(A + B*Log[e*((a + b*x)/(c + d*x))^n])/(b*g^3*(a + b*x)^2) + (B*(b*c 
- a*d)*n*(-1/2*1/((b*c - a*d)*(a + b*x)^2) + d/((b*c - a*d)^2*(a + b*x)) + 
 (d^2*Log[a + b*x])/(b*c - a*d)^3 - (d^2*Log[c + d*x])/(b*c - a*d)^3))/(2* 
b*g^3)
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 54
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])
 

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

rule 2947
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( 
B_.))*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(f + g*x)^(m + 1)*((A + 
 B*Log[e*((a + b*x)/(c + d*x))^n])/(g*(m + 1))), x] - Simp[B*n*((b*c - a*d) 
/(g*(m + 1)))   Int[(f + g*x)^(m + 1)/((a + b*x)*(c + d*x)), x], x] /; Free 
Q[{a, b, c, d, e, f, g, A, B, m, n}, x] && NeQ[b*c - a*d, 0] && NeQ[m, -1] 
&& NeQ[m, -2]
 
Maple [A] (verified)

Time = 4.73 (sec) , antiderivative size = 271, normalized size of antiderivative = 1.79

method result size
parallelrisch \(-\frac {-4 B x \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) a \,b^{4} d^{3} n -4 B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) a \,b^{4} c \,d^{2} n +3 B \,a^{2} b^{3} d^{3} n^{2}+B \,b^{5} c^{2} d \,n^{2}+2 A \,a^{2} b^{3} d^{3} n +2 A \,b^{5} c^{2} d n -2 B \,x^{2} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{5} d^{3} n +2 B x a \,b^{4} d^{3} n^{2}-2 B x \,b^{5} c \,d^{2} n^{2}+2 B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) b^{5} c^{2} d n -4 B a \,b^{4} c \,d^{2} n^{2}-4 A a \,b^{4} c \,d^{2} n}{4 g^{3} \left (b x +a \right )^{2} n \left (a^{2} d^{2}-2 a c d b +c^{2} b^{2}\right ) b^{4} d}\) \(271\)

Input:

int((A+B*ln(e*((b*x+a)/(d*x+c))^n))/(b*g*x+a*g)^3,x,method=_RETURNVERBOSE)
 

Output:

-1/4*(-4*B*x*ln(e*((b*x+a)/(d*x+c))^n)*a*b^4*d^3*n-4*B*ln(e*((b*x+a)/(d*x+ 
c))^n)*a*b^4*c*d^2*n+3*B*a^2*b^3*d^3*n^2+B*b^5*c^2*d*n^2+2*A*a^2*b^3*d^3*n 
+2*A*b^5*c^2*d*n-2*B*x^2*ln(e*((b*x+a)/(d*x+c))^n)*b^5*d^3*n+2*B*x*a*b^4*d 
^3*n^2-2*B*x*b^5*c*d^2*n^2+2*B*ln(e*((b*x+a)/(d*x+c))^n)*b^5*c^2*d*n-4*B*a 
*b^4*c*d^2*n^2-4*A*a*b^4*c*d^2*n)/g^3/(b*x+a)^2/n/(a^2*d^2-2*a*b*c*d+b^2*c 
^2)/b^4/d
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 265, normalized size of antiderivative = 1.75 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x)^3} \, dx=-\frac {2 \, A b^{2} c^{2} - 4 \, A a b c d + 2 \, A a^{2} d^{2} - 2 \, {\left (B b^{2} c d - B a b d^{2}\right )} n x + {\left (B b^{2} c^{2} - 4 \, B a b c d + 3 \, B a^{2} d^{2}\right )} n + 2 \, {\left (B b^{2} c^{2} - 2 \, B a b c d + B a^{2} d^{2}\right )} \log \left (e\right ) - 2 \, {\left (B b^{2} d^{2} n x^{2} + 2 \, B a b d^{2} n x - {\left (B b^{2} c^{2} - 2 \, B a b c d\right )} n\right )} \log \left (\frac {b x + a}{d x + c}\right )}{4 \, {\left ({\left (b^{5} c^{2} - 2 \, a b^{4} c d + a^{2} b^{3} d^{2}\right )} g^{3} x^{2} + 2 \, {\left (a b^{4} c^{2} - 2 \, a^{2} b^{3} c d + a^{3} b^{2} d^{2}\right )} g^{3} x + {\left (a^{2} b^{3} c^{2} - 2 \, a^{3} b^{2} c d + a^{4} b d^{2}\right )} g^{3}\right )}} \] Input:

integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))/(b*g*x+a*g)^3,x, algorithm="fri 
cas")
 

Output:

-1/4*(2*A*b^2*c^2 - 4*A*a*b*c*d + 2*A*a^2*d^2 - 2*(B*b^2*c*d - B*a*b*d^2)* 
n*x + (B*b^2*c^2 - 4*B*a*b*c*d + 3*B*a^2*d^2)*n + 2*(B*b^2*c^2 - 2*B*a*b*c 
*d + B*a^2*d^2)*log(e) - 2*(B*b^2*d^2*n*x^2 + 2*B*a*b*d^2*n*x - (B*b^2*c^2 
 - 2*B*a*b*c*d)*n)*log((b*x + a)/(d*x + c)))/((b^5*c^2 - 2*a*b^4*c*d + a^2 
*b^3*d^2)*g^3*x^2 + 2*(a*b^4*c^2 - 2*a^2*b^3*c*d + a^3*b^2*d^2)*g^3*x + (a 
^2*b^3*c^2 - 2*a^3*b^2*c*d + a^4*b*d^2)*g^3)
 

Sympy [F(-1)]

Timed out. \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x)^3} \, dx=\text {Timed out} \] Input:

integrate((A+B*ln(e*((b*x+a)/(d*x+c))**n))/(b*g*x+a*g)**3,x)
 

Output:

Timed out
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 259, normalized size of antiderivative = 1.72 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x)^3} \, dx=\frac {1}{4} \, B n {\left (\frac {2 \, b d x - b c + 3 \, a d}{{\left (b^{4} c - a b^{3} d\right )} g^{3} x^{2} + 2 \, {\left (a b^{3} c - a^{2} b^{2} d\right )} g^{3} x + {\left (a^{2} b^{2} c - a^{3} b d\right )} g^{3}} + \frac {2 \, d^{2} \log \left (b x + a\right )}{{\left (b^{3} c^{2} - 2 \, a b^{2} c d + a^{2} b d^{2}\right )} g^{3}} - \frac {2 \, d^{2} \log \left (d x + c\right )}{{\left (b^{3} c^{2} - 2 \, a b^{2} c d + a^{2} b d^{2}\right )} g^{3}}\right )} - \frac {B \log \left (e {\left (\frac {b x}{d x + c} + \frac {a}{d x + c}\right )}^{n}\right )}{2 \, {\left (b^{3} g^{3} x^{2} + 2 \, a b^{2} g^{3} x + a^{2} b g^{3}\right )}} - \frac {A}{2 \, {\left (b^{3} g^{3} x^{2} + 2 \, a b^{2} g^{3} x + a^{2} b g^{3}\right )}} \] Input:

integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))/(b*g*x+a*g)^3,x, algorithm="max 
ima")
 

Output:

1/4*B*n*((2*b*d*x - b*c + 3*a*d)/((b^4*c - a*b^3*d)*g^3*x^2 + 2*(a*b^3*c - 
 a^2*b^2*d)*g^3*x + (a^2*b^2*c - a^3*b*d)*g^3) + 2*d^2*log(b*x + a)/((b^3* 
c^2 - 2*a*b^2*c*d + a^2*b*d^2)*g^3) - 2*d^2*log(d*x + c)/((b^3*c^2 - 2*a*b 
^2*c*d + a^2*b*d^2)*g^3)) - 1/2*B*log(e*(b*x/(d*x + c) + a/(d*x + c))^n)/( 
b^3*g^3*x^2 + 2*a*b^2*g^3*x + a^2*b*g^3) - 1/2*A/(b^3*g^3*x^2 + 2*a*b^2*g^ 
3*x + a^2*b*g^3)
 

Giac [A] (verification not implemented)

Time = 0.56 (sec) , antiderivative size = 224, normalized size of antiderivative = 1.48 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x)^3} \, dx=-\frac {1}{4} \, {\left (\frac {2 \, {\left (B b n - \frac {2 \, {\left (b x + a\right )} B d n}{d x + c}\right )} \log \left (\frac {b x + a}{d x + c}\right )}{\frac {{\left (b x + a\right )}^{2} b c g^{3}}{{\left (d x + c\right )}^{2}} - \frac {{\left (b x + a\right )}^{2} a d g^{3}}{{\left (d x + c\right )}^{2}}} + \frac {B b n - \frac {4 \, {\left (b x + a\right )} B d n}{d x + c} + 2 \, B b \log \left (e\right ) - \frac {4 \, {\left (b x + a\right )} B d \log \left (e\right )}{d x + c} + 2 \, A b - \frac {4 \, {\left (b x + a\right )} A d}{d x + c}}{\frac {{\left (b x + a\right )}^{2} b c g^{3}}{{\left (d x + c\right )}^{2}} - \frac {{\left (b x + a\right )}^{2} a d g^{3}}{{\left (d x + c\right )}^{2}}}\right )} {\left (\frac {b c}{{\left (b c - a d\right )}^{2}} - \frac {a d}{{\left (b c - a d\right )}^{2}}\right )} \] Input:

integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))/(b*g*x+a*g)^3,x, algorithm="gia 
c")
 

Output:

-1/4*(2*(B*b*n - 2*(b*x + a)*B*d*n/(d*x + c))*log((b*x + a)/(d*x + c))/((b 
*x + a)^2*b*c*g^3/(d*x + c)^2 - (b*x + a)^2*a*d*g^3/(d*x + c)^2) + (B*b*n 
- 4*(b*x + a)*B*d*n/(d*x + c) + 2*B*b*log(e) - 4*(b*x + a)*B*d*log(e)/(d*x 
 + c) + 2*A*b - 4*(b*x + a)*A*d/(d*x + c))/((b*x + a)^2*b*c*g^3/(d*x + c)^ 
2 - (b*x + a)^2*a*d*g^3/(d*x + c)^2))*(b*c/(b*c - a*d)^2 - a*d/(b*c - a*d) 
^2)
 

Mupad [B] (verification not implemented)

Time = 26.12 (sec) , antiderivative size = 222, normalized size of antiderivative = 1.47 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x)^3} \, dx=-\frac {\frac {2\,A\,a\,d-2\,A\,b\,c+3\,B\,a\,d\,n-B\,b\,c\,n}{2\,\left (a\,d-b\,c\right )}+\frac {B\,b\,d\,n\,x}{a\,d-b\,c}}{2\,a^2\,b\,g^3+4\,a\,b^2\,g^3\,x+2\,b^3\,g^3\,x^2}-\frac {B\,\ln \left (e\,{\left (\frac {a+b\,x}{c+d\,x}\right )}^n\right )}{2\,b\,\left (a^2\,g^3+2\,a\,b\,g^3\,x+b^2\,g^3\,x^2\right )}-\frac {B\,d^2\,n\,\mathrm {atanh}\left (\frac {2\,b^3\,c^2\,g^3-2\,a^2\,b\,d^2\,g^3}{2\,b\,g^3\,{\left (a\,d-b\,c\right )}^2}-\frac {2\,b\,d\,x}{a\,d-b\,c}\right )}{b\,g^3\,{\left (a\,d-b\,c\right )}^2} \] Input:

int((A + B*log(e*((a + b*x)/(c + d*x))^n))/(a*g + b*g*x)^3,x)
 

Output:

- ((2*A*a*d - 2*A*b*c + 3*B*a*d*n - B*b*c*n)/(2*(a*d - b*c)) + (B*b*d*n*x) 
/(a*d - b*c))/(2*a^2*b*g^3 + 2*b^3*g^3*x^2 + 4*a*b^2*g^3*x) - (B*log(e*((a 
 + b*x)/(c + d*x))^n))/(2*b*(a^2*g^3 + b^2*g^3*x^2 + 2*a*b*g^3*x)) - (B*d^ 
2*n*atanh((2*b^3*c^2*g^3 - 2*a^2*b*d^2*g^3)/(2*b*g^3*(a*d - b*c)^2) - (2*b 
*d*x)/(a*d - b*c)))/(b*g^3*(a*d - b*c)^2)
 

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 586, normalized size of antiderivative = 3.88 \[ \int \frac {A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{(a g+b g x)^3} \, dx=\frac {-a^{2} b^{3} c^{2} n +2 \,\mathrm {log}\left (\frac {\left (b x +a \right )^{n} e}{\left (d x +c \right )^{n}}\right ) b^{5} c^{2} x^{2}+a^{2} b^{3} d^{2} n \,x^{2}-a \,b^{4} c d n \,x^{2}+4 \,\mathrm {log}\left (b x +a \right ) a^{3} b^{2} c d n -4 \,\mathrm {log}\left (b x +a \right ) a \,b^{4} c^{2} n x -4 \,\mathrm {log}\left (d x +c \right ) a^{3} b^{2} c d n +4 \,\mathrm {log}\left (d x +c \right ) a \,b^{4} c^{2} n x -8 \,\mathrm {log}\left (\frac {\left (b x +a \right )^{n} e}{\left (d x +c \right )^{n}}\right ) a^{2} b^{3} c d x -4 \,\mathrm {log}\left (\frac {\left (b x +a \right )^{n} e}{\left (d x +c \right )^{n}}\right ) a \,b^{4} c d \,x^{2}-2 a^{3} b^{2} c^{2}-2 \,\mathrm {log}\left (b x +a \right ) a^{2} b^{3} c^{2} n -2 \,\mathrm {log}\left (b x +a \right ) b^{5} c^{2} n \,x^{2}+2 \,\mathrm {log}\left (d x +c \right ) a^{2} b^{3} c^{2} n +2 \,\mathrm {log}\left (d x +c \right ) b^{5} c^{2} n \,x^{2}+4 \,\mathrm {log}\left (\frac {\left (b x +a \right )^{n} e}{\left (d x +c \right )^{n}}\right ) a^{3} b^{2} d^{2} x +2 \,\mathrm {log}\left (\frac {\left (b x +a \right )^{n} e}{\left (d x +c \right )^{n}}\right ) a^{2} b^{3} d^{2} x^{2}+4 \,\mathrm {log}\left (\frac {\left (b x +a \right )^{n} e}{\left (d x +c \right )^{n}}\right ) a \,b^{4} c^{2} x +3 a^{3} b^{2} c d n +4 a^{4} b c d -2 a^{4} b \,d^{2} n -8 \,\mathrm {log}\left (d x +c \right ) a^{2} b^{3} c d n x -4 \,\mathrm {log}\left (d x +c \right ) a \,b^{4} c d n \,x^{2}-2 a^{5} d^{2}+8 \,\mathrm {log}\left (b x +a \right ) a^{2} b^{3} c d n x +4 \,\mathrm {log}\left (b x +a \right ) a \,b^{4} c d n \,x^{2}}{4 a^{2} b \,g^{3} \left (a^{2} b^{2} d^{2} x^{2}-2 a \,b^{3} c d \,x^{2}+b^{4} c^{2} x^{2}+2 a^{3} b \,d^{2} x -4 a^{2} b^{2} c d x +2 a \,b^{3} c^{2} x +a^{4} d^{2}-2 a^{3} b c d +a^{2} b^{2} c^{2}\right )} \] Input:

int((A+B*log(e*((b*x+a)/(d*x+c))^n))/(b*g*x+a*g)^3,x)
 

Output:

(4*log(a + b*x)*a**3*b**2*c*d*n - 2*log(a + b*x)*a**2*b**3*c**2*n + 8*log( 
a + b*x)*a**2*b**3*c*d*n*x - 4*log(a + b*x)*a*b**4*c**2*n*x + 4*log(a + b* 
x)*a*b**4*c*d*n*x**2 - 2*log(a + b*x)*b**5*c**2*n*x**2 - 4*log(c + d*x)*a* 
*3*b**2*c*d*n + 2*log(c + d*x)*a**2*b**3*c**2*n - 8*log(c + d*x)*a**2*b**3 
*c*d*n*x + 4*log(c + d*x)*a*b**4*c**2*n*x - 4*log(c + d*x)*a*b**4*c*d*n*x* 
*2 + 2*log(c + d*x)*b**5*c**2*n*x**2 + 4*log(((a + b*x)**n*e)/(c + d*x)**n 
)*a**3*b**2*d**2*x - 8*log(((a + b*x)**n*e)/(c + d*x)**n)*a**2*b**3*c*d*x 
+ 2*log(((a + b*x)**n*e)/(c + d*x)**n)*a**2*b**3*d**2*x**2 + 4*log(((a + b 
*x)**n*e)/(c + d*x)**n)*a*b**4*c**2*x - 4*log(((a + b*x)**n*e)/(c + d*x)** 
n)*a*b**4*c*d*x**2 + 2*log(((a + b*x)**n*e)/(c + d*x)**n)*b**5*c**2*x**2 - 
 2*a**5*d**2 + 4*a**4*b*c*d - 2*a**4*b*d**2*n - 2*a**3*b**2*c**2 + 3*a**3* 
b**2*c*d*n - a**2*b**3*c**2*n + a**2*b**3*d**2*n*x**2 - a*b**4*c*d*n*x**2) 
/(4*a**2*b*g**3*(a**4*d**2 - 2*a**3*b*c*d + 2*a**3*b*d**2*x + a**2*b**2*c* 
*2 - 4*a**2*b**2*c*d*x + a**2*b**2*d**2*x**2 + 2*a*b**3*c**2*x - 2*a*b**3* 
c*d*x**2 + b**4*c**2*x**2))