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

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

Optimal result

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.43 (sec) , antiderivative size = 154, normalized size of antiderivative = 1.15, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.098, Rules used = {2961, 2784, 2754, 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 \frac {(a g+b g x) \left (B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )+A\right )}{c i+d i x} \, dx\)

\(\Big \downarrow \) 2961

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

\(\Big \downarrow \) 2784

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

\(\Big \downarrow \) 2754

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

\(\Big \downarrow \) 2838

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 2754
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)/((d_) + (e_.)*(x_)), x_Symb 
ol] :> Simp[Log[1 + e*(x/d)]*((a + b*Log[c*x^n])^p/e), x] - Simp[b*n*(p/e) 
  Int[Log[1 + e*(x/d)]*((a + b*Log[c*x^n])^(p - 1)/x), x], x] /; FreeQ[{a, 
b, c, d, e, n}, x] && IGtQ[p, 0]
 

rule 2784
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))*((f_.)*(x_))^(m_.)*((d_) + (e_.)* 
(x_))^(q_.), x_Symbol] :> Simp[(f*x)^m*(d + e*x)^(q + 1)*((a + b*Log[c*x^n] 
)/(e*(q + 1))), x] - Simp[f/(e*(q + 1))   Int[(f*x)^(m - 1)*(d + e*x)^(q + 
1)*(a*m + b*n + b*m*Log[c*x^n]), x], x] /; FreeQ[{a, b, c, d, e, f, m, n}, 
x] && ILtQ[q, -1] && GtQ[m, 0]
 

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 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 [F]

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 306 vs. \(2 (133) = 266\).

Time = 0.35 (sec) , antiderivative size = 306, normalized size of antiderivative = 2.28 \[ \int \frac {(a g+b g x) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{c i+d i x} \, dx=A b g {\left (\frac {x}{d i} - \frac {c \log \left (d x + c\right )}{d^{2} i}\right )} + \frac {A a g \log \left (d i x + c i\right )}{d i} - \frac {{\left (b c g n - a d g n\right )} {\left (\log \left (b x + a\right ) \log \left (\frac {b d x + a d}{b c - a d} + 1\right ) + {\rm Li}_2\left (-\frac {b d x + a d}{b c - a d}\right )\right )} B}{d^{2} i} + \frac {{\left (a d g \log \left (e\right ) - {\left (g n + g \log \left (e\right )\right )} b c\right )} B \log \left (d x + c\right )}{d^{2} i} + \frac {2 \, B a d g n \log \left (b x + a\right ) + 2 \, B b d g x \log \left (e\right ) + 2 \, {\left (b c g n - a d g n\right )} B \log \left (b x + a\right ) \log \left (d x + c\right ) - {\left (b c g n - a d g n\right )} B \log \left (d x + c\right )^{2} + 2 \, {\left (B b d g x - {\left (b c g - a d g\right )} B \log \left (d x + c\right )\right )} \log \left ({\left (b x + a\right )}^{n}\right ) - 2 \, {\left (B b d g x - {\left (b c g - a d g\right )} B \log \left (d x + c\right )\right )} \log \left ({\left (d x + c\right )}^{n}\right )}{2 \, d^{2} i} \] Input:

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

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 1242 vs. \(2 (133) = 266\).

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

(g*i*( - int(log(((a + b*x)**n*e)/(c + d*x)**n)/(c + d*x),x)*a*b*d**2 - in 
t((log(((a + b*x)**n*e)/(c + d*x)**n)*x)/(c + d*x),x)*b**2*d**2 - log(c + 
d*x)*a**2*d + log(c + d*x)*a*b*c - a*b*d*x))/d**2