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

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

Optimal result

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (warning: unable to verify)

Time = 0.55 (sec) , antiderivative size = 221, normalized size of antiderivative = 0.81, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.121, Rules used = {2973, 2949, 2795, 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 (B \log \left (e (a+b x)^n (c+d x)^{-n}\right )+A\right )^2}{(a+b x)^3} \, dx\)

\(\Big \downarrow \) 2973

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

\(\Big \downarrow \) 2949

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

\(\Big \downarrow \) 2795

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

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

rule 2795
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((f_.)*(x_))^(m_.)*((d_) + 
(e_.)*(x_)^(r_.))^(q_.), x_Symbol] :> With[{u = ExpandIntegrand[(a + b*Log[ 
c*x^n])^p, (f*x)^m*(d + e*x^r)^q, x]}, Int[u, x] /; SumQ[u]] /; FreeQ[{a, b 
, c, d, e, f, m, n, p, q, r}, x] && IntegerQ[q] && (GtQ[q, 0] || (IGtQ[p, 0 
] && IntegerQ[m] && IntegerQ[r]))
 

rule 2949
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/b)^m   Subst[Int[x^m*((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] && Ne 
Q[b*c - a*d, 0] && IntegersQ[m, p] && EqQ[b*f - a*g, 0] && (GtQ[p, 0] || Lt 
Q[m, -1])
 

rule 2973
Int[((A_.) + Log[(e_.)*(u_)^(n_.)*(v_)^(mn_)]*(B_.))^(p_.)*(w_.), x_Symbol] 
 :> Subst[Int[w*(A + B*Log[e*(u/v)^n])^p, x], e*(u/v)^n, e*(u^n/v^n)] /; Fr 
eeQ[{e, A, B, n, p}, x] && EqQ[n + mn, 0] && LinearQ[{u, v}, x] &&  !Intege 
rQ[n]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(870\) vs. \(2(268)=536\).

Time = 14.72 (sec) , antiderivative size = 871, normalized size of antiderivative = 3.18

method result size
parallelrisch \(-\frac {4 A B x a \,b^{4} d^{3} n -4 A B x \,b^{5} c \,d^{2} n +2 A^{2} a^{2} b^{3} d^{3}+2 A^{2} b^{5} c^{2} d -4 A^{2} a \,b^{4} c \,d^{2}-8 A B a \,b^{4} c \,d^{2} n -4 A B \ln \left (b x +a \right ) x^{2} b^{5} d^{3} n +4 A B \ln \left (d x +c \right ) x^{2} b^{5} d^{3} n +12 B^{2} \ln \left (d x +c \right ) x a \,b^{4} d^{3} n^{2}-4 A B \ln \left (b x +a \right ) a^{2} b^{3} d^{3} n +4 A B \ln \left (d x +c \right ) a^{2} b^{3} d^{3} n -4 B^{2} x \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) b^{5} c \,d^{2} n -8 B^{2} \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) a \,b^{4} c \,d^{2} n -8 A B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) a \,b^{4} c \,d^{2}+4 B^{2} x \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) a \,b^{4} d^{3} n -12 B^{2} \ln \left (b x +a \right ) x a \,b^{4} d^{3} n^{2}+7 B^{2} a^{2} b^{3} d^{3} n^{2}+B^{2} b^{5} c^{2} d \,n^{2}-8 B^{2} a \,b^{4} c \,d^{2} n^{2}+6 A B \,a^{2} b^{3} d^{3} n +2 A B \,b^{5} c^{2} d n -2 B^{2} x^{2} \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{2} b^{5} d^{3}+2 B^{2} \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{2} b^{5} c^{2} d -8 A B \ln \left (b x +a \right ) x a \,b^{4} d^{3} n +8 A B \ln \left (d x +c \right ) x a \,b^{4} d^{3} n -4 B^{2} x \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{2} a \,b^{4} d^{3}-4 B^{2} \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right )^{2} a \,b^{4} c \,d^{2}+6 B^{2} \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) a^{2} b^{3} d^{3} n +2 B^{2} \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) b^{5} c^{2} d n +4 A B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) a^{2} b^{3} d^{3}+4 A B \ln \left (e \left (b x +a \right )^{n} \left (d x +c \right )^{-n}\right ) b^{5} c^{2} d +6 B^{2} x a \,b^{4} d^{3} n^{2}-6 B^{2} x \,b^{5} c \,d^{2} n^{2}-6 B^{2} \ln \left (b x +a \right ) x^{2} b^{5} d^{3} n^{2}+6 B^{2} \ln \left (d x +c \right ) x^{2} b^{5} d^{3} n^{2}-6 B^{2} \ln \left (b x +a \right ) a^{2} b^{3} d^{3} n^{2}+6 B^{2} \ln \left (d x +c \right ) a^{2} b^{3} d^{3} n^{2}}{4 \left (b x +a \right )^{2} b^{4} d \left (a^{2} d^{2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6*B^2*ln(e*(b*x+a)^n/((d*x+c)^n))*a^2*b^3*d^3*n+2*B^2*ln(e*(b*x+a)^n/((d* 
x+c)^n))*b^5*c^2*d*n+4*A*B*ln(e*(b*x+a)^n/((d*x+c)^n))*a^2*b^3*d^3+4*A*B*l 
n(e*(b*x+a)^n/((d*x+c)^n))*b^5*c^2*d-6*B^2*ln(b*x+a)*x^2*b^5*d^3*n^2+6*B^2 
*ln(d*x+c)*x^2*b^5*d^3*n^2-6*B^2*ln(b*x+a)*a^2*b^3*d^3*n^2+6*B^2*ln(d*x+c) 
*a^2*b^3*d^3*n^2)/(b*x+a)^2/b^4/d/(a^2*d^2-2*a*b*c*d+b^2*c^2)
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 919 vs. \(2 (268) = 536\).

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

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

Output:

-1/4*(2*A^2*b^2*c^2 - 4*A^2*a*b*c*d + 2*A^2*a^2*d^2 + (B^2*b^2*c^2 - 8*B^2 
*a*b*c*d + 7*B^2*a^2*d^2)*n^2 - 2*(B^2*b^2*d^2*n^2*x^2 + 2*B^2*a*b*d^2*n^2 
*x - (B^2*b^2*c^2 - 2*B^2*a*b*c*d)*n^2)*log(b*x + a)^2 - 2*(B^2*b^2*d^2*n^ 
2*x^2 + 2*B^2*a*b*d^2*n^2*x - (B^2*b^2*c^2 - 2*B^2*a*b*c*d)*n^2)*log(d*x + 
 c)^2 + 2*(B^2*b^2*c^2 - 2*B^2*a*b*c*d + B^2*a^2*d^2)*log(e)^2 + 2*(A*B*b^ 
2*c^2 - 4*A*B*a*b*c*d + 3*A*B*a^2*d^2)*n - 2*(3*(B^2*b^2*c*d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)^2}{(a+b x)^3} \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 899 vs. \(2 (268) = 536\).

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [B] (verification not implemented)

Time = 27.16 (sec) , antiderivative size = 444, normalized size of antiderivative = 1.62 \[ \int \frac {\left (A+B \log \left (e (a+b x)^n (c+d x)^{-n}\right )\right )^2}{(a+b x)^3} \, dx=-{\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )}^2\,\left (\frac {B^2}{2\,b\,\left (a^2+2\,a\,b\,x+b^2\,x^2\right )}-\frac {B^2\,d^2}{2\,b\,\left (a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2\right )}\right )-\frac {\frac {2\,A^2\,a\,d-2\,A^2\,b\,c+7\,B^2\,a\,d\,n^2-B^2\,b\,c\,n^2+6\,A\,B\,a\,d\,n-2\,A\,B\,b\,c\,n}{2\,\left (a\,d-b\,c\right )}+\frac {d\,x\,\left (3\,b\,B^2\,n^2+2\,A\,b\,B\,n\right )}{a\,d-b\,c}}{2\,a^2\,b+4\,a\,b^2\,x+2\,b^3\,x^2}-\ln \left (\frac {e\,{\left (a+b\,x\right )}^n}{{\left (c+d\,x\right )}^n}\right )\,\left (\frac {A\,B}{a^2\,b+2\,a\,b^2\,x+b^3\,x^2}+\frac {B^2\,d^2\,\left (\frac {b\,n\,\left (a\,d-b\,c\right )\,\left (2\,a\,d-b\,c\right )}{2\,d^2}+\frac {b^2\,n\,x\,\left (a\,d-b\,c\right )}{d}+\frac {a\,b\,n\,\left (a\,d-b\,c\right )}{2\,d}\right )}{b\,\left (a^2\,d^2-2\,a\,b\,c\,d+b^2\,c^2\right )\,\left (a^2\,b+2\,a\,b^2\,x+b^3\,x^2\right )}\right )-\frac {B\,d^2\,n\,\mathrm {atan}\left (\frac {\left (2\,b\,d\,x-\frac {2\,b^3\,c^2-2\,a^2\,b\,d^2}{2\,b\,\left (a\,d-b\,c\right )}\right )\,1{}\mathrm {i}}{a\,d-b\,c}\right )\,\left (2\,A+3\,B\,n\right )\,1{}\mathrm {i}}{b\,{\left (a\,d-b\,c\right )}^2} \] Input:

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

Output:

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

Reduce [B] (verification not implemented)

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

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

Output:

(4*log(a + b*x)*a**4*b*d**2*n + 4*log(a + b*x)*a**3*b**2*d**2*n**2 + 8*log 
(a + b*x)*a**3*b**2*d**2*n*x + 2*log(a + b*x)*a**2*b**3*c*d*n**2 + 8*log(a 
 + b*x)*a**2*b**3*d**2*n**2*x + 4*log(a + b*x)*a**2*b**3*d**2*n*x**2 + 4*l 
og(a + b*x)*a*b**4*c*d*n**2*x + 4*log(a + b*x)*a*b**4*d**2*n**2*x**2 + 2*l 
og(a + b*x)*b**5*c*d*n**2*x**2 - 4*log(c + d*x)*a**4*b*d**2*n - 4*log(c + 
d*x)*a**3*b**2*d**2*n**2 - 8*log(c + d*x)*a**3*b**2*d**2*n*x - 2*log(c + d 
*x)*a**2*b**3*c*d*n**2 - 8*log(c + d*x)*a**2*b**3*d**2*n**2*x - 4*log(c + 
d*x)*a**2*b**3*d**2*n*x**2 - 4*log(c + d*x)*a*b**4*c*d*n**2*x - 4*log(c + 
d*x)*a*b**4*d**2*n**2*x**2 - 2*log(c + d*x)*b**5*c*d*n**2*x**2 + 4*log(((a 
 + b*x)**n*e)/(c + d*x)**n)**2*a**2*b**3*c*d + 4*log(((a + b*x)**n*e)/(c + 
 d*x)**n)**2*a**2*b**3*d**2*x - 2*log(((a + b*x)**n*e)/(c + d*x)**n)**2*a* 
b**4*c**2 + 2*log(((a + b*x)**n*e)/(c + d*x)**n)**2*a*b**4*d**2*x**2 - 4*l 
og(((a + b*x)**n*e)/(c + d*x)**n)*a**4*b*d**2 + 8*log(((a + b*x)**n*e)/(c 
+ d*x)**n)*a**3*b**2*c*d - 4*log(((a + b*x)**n*e)/(c + d*x)**n)*a**3*b**2* 
d**2*n - 4*log(((a + b*x)**n*e)/(c + d*x)**n)*a**2*b**3*c**2 + 6*log(((a + 
 b*x)**n*e)/(c + d*x)**n)*a**2*b**3*c*d*n - 2*log(((a + b*x)**n*e)/(c + d* 
x)**n)*a*b**4*c**2*n + 2*log(((a + b*x)**n*e)/(c + d*x)**n)*a*b**4*d**2*n* 
x**2 - 2*log(((a + b*x)**n*e)/(c + d*x)**n)*b**5*c*d*n*x**2 - 2*a**5*d**2 
+ 4*a**4*b*c*d - 4*a**4*b*d**2*n - 2*a**3*b**2*c**2 + 6*a**3*b**2*c*d*n - 
4*a**3*b**2*d**2*n**2 - 2*a**2*b**3*c**2*n + 5*a**2*b**3*c*d*n**2 + 2*a...