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

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

Optimal result

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.26 (sec) , antiderivative size = 78, normalized size of antiderivative = 0.96, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2948, 27, 49, 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 (a g+b g x) \left (B \log \left (\frac {e (c+d x)}{a+b x}\right )+A\right ) \, dx\)

\(\Big \downarrow \) 2948

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 49

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 49
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int 
[ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] 
&& IGtQ[m, 0] && IGtQ[m + n + 2, 0]
 

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

rule 2948
Int[((A_.) + Log[(e_.)*((a_.) + (b_.)*(x_))^(n_.)*((c_.) + (d_.)*(x_))^(mn_ 
)]*(B_.))*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(f + g*x)^(m + 1)*( 
(A + B*Log[e*((a + b*x)^n/(c + d*x)^n)])/(g*(m + 1))), x] - Simp[B*n*((b*c 
- a*d)/(g*(m + 1)))   Int[(f + g*x)^(m + 1)/((a + b*x)*(c + d*x)), x], x] / 
; FreeQ[{a, b, c, d, e, f, g, A, B, m, n}, x] && EqQ[n + mn, 0] && NeQ[b*c 
- a*d, 0] && NeQ[m, -1] &&  !(EqQ[m, -2] && IntegerQ[n])
 
Maple [A] (verified)

Time = 0.87 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.37

method result size
risch \(\frac {g B x \left (b x +2 a \right ) \ln \left (\frac {e \left (d x +c \right )}{b x +a}\right )}{2}+\frac {g b A \,x^{2}}{2}+g A a x -\frac {B \,a^{2} g \ln \left (b x +a \right )}{2 b}+\frac {g B \ln \left (-d x -c \right ) a c}{d}-\frac {g b B \ln \left (-d x -c \right ) c^{2}}{2 d^{2}}-\frac {g B a x}{2}+\frac {g b B c x}{2 d}\) \(111\)
parallelrisch \(\frac {B \,x^{2} \ln \left (\frac {e \left (d x +c \right )}{b x +a}\right ) b^{2} d^{2} g +A \,x^{2} b^{2} d^{2} g +2 B x \ln \left (\frac {e \left (d x +c \right )}{b x +a}\right ) a b \,d^{2} g +2 A x a b \,d^{2} g -B \ln \left (b x +a \right ) a^{2} d^{2} g +2 B \ln \left (b x +a \right ) a b c d g -B \ln \left (b x +a \right ) b^{2} c^{2} g -B x a b \,d^{2} g +B x \,b^{2} c d g +2 B \ln \left (\frac {e \left (d x +c \right )}{b x +a}\right ) a b c d g -B \ln \left (\frac {e \left (d x +c \right )}{b x +a}\right ) b^{2} c^{2} g -2 A \,a^{2} d^{2} g -3 A a b c d g +B \,a^{2} d^{2} g -B \,b^{2} c^{2} g}{2 b \,d^{2}}\) \(234\)
parts \(A g \left (\frac {1}{2} b \,x^{2}+a x \right )-B g \,e^{2} \left (d a -b c \right )^{2} \left (-\frac {1}{2 d e b \left (\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e \right )}-\frac {\ln \left (\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e \right )}{2 d^{2} e^{2} b}+\frac {\ln \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) \left (\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -2 d e \right )}{2 d^{2} e^{2} \left (\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e \right )^{2}}\right )\) \(265\)
derivativedivides \(\frac {e \left (d a -b c \right ) \left (\frac {A b e g \left (d a -b c \right )}{2 \left (\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e \right )^{2}}-B \,b^{2} e g \left (d a -b c \right ) \left (-\frac {1}{2 d e b \left (\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e \right )}-\frac {\ln \left (\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e \right )}{2 d^{2} e^{2} b}+\frac {\ln \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) \left (\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -2 d e \right )}{2 d^{2} e^{2} \left (\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e \right )^{2}}\right )\right )}{b^{2}}\) \(315\)
default \(\frac {e \left (d a -b c \right ) \left (\frac {A b e g \left (d a -b c \right )}{2 \left (\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e \right )^{2}}-B \,b^{2} e g \left (d a -b c \right ) \left (-\frac {1}{2 d e b \left (\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e \right )}-\frac {\ln \left (\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e \right )}{2 d^{2} e^{2} b}+\frac {\ln \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) \left (\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -2 d e \right )}{2 d^{2} e^{2} \left (\left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b -d e \right )^{2}}\right )\right )}{b^{2}}\) \(315\)

Input:

int((b*g*x+a*g)*(A+B*ln(e*(d*x+c)/(b*x+a))),x,method=_RETURNVERBOSE)
 

Output:

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

Fricas [A] (verification not implemented)

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

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

Output:

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

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 253 vs. \(2 (68) = 136\).

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

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

Output:

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

Maxima [A] (verification not implemented)

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

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

Output:

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

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 627 vs. \(2 (75) = 150\).

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

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

Output:

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

Mupad [B] (verification not implemented)

Time = 25.36 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.56 \[ \int (a g+b g x) \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right ) \, dx=x\,\left (\frac {g\,\left (4\,A\,a\,d+2\,A\,b\,c-B\,a\,d+B\,b\,c\right )}{2\,d}-\frac {A\,g\,\left (2\,a\,d+2\,b\,c\right )}{2\,d}\right )+\ln \left (\frac {e\,\left (c+d\,x\right )}{a+b\,x}\right )\,\left (\frac {B\,b\,g\,x^2}{2}+B\,a\,g\,x\right )-\frac {\ln \left (c+d\,x\right )\,\left (B\,b\,c^2\,g-2\,B\,a\,c\,d\,g\right )}{2\,d^2}+\frac {A\,b\,g\,x^2}{2}-\frac {B\,a^2\,g\,\ln \left (a+b\,x\right )}{2\,b} \] Input:

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

Output:

x*((g*(4*A*a*d + 2*A*b*c - B*a*d + B*b*c))/(2*d) - (A*g*(2*a*d + 2*b*c))/( 
2*d)) + log((e*(c + d*x))/(a + b*x))*((B*b*g*x^2)/2 + B*a*g*x) - (log(c + 
d*x)*(B*b*c^2*g - 2*B*a*c*d*g))/(2*d^2) + (A*b*g*x^2)/2 - (B*a^2*g*log(a + 
 b*x))/(2*b)
 

Reduce [B] (verification not implemented)

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

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

Output:

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