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

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

Optimal result

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (warning: unable to verify)

Time = 0.37 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.80, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.067, Rules used = {2961, 2739, 15}

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

\(\Big \downarrow \) 2961

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

\(\Big \downarrow \) 2739

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

\(\Big \downarrow \) 15

\(\displaystyle \frac {(a+b x)^3}{3 B g i n (c+d x)^3 (b c-a d)}\)

Input:

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

Output:

(a + b*x)^3/(3*B*(b*c - a*d)*g*i*n*(c + d*x)^3)
 

Defintions of rubi rules used

rule 15
Int[(a_.)*(x_)^(m_.), x_Symbol] :> Simp[a*(x^(m + 1)/(m + 1)), x] /; FreeQ[ 
{a, m}, x] && NeQ[m, -1]
 

rule 2739
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/(x_), x_Symbol] :> Simp[1/( 
b*n)   Subst[Int[x^p, x], x, a + b*Log[c*x^n]], x] /; FreeQ[{a, b, c, n, p} 
, x]
 

rule 2961
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( 
B_.))^(p_.)*((f_.) + (g_.)*(x_))^(m_.)*((h_.) + (i_.)*(x_))^(q_.), x_Symbol 
] :> Simp[(b*c - a*d)^(m + q + 1)*(g/b)^m*(i/d)^q   Subst[Int[x^m*((A + B*L 
og[e*x^n])^p/(b - d*x)^(m + q + 2)), x], x, (a + b*x)/(c + d*x)], x] /; Fre 
eQ[{a, b, c, d, e, f, g, h, i, A, B, n, p}, x] && NeQ[b*c - a*d, 0] && EqQ[ 
b*f - a*g, 0] && EqQ[d*h - c*i, 0] && IntegersQ[m, q]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(117\) vs. \(2(48)=96\).

Time = 1.75 (sec) , antiderivative size = 118, normalized size of antiderivative = 2.36

method result size
parallelrisch \(-\frac {B^{2} a^{2} c^{2} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{3}+3 A B \,a^{2} c^{2} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{2}+3 A^{2} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right ) a^{2} c^{2}}{3 i g \,a^{2} c^{2} n \left (d a -b c \right )}\) \(118\)
default \(\frac {A^{2} \left (\frac {\ln \left (d x +c \right )}{d a -b c}-\frac {\ln \left (b x +a \right )}{d a -b c}\right )}{g i}-\frac {B^{2} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{3}}{3 g i n \left (d a -b c \right )}-\frac {A B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{2}}{g i n \left (d a -b c \right )}\) \(135\)
parts \(\frac {A^{2} \left (\frac {\ln \left (d x +c \right )}{d a -b c}-\frac {\ln \left (b x +a \right )}{d a -b c}\right )}{g i}-\frac {B^{2} \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{3}}{3 g i n \left (d a -b c \right )}-\frac {A B \ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )^{2}}{g i n \left (d a -b c \right )}\) \(135\)

Input:

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

Output:

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

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 149 vs. \(2 (48) = 96\).

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

integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(b*g*x+a*g)/(d*i*x+c*i),x, al 
gorithm="fricas")
 

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 407 vs. \(2 (48) = 96\).

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

integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(b*g*x+a*g)/(d*i*x+c*i),x, al 
gorithm="maxima")
 

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 167 vs. \(2 (48) = 96\).

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

integrate((A+B*log(e*((b*x+a)/(d*x+c))^n))^2/(b*g*x+a*g)/(d*i*x+c*i),x, al 
gorithm="giac")
 

Output:

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

Mupad [B] (verification not implemented)

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

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

Output:

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

Reduce [B] (verification not implemented)

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

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

Output:

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