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

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

Optimal result

Integrand size = 33, antiderivative size = 220 \[ \int (c g+d g x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2 \, dx=-\frac {B (b c-a d) g n (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{b^2}+\frac {g (c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2}{2 d}+\frac {B^2 (b c-a d)^2 g n^2 \log (c+d x)}{b^2 d}+\frac {B (b c-a d)^2 g n \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log \left (1-\frac {b (c+d x)}{d (a+b x)}\right )}{b^2 d}-\frac {B^2 (b c-a d)^2 g n^2 \operatorname {PolyLog}\left (2,\frac {b (c+d x)}{d (a+b x)}\right )}{b^2 d} \] Output:

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

Mathematica [A] (verified)

Time = 0.14 (sec) , antiderivative size = 216, normalized size of antiderivative = 0.98 \[ \int (c g+d g x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2 \, dx=\frac {g \left ((c+d x)^2 \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2+\frac {B (b c-a d) n \left (B (b c-a d) n \log ^2(a+b x)-2 \left (A b d x+B d (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+B (-b c+a d) n \log (c+d x)\right )-2 (b c-a d) \log (a+b x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+B n \log \left (\frac {b (c+d x)}{b c-a d}\right )\right )+2 B (-b c+a d) n \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{-b c+a d}\right )\right )}{b^2}\right )}{2 d} \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.63 (sec) , antiderivative size = 239, normalized size of antiderivative = 1.09, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.212, Rules used = {2951, 2756, 2789, 2751, 16, 2779, 2838}

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 (c g+d g x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )^2 \, dx\)

\(\Big \downarrow \) 2951

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

\(\Big \downarrow \) 2756

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

\(\Big \downarrow \) 2789

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

\(\Big \downarrow \) 2751

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

\(\Big \downarrow \) 16

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

\(\Big \downarrow \) 2779

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

\(\Big \downarrow \) 2838

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 16
Int[(c_.)/((a_.) + (b_.)*(x_)), x_Symbol] :> Simp[c*(Log[RemoveContent[a + 
b*x, x]]/b), x] /; FreeQ[{a, b, c}, x]
 

rule 2751
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((d_) + (e_.)*(x_)^(r_.))^(q_), x 
_Symbol] :> Simp[x*(d + e*x^r)^(q + 1)*((a + b*Log[c*x^n])/d), x] - Simp[b* 
(n/d)   Int[(d + e*x^r)^(q + 1), x], x] /; FreeQ[{a, b, c, d, e, n, q, r}, 
x] && EqQ[r*(q + 1) + 1, 0]
 

rule 2756
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.), 
x_Symbol] :> Simp[(d + e*x)^(q + 1)*((a + b*Log[c*x^n])^p/(e*(q + 1))), x] 
- Simp[b*n*(p/(e*(q + 1)))   Int[((d + e*x)^(q + 1)*(a + b*Log[c*x^n])^(p - 
 1))/x, x], x] /; FreeQ[{a, b, c, d, e, n, p, q}, x] && GtQ[p, 0] && NeQ[q, 
 -1] && (EqQ[p, 1] || (IntegersQ[2*p, 2*q] &&  !IGtQ[q, 0]) || (EqQ[p, 2] & 
& NeQ[q, 1]))
 

rule 2779
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]
 

rule 2789
Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_))/ 
(x_), x_Symbol] :> Simp[1/d   Int[(d + e*x)^(q + 1)*((a + b*Log[c*x^n])^p/x 
), x], x] - Simp[e/d   Int[(d + e*x)^q*(a + b*Log[c*x^n])^p, x], x] /; Free 
Q[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && LtQ[q, -1] && IntegerQ[2*q]
 

rule 2838
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]
 

rule 2951
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( 
B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(b*c - a*d)^(m + 
1)*(g/d)^m   Subst[Int[(A + B*Log[e*x^n])^p/(b - d*x)^(m + 2), x], x, (a + 
b*x)/(c + d*x)], x] /; FreeQ[{a, b, c, d, e, f, g, A, B, n}, x] && NeQ[b*c 
- a*d, 0] && IntegersQ[m, p] && EqQ[d*f - c*g, 0] && (GtQ[p, 0] || LtQ[m, - 
1])
 
