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

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

Optimal result

Integrand size = 41, antiderivative size = 168 \[ \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)^2} \, dx=-\frac {A g (a+b x)}{d i^2 (c+d x)}+\frac {B g n (a+b x)}{d i^2 (c+d x)}-\frac {B g (a+b x) \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{d i^2 (c+d x)}-\frac {b g \left (A+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^2}-\frac {b B g n \operatorname {PolyLog}\left (2,\frac {d (a+b x)}{b (c+d x)}\right )}{d^2 i^2} \] Output:

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

Mathematica [A] (verified)

Time = 0.22 (sec) , antiderivative size = 183, normalized size of antiderivative = 1.09 \[ \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)^2} \, dx=\frac {g \left (\frac {2 (b c-a d) \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right )}{c+d x}+2 b \left (A+B \log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )\right ) \log (c+d x)-2 B n \left (\frac {b c-a d}{c+d x}+b \log (a+b x)-b \log (c+d x)\right )-b B 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^2} \] Input:

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

Output:

(g*((2*(b*c - a*d)*(A + B*Log[e*((a + b*x)/(c + d*x))^n]))/(c + d*x) + 2*b 
*(A + B*Log[e*((a + b*x)/(c + d*x))^n])*Log[c + d*x] - 2*B*n*((b*c - a*d)/ 
(c + d*x) + b*Log[a + b*x] - b*Log[c + d*x]) - b*B*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^2)
 

Rubi [A] (verified)

Time = 0.38 (sec) , antiderivative size = 154, normalized size of antiderivative = 0.92, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.073, Rules used = {2961, 2793, 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 {(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)^2} \, dx\)

\(\Big \downarrow \) 2961

\(\displaystyle \frac {g \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 )}d\frac {a+b x}{c+d x}}{i^2}\)

\(\Big \downarrow \) 2793

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

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

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

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 )}{\left (d i x +c i \right )^{2}}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)^2,x)
 

Output:

int((b*g*x+a*g)*(A+B*ln(e*((b*x+a)/(d*x+c))^n))/(d*i*x+c*i)^2,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)^2} \, 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 )}}{{\left (d i x + c i\right )}^{2}} \,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)^2,x, al 
gorithm="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^2*i^2*x^2 + 2*c*d*i^2*x + c^2*i^2), x)
 

Sympy [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)^2} \, dx=\text {Timed out} \] Input:

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

Output:

Timed out
 

Maxima [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)^2} \, 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 )}}{{\left (d i x + c i\right )}^{2}} \,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)^2,x, al 
gorithm="maxima")
 

Output:

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

Giac [B] (verification not implemented)

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

Time = 142.58 (sec) , antiderivative size = 906, normalized size of antiderivative = 5.39 \[ \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)^2} \, 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)^2,x, al 
gorithm="giac")
 

Output:

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

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)^2} \, 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 )}{{\left (c\,i+d\,i\,x\right )}^2} \,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)^2 
,x)
 

Output:

int(((a*g + b*g*x)*(A + B*log(e*((a + b*x)/(c + d*x))^n)))/(c*i + d*i*x)^2 
, 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)^2} \, dx=\frac {g \left (-\left (\int \frac {\mathrm {log}\left (\frac {\left (b x +a \right )^{n} e}{\left (d x +c \right )^{n}}\right ) x}{d^{2} x^{2}+2 c d x +c^{2}}d x \right ) a \,b^{2} c^{2} d^{3}-\left (\int \frac {\mathrm {log}\left (\frac {\left (b x +a \right )^{n} e}{\left (d x +c \right )^{n}}\right ) x}{d^{2} x^{2}+2 c d x +c^{2}}d x \right ) a \,b^{2} c \,d^{4} x +\left (\int \frac {\mathrm {log}\left (\frac {\left (b x +a \right )^{n} e}{\left (d x +c \right )^{n}}\right ) x}{d^{2} x^{2}+2 c d x +c^{2}}d x \right ) b^{3} c^{3} 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^{2} x^{2}+2 c d x +c^{2}}d x \right ) b^{3} c^{2} d^{3} x +\mathrm {log}\left (b x +a \right ) a^{2} b c \,d^{2} n +\mathrm {log}\left (b x +a \right ) a^{2} b \,d^{3} n x -\mathrm {log}\left (d x +c \right ) a^{2} b \,c^{2} d -\mathrm {log}\left (d x +c \right ) a^{2} b c \,d^{2} n -\mathrm {log}\left (d x +c \right ) a^{2} b c \,d^{2} x -\mathrm {log}\left (d x +c \right ) a^{2} b \,d^{3} n x +\mathrm {log}\left (d x +c \right ) a \,b^{2} c^{3}+\mathrm {log}\left (d x +c \right ) a \,b^{2} c^{2} d x -\mathrm {log}\left (\frac {\left (b x +a \right )^{n} e}{\left (d x +c \right )^{n}}\right ) a^{2} b \,d^{3} x +\mathrm {log}\left (\frac {\left (b x +a \right )^{n} e}{\left (d x +c \right )^{n}}\right ) a \,b^{2} c \,d^{2} x -a^{3} d^{3} x +2 a^{2} b c \,d^{2} x +a^{2} b \,d^{3} n x -a \,b^{2} c^{2} d x -a \,b^{2} c \,d^{2} n x \right )}{c \,d^{2} \left (a \,d^{2} x -b c d x +a c d -b \,c^{2}\right )} \] Input:

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

Output:

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