Integrand size = 30, antiderivative size = 149 \[ \int (a g+b g x)^3 \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right ) \, dx=\frac {B (b c-a d)^3 g^3 x}{4 d^3}-\frac {B (b c-a d)^2 g^3 (a+b x)^2}{8 b d^2}+\frac {B (b c-a d) g^3 (a+b x)^3}{12 b d}-\frac {B (b c-a d)^4 g^3 \log (c+d x)}{4 b d^4}+\frac {g^3 (a+b x)^4 \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right )}{4 b} \] Output:
1/4*B*(-a*d+b*c)^3*g^3*x/d^3-1/8*B*(-a*d+b*c)^2*g^3*(b*x+a)^2/b/d^2+1/12*B *(-a*d+b*c)*g^3*(b*x+a)^3/b/d-1/4*B*(-a*d+b*c)^4*g^3*ln(d*x+c)/b/d^4+1/4*g ^3*(b*x+a)^4*(A+B*ln(e*(d*x+c)/(b*x+a)))/b
Time = 0.09 (sec) , antiderivative size = 120, normalized size of antiderivative = 0.81 \[ \int (a g+b g x)^3 \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right ) \, dx=\frac {g^3 \left (\frac {B (b c-a d) \left (6 b d (b c-a d)^2 x+3 d^2 (-b c+a d) (a+b x)^2+2 d^3 (a+b x)^3-6 (b c-a d)^3 \log (c+d x)\right )}{6 d^4}+(a+b x)^4 \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right )\right )}{4 b} \] Input:
Integrate[(a*g + b*g*x)^3*(A + B*Log[(e*(c + d*x))/(a + b*x)]),x]
Output:
(g^3*((B*(b*c - a*d)*(6*b*d*(b*c - a*d)^2*x + 3*d^2*(-(b*c) + a*d)*(a + b* x)^2 + 2*d^3*(a + b*x)^3 - 6*(b*c - a*d)^3*Log[c + d*x]))/(6*d^4) + (a + b *x)^4*(A + B*Log[(e*(c + d*x))/(a + b*x)])))/(4*b)
Time = 0.32 (sec) , antiderivative size = 130, normalized size of antiderivative = 0.87, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, 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)^3 \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^4 (a+b x)^3}{c+d x}dx}{4 b g}+\frac {g^3 (a+b x)^4 \left (B \log \left (\frac {e (c+d x)}{a+b x}\right )+A\right )}{4 b}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {B g^3 (b c-a d) \int \frac {(a+b x)^3}{c+d x}dx}{4 b}+\frac {g^3 (a+b x)^4 \left (B \log \left (\frac {e (c+d x)}{a+b x}\right )+A\right )}{4 b}\) |
\(\Big \downarrow \) 49 |
\(\displaystyle \frac {B g^3 (b c-a d) \int \left (\frac {(a d-b c)^3}{d^3 (c+d x)}+\frac {b (b c-a d)^2}{d^3}+\frac {b (a+b x)^2}{d}-\frac {b (b c-a d) (a+b x)}{d^2}\right )dx}{4 b}+\frac {g^3 (a+b x)^4 \left (B \log \left (\frac {e (c+d x)}{a+b x}\right )+A\right )}{4 b}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {g^3 (a+b x)^4 \left (B \log \left (\frac {e (c+d x)}{a+b x}\right )+A\right )}{4 b}+\frac {B g^3 (b c-a d) \left (-\frac {(b c-a d)^3 \log (c+d x)}{d^4}+\frac {b x (b c-a d)^2}{d^3}-\frac {(a+b x)^2 (b c-a d)}{2 d^2}+\frac {(a+b x)^3}{3 d}\right )}{4 b}\) |
Input:
Int[(a*g + b*g*x)^3*(A + B*Log[(e*(c + d*x))/(a + b*x)]),x]
Output:
(B*(b*c - a*d)*g^3*((b*(b*c - a*d)^2*x)/d^3 - ((b*c - a*d)*(a + b*x)^2)/(2 *d^2) + (a + b*x)^3/(3*d) - ((b*c - a*d)^3*Log[c + d*x])/d^4))/(4*b) + (g^ 3*(a + b*x)^4*(A + B*Log[(e*(c + d*x))/(a + b*x)]))/(4*b)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
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]
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])
Leaf count of result is larger than twice the leaf count of optimal. \(313\) vs. \(2(139)=278\).
Time = 1.10 (sec) , antiderivative size = 314, normalized size of antiderivative = 2.11
method | result | size |
risch | \(\frac {\left (b x +a \right )^{4} g^{3} B \ln \left (\frac {e \left (d x +c \right )}{b x +a}\right )}{4 b}+\frac {g^{3} b^{3} A \,x^{4}}{4}+g^{3} b^{2} A a \,x^{3}-\frac {g^{3} b^{2} B a \,x^{3}}{12}+\frac {g^{3} b^{3} B c \,x^{3}}{12 d}+\frac {3 g^{3} b A \,a^{2} x^{2}}{2}-\frac {3 g^{3} b B \,a^{2} x^{2}}{8}+\frac {g^{3} b^{2} B a c \,x^{2}}{2 d}-\frac {g^{3} b^{3} B \,c^{2} x^{2}}{8 d^{2}}+g^{3} A \,a^{3} x -\frac {g^{3} B \ln \left (d x +c \right ) a^{4}}{4 b}+\frac {g^{3} B \ln \left (d x +c \right ) a^{3} c}{d}-\frac {3 g^{3} b B \ln \left (d x +c \right ) a^{2} c^{2}}{2 d^{2}}+\frac {g^{3} b^{2} B \ln \left (d x +c \right ) a \,c^{3}}{d^{3}}-\frac {g^{3} b^{3} B \ln \left (d x +c \right ) c^{4}}{4 d^{4}}-\frac {3 g^{3} B \,a^{3} x}{4}+\frac {3 g^{3} b B \,a^{2} c x}{2 d}-\frac {g^{3} b^{2} B a \,c^{2} x}{d^{2}}+\frac {g^{3} b^{3} B \,c^{3} x}{4 d^{3}}\) | \(314\) |
parts | \(\frac {A \,g^{3} \left (b x +a \right )^{4}}{4 b}-B \,g^{3} e^{4} \left (d a -b c \right )^{4} \left (\frac {1}{8 d^{2} e^{2} 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 )^{2}}-\frac {1}{4 d^{3} e^{3} 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 {1}{12 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 )^{3}}-\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 )}{4 d^{4} e^{4} 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 (b^{3} \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )^{3}-4 b^{2} \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )^{2} d e +6 \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b \,d^{2} e^{2}-4 d^{3} e^{3}\right )}{4 d^{4} e^{4} \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 )^{4}}\right )\) | \(448\) |
derivativedivides | \(\frac {e \left (d a -b c \right ) \left (\frac {A b \,e^{3} g^{3} \left (a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}\right )}{4 \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 )^{4}}-B \,b^{2} e^{3} g^{3} \left (a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}\right ) \left (\frac {1}{8 d^{2} e^{2} 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 )^{2}}-\frac {1}{4 d^{3} e^{3} 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 {1}{12 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 )^{3}}-\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 )}{4 d^{4} e^{4} 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 (b^{3} \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )^{3}-4 b^{2} \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )^{2} d e +6 \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b \,d^{2} e^{2}-4 d^{3} e^{3}\right )}{4 d^{4} e^{4} \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 )^{4}}\right )\right )}{b^{2}}\) | \(557\) |
default | \(\frac {e \left (d a -b c \right ) \left (\frac {A b \,e^{3} g^{3} \left (a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}\right )}{4 \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 )^{4}}-B \,b^{2} e^{3} g^{3} \left (a^{3} d^{3}-3 a^{2} b c \,d^{2}+3 a \,b^{2} c^{2} d -b^{3} c^{3}\right ) \left (\frac {1}{8 d^{2} e^{2} 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 )^{2}}-\frac {1}{4 d^{3} e^{3} 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 {1}{12 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 )^{3}}-\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 )}{4 d^{4} e^{4} 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 (b^{3} \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )^{3}-4 b^{2} \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right )^{2} d e +6 \left (\frac {d e}{b}-\frac {e \left (d a -b c \right )}{b \left (b x +a \right )}\right ) b \,d^{2} e^{2}-4 d^{3} e^{3}\right )}{4 d^{4} e^{4} \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 )^{4}}\right )\right )}{b^{2}}\) | \(557\) |
parallelrisch | \(\frac {24 A \,x^{3} a \,b^{3} d^{4} g^{3}-2 B \,x^{3} a \,b^{3} d^{4} g^{3}+2 B \,x^{3} b^{4} c \,d^{3} g^{3}+36 A \,x^{2} a^{2} b^{2} d^{4} g^{3}-9 B \,x^{2} a^{2} b^{2} d^{4} g^{3}-9 B \,a^{3} b c \,d^{3} g^{3}-24 B \,a^{2} b^{2} c^{2} d^{2} g^{3}+21 B a \,b^{3} c^{3} d \,g^{3}+18 B \,a^{4} d^{4} g^{3}-6 B \,b^{4} c^{4} g^{3}-6 B \ln \left (\frac {e \left (d x +c \right )}{b x +a}\right ) b^{4} c^{4} g^{3}+6 B x \,b^{4} c^{3} d \,g^{3}+24 B \,x^{3} \ln \left (\frac {e \left (d x +c \right )}{b x +a}\right ) a \,b^{3} d^{4} g^{3}+36 B \,x^{2} \ln \left (\frac {e \left (d x +c \right )}{b x +a}\right ) a^{2} b^{2} d^{4} g^{3}+24 B x \ln \left (\frac {e \left (d x +c \right )}{b x +a}\right ) a^{3} b \,d^{4} g^{3}+24 B \ln \left (\frac {e \left (d x +c \right )}{b x +a}\right ) a^{3} b c \,d^{3} g^{3}-36 B \ln \left (\frac {e \left (d x +c \right )}{b x +a}\right ) a^{2} b^{2} c^{2} d^{2} g^{3}+24 B \ln \left (\frac {e \left (d x +c \right )}{b x +a}\right ) a \,b^{3} c^{3} d \,g^{3}+24 A x \,a^{3} b \,d^{4} g^{3}-18 B x \,a^{3} b \,d^{4} g^{3}-3 B \,x^{2} b^{4} c^{2} d^{2} g^{3}+36 B x \,a^{2} b^{2} c \,d^{3} g^{3}-60 A \,a^{3} b c \,d^{3} g^{3}+6 A \,x^{4} b^{4} d^{4} g^{3}-6 B \ln \left (b x +a \right ) a^{4} d^{4} g^{3}-6 B \ln \left (b x +a \right ) b^{4} c^{4} g^{3}-24 B x a \,b^{3} c^{2} d^{2} g^{3}+24 B \ln \left (b x +a \right ) a^{3} b c \,d^{3} g^{3}-36 B \ln \left (b x +a \right ) a^{2} b^{2} c^{2} d^{2} g^{3}+24 B \ln \left (b x +a \right ) a \,b^{3} c^{3} d \,g^{3}+12 B \,x^{2} a \,b^{3} c \,d^{3} g^{3}-24 A \,a^{4} d^{4} g^{3}+6 B \,x^{4} \ln \left (\frac {e \left (d x +c \right )}{b x +a}\right ) b^{4} d^{4} g^{3}}{24 b \,d^{4}}\) | \(657\) |
Input:
int((b*g*x+a*g)^3*(A+B*ln(e*(d*x+c)/(b*x+a))),x,method=_RETURNVERBOSE)
Output:
1/4*(b*x+a)^4*g^3*B/b*ln(e*(d*x+c)/(b*x+a))+1/4*g^3*b^3*A*x^4+g^3*b^2*A*a* x^3-1/12*g^3*b^2*B*a*x^3+1/12*g^3*b^3/d*B*c*x^3+3/2*g^3*b*A*a^2*x^2-3/8*g^ 3*b*B*a^2*x^2+1/2*g^3*b^2/d*B*a*c*x^2-1/8*g^3*b^3/d^2*B*c^2*x^2+g^3*A*a^3* x-1/4*g^3/b*B*ln(d*x+c)*a^4+g^3/d*B*ln(d*x+c)*a^3*c-3/2*g^3*b/d^2*B*ln(d*x +c)*a^2*c^2+g^3*b^2/d^3*B*ln(d*x+c)*a*c^3-1/4*g^3*b^3/d^4*B*ln(d*x+c)*c^4- 3/4*g^3*B*a^3*x+3/2*g^3*b/d*B*a^2*c*x-g^3*b^2/d^2*B*a*c^2*x+1/4*g^3*b^3/d^ 3*B*c^3*x
Leaf count of result is larger than twice the leaf count of optimal. 320 vs. \(2 (139) = 278\).
Time = 0.10 (sec) , antiderivative size = 320, normalized size of antiderivative = 2.15 \[ \int (a g+b g x)^3 \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right ) \, dx=\frac {6 \, A b^{4} d^{4} g^{3} x^{4} - 6 \, B a^{4} d^{4} g^{3} \log \left (b x + a\right ) + 2 \, {\left (B b^{4} c d^{3} + {\left (12 \, A - B\right )} a b^{3} d^{4}\right )} g^{3} x^{3} - 3 \, {\left (B b^{4} c^{2} d^{2} - 4 \, B a b^{3} c d^{3} - 3 \, {\left (4 \, A - B\right )} a^{2} b^{2} d^{4}\right )} g^{3} x^{2} + 6 \, {\left (B b^{4} c^{3} d - 4 \, B a b^{3} c^{2} d^{2} + 6 \, B a^{2} b^{2} c d^{3} + {\left (4 \, A - 3 \, B\right )} a^{3} b d^{4}\right )} g^{3} x - 6 \, {\left (B b^{4} c^{4} - 4 \, B a b^{3} c^{3} d + 6 \, B a^{2} b^{2} c^{2} d^{2} - 4 \, B a^{3} b c d^{3}\right )} g^{3} \log \left (d x + c\right ) + 6 \, {\left (B b^{4} d^{4} g^{3} x^{4} + 4 \, B a b^{3} d^{4} g^{3} x^{3} + 6 \, B a^{2} b^{2} d^{4} g^{3} x^{2} + 4 \, B a^{3} b d^{4} g^{3} x\right )} \log \left (\frac {d e x + c e}{b x + a}\right )}{24 \, b d^{4}} \] Input:
integrate((b*g*x+a*g)^3*(A+B*log(e*(d*x+c)/(b*x+a))),x, algorithm="fricas" )
Output:
1/24*(6*A*b^4*d^4*g^3*x^4 - 6*B*a^4*d^4*g^3*log(b*x + a) + 2*(B*b^4*c*d^3 + (12*A - B)*a*b^3*d^4)*g^3*x^3 - 3*(B*b^4*c^2*d^2 - 4*B*a*b^3*c*d^3 - 3*( 4*A - B)*a^2*b^2*d^4)*g^3*x^2 + 6*(B*b^4*c^3*d - 4*B*a*b^3*c^2*d^2 + 6*B*a ^2*b^2*c*d^3 + (4*A - 3*B)*a^3*b*d^4)*g^3*x - 6*(B*b^4*c^4 - 4*B*a*b^3*c^3 *d + 6*B*a^2*b^2*c^2*d^2 - 4*B*a^3*b*c*d^3)*g^3*log(d*x + c) + 6*(B*b^4*d^ 4*g^3*x^4 + 4*B*a*b^3*d^4*g^3*x^3 + 6*B*a^2*b^2*d^4*g^3*x^2 + 4*B*a^3*b*d^ 4*g^3*x)*log((d*e*x + c*e)/(b*x + a)))/(b*d^4)
Leaf count of result is larger than twice the leaf count of optimal. 706 vs. \(2 (128) = 256\).
Time = 2.09 (sec) , antiderivative size = 706, normalized size of antiderivative = 4.74 \[ \int (a g+b g x)^3 \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right ) \, dx=\frac {A b^{3} g^{3} x^{4}}{4} - \frac {B a^{4} g^{3} \log {\left (x + \frac {\frac {B a^{5} d^{4} g^{3}}{b} + 4 B a^{4} c d^{3} g^{3} - 6 B a^{3} b c^{2} d^{2} g^{3} + 4 B a^{2} b^{2} c^{3} d g^{3} - B a b^{3} c^{4} g^{3}}{B a^{4} d^{4} g^{3} + 4 B a^{3} b c d^{3} g^{3} - 6 B a^{2} b^{2} c^{2} d^{2} g^{3} + 4 B a b^{3} c^{3} d g^{3} - B b^{4} c^{4} g^{3}} \right )}}{4 b} + \frac {B c g^{3} \cdot \left (2 a d - b c\right ) \left (2 a^{2} d^{2} - 2 a b c d + b^{2} c^{2}\right ) \log {\left (x + \frac {5 B a^{4} c d^{3} g^{3} - 6 B a^{3} b c^{2} d^{2} g^{3} + 4 B a^{2} b^{2} c^{3} d g^{3} - B a b^{3} c^{4} g^{3} - B a c g^{3} \cdot \left (2 a d - b c\right ) \left (2 a^{2} d^{2} - 2 a b c d + b^{2} c^{2}\right ) + \frac {B b c^{2} g^{3} \cdot \left (2 a d - b c\right ) \left (2 a^{2} d^{2} - 2 a b c d + b^{2} c^{2}\right )}{d}}{B a^{4} d^{4} g^{3} + 4 B a^{3} b c d^{3} g^{3} - 6 B a^{2} b^{2} c^{2} d^{2} g^{3} + 4 B a b^{3} c^{3} d g^{3} - B b^{4} c^{4} g^{3}} \right )}}{4 d^{4}} + x^{3} \left (A a b^{2} g^{3} - \frac {B a b^{2} g^{3}}{12} + \frac {B b^{3} c g^{3}}{12 d}\right ) + x^{2} \cdot \left (\frac {3 A a^{2} b g^{3}}{2} - \frac {3 B a^{2} b g^{3}}{8} + \frac {B a b^{2} c g^{3}}{2 d} - \frac {B b^{3} c^{2} g^{3}}{8 d^{2}}\right ) + x \left (A a^{3} g^{3} - \frac {3 B a^{3} g^{3}}{4} + \frac {3 B a^{2} b c g^{3}}{2 d} - \frac {B a b^{2} c^{2} g^{3}}{d^{2}} + \frac {B b^{3} c^{3} g^{3}}{4 d^{3}}\right ) + \left (B a^{3} g^{3} x + \frac {3 B a^{2} b g^{3} x^{2}}{2} + B a b^{2} g^{3} x^{3} + \frac {B b^{3} g^{3} x^{4}}{4}\right ) \log {\left (\frac {e \left (c + d x\right )}{a + b x} \right )} \] Input:
integrate((b*g*x+a*g)**3*(A+B*ln(e*(d*x+c)/(b*x+a))),x)
Output:
A*b**3*g**3*x**4/4 - B*a**4*g**3*log(x + (B*a**5*d**4*g**3/b + 4*B*a**4*c* d**3*g**3 - 6*B*a**3*b*c**2*d**2*g**3 + 4*B*a**2*b**2*c**3*d*g**3 - B*a*b* *3*c**4*g**3)/(B*a**4*d**4*g**3 + 4*B*a**3*b*c*d**3*g**3 - 6*B*a**2*b**2*c **2*d**2*g**3 + 4*B*a*b**3*c**3*d*g**3 - B*b**4*c**4*g**3))/(4*b) + B*c*g* *3*(2*a*d - b*c)*(2*a**2*d**2 - 2*a*b*c*d + b**2*c**2)*log(x + (5*B*a**4*c *d**3*g**3 - 6*B*a**3*b*c**2*d**2*g**3 + 4*B*a**2*b**2*c**3*d*g**3 - B*a*b **3*c**4*g**3 - B*a*c*g**3*(2*a*d - b*c)*(2*a**2*d**2 - 2*a*b*c*d + b**2*c **2) + B*b*c**2*g**3*(2*a*d - b*c)*(2*a**2*d**2 - 2*a*b*c*d + b**2*c**2)/d )/(B*a**4*d**4*g**3 + 4*B*a**3*b*c*d**3*g**3 - 6*B*a**2*b**2*c**2*d**2*g** 3 + 4*B*a*b**3*c**3*d*g**3 - B*b**4*c**4*g**3))/(4*d**4) + x**3*(A*a*b**2* g**3 - B*a*b**2*g**3/12 + B*b**3*c*g**3/(12*d)) + x**2*(3*A*a**2*b*g**3/2 - 3*B*a**2*b*g**3/8 + B*a*b**2*c*g**3/(2*d) - B*b**3*c**2*g**3/(8*d**2)) + x*(A*a**3*g**3 - 3*B*a**3*g**3/4 + 3*B*a**2*b*c*g**3/(2*d) - B*a*b**2*c** 2*g**3/d**2 + B*b**3*c**3*g**3/(4*d**3)) + (B*a**3*g**3*x + 3*B*a**2*b*g** 3*x**2/2 + B*a*b**2*g**3*x**3 + B*b**3*g**3*x**4/4)*log(e*(c + d*x)/(a + b *x))
Leaf count of result is larger than twice the leaf count of optimal. 436 vs. \(2 (139) = 278\).
Time = 0.04 (sec) , antiderivative size = 436, normalized size of antiderivative = 2.93 \[ \int (a g+b g x)^3 \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right ) \, dx=\frac {1}{4} \, A b^{3} g^{3} x^{4} + A a b^{2} g^{3} x^{3} + \frac {3}{2} \, A a^{2} b g^{3} 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^{3} g^{3} + \frac {3}{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 a^{2} b g^{3} + \frac {1}{2} \, {\left (2 \, x^{3} \log \left (\frac {d e x}{b x + a} + \frac {c e}{b x + a}\right ) - \frac {2 \, a^{3} \log \left (b x + a\right )}{b^{3}} + \frac {2 \, c^{3} \log \left (d x + c\right )}{d^{3}} + \frac {{\left (b^{2} c d - a b d^{2}\right )} x^{2} - 2 \, {\left (b^{2} c^{2} - a^{2} d^{2}\right )} x}{b^{2} d^{2}}\right )} B a b^{2} g^{3} + \frac {1}{24} \, {\left (6 \, x^{4} \log \left (\frac {d e x}{b x + a} + \frac {c e}{b x + a}\right ) + \frac {6 \, a^{4} \log \left (b x + a\right )}{b^{4}} - \frac {6 \, c^{4} \log \left (d x + c\right )}{d^{4}} + \frac {2 \, {\left (b^{3} c d^{2} - a b^{2} d^{3}\right )} x^{3} - 3 \, {\left (b^{3} c^{2} d - a^{2} b d^{3}\right )} x^{2} + 6 \, {\left (b^{3} c^{3} - a^{3} d^{3}\right )} x}{b^{3} d^{3}}\right )} B b^{3} g^{3} + A a^{3} g^{3} x \] Input:
integrate((b*g*x+a*g)^3*(A+B*log(e*(d*x+c)/(b*x+a))),x, algorithm="maxima" )
Output:
1/4*A*b^3*g^3*x^4 + A*a*b^2*g^3*x^3 + 3/2*A*a^2*b*g^3*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^3*g^3 + 3/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*a^2*b*g^3 + 1/2*(2*x^3*log(d *e*x/(b*x + a) + c*e/(b*x + a)) - 2*a^3*log(b*x + a)/b^3 + 2*c^3*log(d*x + c)/d^3 + ((b^2*c*d - a*b*d^2)*x^2 - 2*(b^2*c^2 - a^2*d^2)*x)/(b^2*d^2))*B *a*b^2*g^3 + 1/24*(6*x^4*log(d*e*x/(b*x + a) + c*e/(b*x + a)) + 6*a^4*log( b*x + a)/b^4 - 6*c^4*log(d*x + c)/d^4 + (2*(b^3*c*d^2 - a*b^2*d^3)*x^3 - 3 *(b^3*c^2*d - a^2*b*d^3)*x^2 + 6*(b^3*c^3 - a^3*d^3)*x)/(b^3*d^3))*B*b^3*g ^3 + A*a^3*g^3*x
Leaf count of result is larger than twice the leaf count of optimal. 1506 vs. \(2 (139) = 278\).
Time = 0.28 (sec) , antiderivative size = 1506, normalized size of antiderivative = 10.11 \[ \int (a g+b g x)^3 \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right ) \, dx=\text {Too large to display} \] Input:
integrate((b*g*x+a*g)^3*(A+B*log(e*(d*x+c)/(b*x+a))),x, algorithm="giac")
Output:
1/24*(6*(B*b^5*c^5*e^5*g^3 - 5*B*a*b^4*c^4*d*e^5*g^3 + 10*B*a^2*b^3*c^3*d^ 2*e^5*g^3 - 10*B*a^3*b^2*c^2*d^3*e^5*g^3 + 5*B*a^4*b*c*d^4*e^5*g^3 - B*a^5 *d^5*e^5*g^3)*log((d*e*x + c*e)/(b*x + a))/(b*d^4*e^4 - 4*(d*e*x + c*e)*b^ 2*d^3*e^3/(b*x + a) + 6*(d*e*x + c*e)^2*b^3*d^2*e^2/(b*x + a)^2 - 4*(d*e*x + c*e)^3*b^4*d*e/(b*x + a)^3 + (d*e*x + c*e)^4*b^5/(b*x + a)^4) + (6*A*b^ 5*c^5*d^3*e^5*g^3 - 11*B*b^5*c^5*d^3*e^5*g^3 - 30*A*a*b^4*c^4*d^4*e^5*g^3 + 55*B*a*b^4*c^4*d^4*e^5*g^3 + 60*A*a^2*b^3*c^3*d^5*e^5*g^3 - 110*B*a^2*b^ 3*c^3*d^5*e^5*g^3 - 60*A*a^3*b^2*c^2*d^6*e^5*g^3 + 110*B*a^3*b^2*c^2*d^6*e ^5*g^3 + 30*A*a^4*b*c*d^7*e^5*g^3 - 55*B*a^4*b*c*d^7*e^5*g^3 - 6*A*a^5*d^8 *e^5*g^3 + 11*B*a^5*d^8*e^5*g^3 + 26*(d*e*x + c*e)*B*b^6*c^5*d^2*e^4*g^3/( b*x + a) - 130*(d*e*x + c*e)*B*a*b^5*c^4*d^3*e^4*g^3/(b*x + a) + 260*(d*e* x + c*e)*B*a^2*b^4*c^3*d^4*e^4*g^3/(b*x + a) - 260*(d*e*x + c*e)*B*a^3*b^3 *c^2*d^5*e^4*g^3/(b*x + a) + 130*(d*e*x + c*e)*B*a^4*b^2*c*d^6*e^4*g^3/(b* x + a) - 26*(d*e*x + c*e)*B*a^5*b*d^7*e^4*g^3/(b*x + a) - 21*(d*e*x + c*e) ^2*B*b^7*c^5*d*e^3*g^3/(b*x + a)^2 + 105*(d*e*x + c*e)^2*B*a*b^6*c^4*d^2*e ^3*g^3/(b*x + a)^2 - 210*(d*e*x + c*e)^2*B*a^2*b^5*c^3*d^3*e^3*g^3/(b*x + a)^2 + 210*(d*e*x + c*e)^2*B*a^3*b^4*c^2*d^4*e^3*g^3/(b*x + a)^2 - 105*(d* e*x + c*e)^2*B*a^4*b^3*c*d^5*e^3*g^3/(b*x + a)^2 + 21*(d*e*x + c*e)^2*B*a^ 5*b^2*d^6*e^3*g^3/(b*x + a)^2 + 6*(d*e*x + c*e)^3*B*b^8*c^5*e^2*g^3/(b*x + a)^3 - 30*(d*e*x + c*e)^3*B*a*b^7*c^4*d*e^2*g^3/(b*x + a)^3 + 60*(d*e*...
Time = 25.74 (sec) , antiderivative size = 566, normalized size of antiderivative = 3.80 \[ \int (a g+b g x)^3 \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right ) \, dx=x\,\left (\frac {\left (4\,a\,d+4\,b\,c\right )\,\left (\frac {\left (\frac {b^2\,g^3\,\left (16\,A\,a\,d+4\,A\,b\,c-B\,a\,d+B\,b\,c\right )}{4\,d}-\frac {A\,b^2\,g^3\,\left (4\,a\,d+4\,b\,c\right )}{4\,d}\right )\,\left (4\,a\,d+4\,b\,c\right )}{4\,b\,d}-\frac {a\,b\,g^3\,\left (6\,A\,a\,d+4\,A\,b\,c-B\,a\,d+B\,b\,c\right )}{d}+\frac {A\,a\,b^2\,c\,g^3}{d}\right )}{4\,b\,d}+\frac {a^2\,g^3\,\left (8\,A\,a\,d+12\,A\,b\,c-3\,B\,a\,d+3\,B\,b\,c\right )}{2\,d}-\frac {a\,c\,\left (\frac {b^2\,g^3\,\left (16\,A\,a\,d+4\,A\,b\,c-B\,a\,d+B\,b\,c\right )}{4\,d}-\frac {A\,b^2\,g^3\,\left (4\,a\,d+4\,b\,c\right )}{4\,d}\right )}{b\,d}\right )-x^2\,\left (\frac {\left (\frac {b^2\,g^3\,\left (16\,A\,a\,d+4\,A\,b\,c-B\,a\,d+B\,b\,c\right )}{4\,d}-\frac {A\,b^2\,g^3\,\left (4\,a\,d+4\,b\,c\right )}{4\,d}\right )\,\left (4\,a\,d+4\,b\,c\right )}{8\,b\,d}-\frac {a\,b\,g^3\,\left (6\,A\,a\,d+4\,A\,b\,c-B\,a\,d+B\,b\,c\right )}{2\,d}+\frac {A\,a\,b^2\,c\,g^3}{2\,d}\right )+\ln \left (\frac {e\,\left (c+d\,x\right )}{a+b\,x}\right )\,\left (B\,a^3\,g^3\,x+\frac {3\,B\,a^2\,b\,g^3\,x^2}{2}+B\,a\,b^2\,g^3\,x^3+\frac {B\,b^3\,g^3\,x^4}{4}\right )+x^3\,\left (\frac {b^2\,g^3\,\left (16\,A\,a\,d+4\,A\,b\,c-B\,a\,d+B\,b\,c\right )}{12\,d}-\frac {A\,b^2\,g^3\,\left (4\,a\,d+4\,b\,c\right )}{12\,d}\right )-\frac {\ln \left (c+d\,x\right )\,\left (-4\,B\,a^3\,c\,d^3\,g^3+6\,B\,a^2\,b\,c^2\,d^2\,g^3-4\,B\,a\,b^2\,c^3\,d\,g^3+B\,b^3\,c^4\,g^3\right )}{4\,d^4}+\frac {A\,b^3\,g^3\,x^4}{4}-\frac {B\,a^4\,g^3\,\ln \left (a+b\,x\right )}{4\,b} \] Input:
int((a*g + b*g*x)^3*(A + B*log((e*(c + d*x))/(a + b*x))),x)
Output:
x*(((4*a*d + 4*b*c)*((((b^2*g^3*(16*A*a*d + 4*A*b*c - B*a*d + B*b*c))/(4*d ) - (A*b^2*g^3*(4*a*d + 4*b*c))/(4*d))*(4*a*d + 4*b*c))/(4*b*d) - (a*b*g^3 *(6*A*a*d + 4*A*b*c - B*a*d + B*b*c))/d + (A*a*b^2*c*g^3)/d))/(4*b*d) + (a ^2*g^3*(8*A*a*d + 12*A*b*c - 3*B*a*d + 3*B*b*c))/(2*d) - (a*c*((b^2*g^3*(1 6*A*a*d + 4*A*b*c - B*a*d + B*b*c))/(4*d) - (A*b^2*g^3*(4*a*d + 4*b*c))/(4 *d)))/(b*d)) - x^2*((((b^2*g^3*(16*A*a*d + 4*A*b*c - B*a*d + B*b*c))/(4*d) - (A*b^2*g^3*(4*a*d + 4*b*c))/(4*d))*(4*a*d + 4*b*c))/(8*b*d) - (a*b*g^3* (6*A*a*d + 4*A*b*c - B*a*d + B*b*c))/(2*d) + (A*a*b^2*c*g^3)/(2*d)) + log( (e*(c + d*x))/(a + b*x))*((B*b^3*g^3*x^4)/4 + B*a^3*g^3*x + (3*B*a^2*b*g^3 *x^2)/2 + B*a*b^2*g^3*x^3) + x^3*((b^2*g^3*(16*A*a*d + 4*A*b*c - B*a*d + B *b*c))/(12*d) - (A*b^2*g^3*(4*a*d + 4*b*c))/(12*d)) - (log(c + d*x)*(B*b^3 *c^4*g^3 - 4*B*a^3*c*d^3*g^3 + 6*B*a^2*b*c^2*d^2*g^3 - 4*B*a*b^2*c^3*d*g^3 ))/(4*d^4) + (A*b^3*g^3*x^4)/4 - (B*a^4*g^3*log(a + b*x))/(4*b)
Time = 0.15 (sec) , antiderivative size = 387, normalized size of antiderivative = 2.60 \[ \int (a g+b g x)^3 \left (A+B \log \left (\frac {e (c+d x)}{a+b x}\right )\right ) \, dx=\frac {g^{3} \left (-6 \,\mathrm {log}\left (d x +c \right ) a^{4} d^{4}+24 \,\mathrm {log}\left (d x +c \right ) a^{3} b c \,d^{3}-36 \,\mathrm {log}\left (d x +c \right ) a^{2} b^{2} c^{2} d^{2}+24 \,\mathrm {log}\left (d x +c \right ) a \,b^{3} c^{3} d -6 \,\mathrm {log}\left (d x +c \right ) b^{4} c^{4}+6 \,\mathrm {log}\left (\frac {d e x +c e}{b x +a}\right ) a^{4} d^{4}+24 \,\mathrm {log}\left (\frac {d e x +c e}{b x +a}\right ) a^{3} b \,d^{4} x +36 \,\mathrm {log}\left (\frac {d e x +c e}{b x +a}\right ) a^{2} b^{2} d^{4} x^{2}+24 \,\mathrm {log}\left (\frac {d e x +c e}{b x +a}\right ) a \,b^{3} d^{4} x^{3}+6 \,\mathrm {log}\left (\frac {d e x +c e}{b x +a}\right ) b^{4} d^{4} x^{4}+24 a^{4} d^{4} x +36 a^{3} b \,d^{4} x^{2}-18 a^{3} b \,d^{4} x +36 a^{2} b^{2} c \,d^{3} x +24 a^{2} b^{2} d^{4} x^{3}-9 a^{2} b^{2} d^{4} x^{2}-24 a \,b^{3} c^{2} d^{2} x +12 a \,b^{3} c \,d^{3} x^{2}+6 a \,b^{3} d^{4} x^{4}-2 a \,b^{3} d^{4} x^{3}+6 b^{4} c^{3} d x -3 b^{4} c^{2} d^{2} x^{2}+2 b^{4} c \,d^{3} x^{3}\right )}{24 d^{4}} \] Input:
int((b*g*x+a*g)^3*(A+B*log(e*(d*x+c)/(b*x+a))),x)
Output:
(g**3*( - 6*log(c + d*x)*a**4*d**4 + 24*log(c + d*x)*a**3*b*c*d**3 - 36*lo g(c + d*x)*a**2*b**2*c**2*d**2 + 24*log(c + d*x)*a*b**3*c**3*d - 6*log(c + d*x)*b**4*c**4 + 6*log((c*e + d*e*x)/(a + b*x))*a**4*d**4 + 24*log((c*e + d*e*x)/(a + b*x))*a**3*b*d**4*x + 36*log((c*e + d*e*x)/(a + b*x))*a**2*b* *2*d**4*x**2 + 24*log((c*e + d*e*x)/(a + b*x))*a*b**3*d**4*x**3 + 6*log((c *e + d*e*x)/(a + b*x))*b**4*d**4*x**4 + 24*a**4*d**4*x + 36*a**3*b*d**4*x* *2 - 18*a**3*b*d**4*x + 36*a**2*b**2*c*d**3*x + 24*a**2*b**2*d**4*x**3 - 9 *a**2*b**2*d**4*x**2 - 24*a*b**3*c**2*d**2*x + 12*a*b**3*c*d**3*x**2 + 6*a *b**3*d**4*x**4 - 2*a*b**3*d**4*x**3 + 6*b**4*c**3*d*x - 3*b**4*c**2*d**2* x**2 + 2*b**4*c*d**3*x**3))/(24*d**4)