Maple [F]

\[\int \left (d g x +c g \right ) {\left (A +B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )\right )}^{2}d x\]

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

g*(Integral(A**2*c, x) + Integral(A**2*d*x, x) + Integral(B**2*c*log(e*(a/ 
(c + d*x) + b*x/(c + d*x))**n)**2, x) + Integral(2*A*B*c*log(e*(a/(c + d*x 
) + b*x/(c + d*x))**n), x) + Integral(B**2*d*x*log(e*(a/(c + d*x) + b*x/(c 
 + d*x))**n)**2, x) + Integral(2*A*B*d*x*log(e*(a/(c + d*x) + b*x/(c + d*x 
))**n), x))
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 825 vs. \(2 (217) = 434\).

Time = 0.57 (sec) , antiderivative size = 825, normalized size of antiderivative = 3.75 \[ \int (c g+d g x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2 \, dx =\text {Too large to display} \] Input:

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

Output:

A*B*d*g*x^2*log(e*(b*x/(d*x + c) + a/(d*x + c))^n) + 1/2*A^2*d*g*x^2 - A*B 
*d*g*n*(a^2*log(b*x + a)/b^2 - c^2*log(d*x + c)/d^2 + (b*c - a*d)*x/(b*d)) 
 + 2*A*B*c*g*n*(a*log(b*x + a)/b - c*log(d*x + c)/d) + 2*A*B*c*g*x*log(e*( 
b*x/(d*x + c) + a/(d*x + c))^n) + A^2*c*g*x - (a*c*d*g*n^2 - (g*n^2 - g*n* 
log(e))*b*c^2)*B^2*log(d*x + c)/(b*d) - (b^2*c^2*g*n^2 - 2*a*b*c*d*g*n^2 + 
 a^2*d^2*g*n^2)*(log(b*x + a)*log((b*d*x + a*d)/(b*c - a*d) + 1) + dilog(- 
(b*d*x + a*d)/(b*c - a*d)))*B^2/(b^2*d) + 1/2*(2*B^2*b^2*c^2*g*n^2*log(b*x 
 + a)*log(d*x + c) - B^2*b^2*c^2*g*n^2*log(d*x + c)^2 + B^2*b^2*d^2*g*x^2* 
log(e)^2 - (2*a*b*c*d*g*n^2 - a^2*d^2*g*n^2)*B^2*log(b*x + a)^2 + 2*(a*b*d 
^2*g*n*log(e) - (g*n*log(e) - g*log(e)^2)*b^2*c*d)*B^2*x - 2*((g*n^2 - 2*g 
*n*log(e))*a*b*c*d - (g*n^2 - g*n*log(e))*a^2*d^2)*B^2*log(b*x + a) + (B^2 
*b^2*d^2*g*x^2 + 2*B^2*b^2*c*d*g*x)*log((b*x + a)^n)^2 + (B^2*b^2*d^2*g*x^ 
2 + 2*B^2*b^2*c*d*g*x)*log((d*x + c)^n)^2 + 2*(B^2*b^2*d^2*g*x^2*log(e) - 
B^2*b^2*c^2*g*n*log(d*x + c) + (a*b*d^2*g*n - (g*n - 2*g*log(e))*b^2*c*d)* 
B^2*x + (2*a*b*c*d*g*n - a^2*d^2*g*n)*B^2*log(b*x + a))*log((b*x + a)^n) - 
 2*(B^2*b^2*d^2*g*x^2*log(e) - B^2*b^2*c^2*g*n*log(d*x + c) + (a*b*d^2*g*n 
 - (g*n - 2*g*log(e))*b^2*c*d)*B^2*x + (2*a*b*c*d*g*n - a^2*d^2*g*n)*B^2*l 
og(b*x + a) + (B^2*b^2*d^2*g*x^2 + 2*B^2*b^2*c*d*g*x)*log((b*x + a)^n))*lo 
g((d*x + c)^n))/(b^2*d)
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int (c g+d g x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )^2 \, dx =\text {Too large to display} \] Input:

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

Output:

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