Integrand size = 27, antiderivative size = 355 \[ \int (f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \, dx=\frac {B (b c-a d) g \left (a^3 d^3 g^3-a^2 b d^2 g^2 (5 d f-c g)+a b^2 d g \left (10 d^2 f^2-5 c d f g+c^2 g^2\right )-b^3 \left (10 d^3 f^3-10 c d^2 f^2 g+5 c^2 d f g^2-c^3 g^3\right )\right ) x}{5 b^4 d^4}-\frac {B (b c-a d) g^2 \left (a^2 d^2 g^2-a b d g (5 d f-c g)+b^2 \left (10 d^2 f^2-5 c d f g+c^2 g^2\right )\right ) x^2}{10 b^3 d^3}-\frac {B (b c-a d) g^3 (5 b d f-b c g-a d g) x^3}{15 b^2 d^2}-\frac {B (b c-a d) g^4 x^4}{20 b d}-\frac {B (b f-a g)^5 \log (a+b x)}{5 b^5 g}+\frac {(f+g x)^5 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )}{5 g}+\frac {B (d f-c g)^5 \log (c+d x)}{5 d^5 g} \] Output:
1/5*B*(-a*d+b*c)*g*(a^3*d^3*g^3-a^2*b*d^2*g^2*(-c*g+5*d*f)+a*b^2*d*g*(c^2* g^2-5*c*d*f*g+10*d^2*f^2)-b^3*(-c^3*g^3+5*c^2*d*f*g^2-10*c*d^2*f^2*g+10*d^ 3*f^3))*x/b^4/d^4-1/10*B*(-a*d+b*c)*g^2*(a^2*d^2*g^2-a*b*d*g*(-c*g+5*d*f)+ b^2*(c^2*g^2-5*c*d*f*g+10*d^2*f^2))*x^2/b^3/d^3-1/15*B*(-a*d+b*c)*g^3*(-a* d*g-b*c*g+5*b*d*f)*x^3/b^2/d^2-1/20*B*(-a*d+b*c)*g^4*x^4/b/d-1/5*B*(-a*g+b *f)^5*ln(b*x+a)/b^5/g+1/5*(g*x+f)^5*(A+B*ln(e*(b*x+a)/(d*x+c)))/g+1/5*B*(- c*g+d*f)^5*ln(d*x+c)/d^5/g
Time = 0.63 (sec) , antiderivative size = 279, normalized size of antiderivative = 0.79 \[ \int (f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \, dx=\frac {\frac {B (-b c+a d) g^2 x \left (-12 a^3 d^3 g^3+6 a^2 b d^2 g^2 (10 d f-2 c g+d g x)-2 a b^2 d g \left (6 c^2 g^2-3 c d g (10 f+g x)+d^2 \left (60 f^2+15 f g x+2 g^2 x^2\right )\right )+b^3 \left (-12 c^3 g^3+6 c^2 d g^2 (10 f+g x)-2 c d^2 g \left (60 f^2+15 f g x+2 g^2 x^2\right )+d^3 \left (120 f^3+60 f^2 g x+20 f g^2 x^2+3 g^3 x^3\right )\right )\right )}{12 b^4 d^4}-\frac {B (b f-a g)^5 \log (a+b x)}{b^5}+(f+g x)^5 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right )+\frac {B (d f-c g)^5 \log (c+d x)}{d^5}}{5 g} \] Input:
Integrate[(f + g*x)^4*(A + B*Log[(e*(a + b*x))/(c + d*x)]),x]
Output:
((B*(-(b*c) + a*d)*g^2*x*(-12*a^3*d^3*g^3 + 6*a^2*b*d^2*g^2*(10*d*f - 2*c* g + d*g*x) - 2*a*b^2*d*g*(6*c^2*g^2 - 3*c*d*g*(10*f + g*x) + d^2*(60*f^2 + 15*f*g*x + 2*g^2*x^2)) + b^3*(-12*c^3*g^3 + 6*c^2*d*g^2*(10*f + g*x) - 2* c*d^2*g*(60*f^2 + 15*f*g*x + 2*g^2*x^2) + d^3*(120*f^3 + 60*f^2*g*x + 20*f *g^2*x^2 + 3*g^3*x^3))))/(12*b^4*d^4) - (B*(b*f - a*g)^5*Log[a + b*x])/b^5 + (f + g*x)^5*(A + B*Log[(e*(a + b*x))/(c + d*x)]) + (B*(d*f - c*g)^5*Log [c + d*x])/d^5)/(5*g)
Time = 0.72 (sec) , antiderivative size = 343, normalized size of antiderivative = 0.97, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2948, 93, 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 (f+g x)^4 \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right ) \, dx\) |
\(\Big \downarrow \) 2948 |
\(\displaystyle \frac {(f+g x)^5 \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )}{5 g}-\frac {B (b c-a d) \int \frac {(f+g x)^5}{(a+b x) (c+d x)}dx}{5 g}\) |
\(\Big \downarrow \) 93 |
\(\displaystyle \frac {(f+g x)^5 \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )}{5 g}-\frac {B (b c-a d) \int \left (\frac {x^3 g^5}{b d}+\frac {(5 b d f-b c g-a d g) x^2 g^4}{b^2 d^2}+\frac {\left (\left (10 d^2 f^2-5 c d g f+c^2 g^2\right ) b^2-a d g (5 d f-c g) b+a^2 d^2 g^2\right ) x g^3}{b^3 d^3}+\frac {\left (\left (10 d^3 f^3-10 c d^2 g f^2+5 c^2 d g^2 f-c^3 g^3\right ) b^3-a d g \left (10 d^2 f^2-5 c d g f+c^2 g^2\right ) b^2+a^2 d^2 g^2 (5 d f-c g) b-a^3 d^3 g^3\right ) g^2}{b^4 d^4}+\frac {(b f-a g)^5}{b^4 (b c-a d) (a+b x)}+\frac {(d f-c g)^5}{d^4 (a d-b c) (c+d x)}\right )dx}{5 g}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {(f+g x)^5 \left (B \log \left (\frac {e (a+b x)}{c+d x}\right )+A\right )}{5 g}-\frac {B (b c-a d) \left (\frac {g^3 x^2 \left (a^2 d^2 g^2-a b d g (5 d f-c g)+b^2 \left (c^2 g^2-5 c d f g+10 d^2 f^2\right )\right )}{2 b^3 d^3}-\frac {g^2 x \left (a^3 d^3 g^3-a^2 b d^2 g^2 (5 d f-c g)+a b^2 d g \left (c^2 g^2-5 c d f g+10 d^2 f^2\right )-\left (b^3 \left (-c^3 g^3+5 c^2 d f g^2-10 c d^2 f^2 g+10 d^3 f^3\right )\right )\right )}{b^4 d^4}+\frac {(b f-a g)^5 \log (a+b x)}{b^5 (b c-a d)}+\frac {g^4 x^3 (-a d g-b c g+5 b d f)}{3 b^2 d^2}-\frac {(d f-c g)^5 \log (c+d x)}{d^5 (b c-a d)}+\frac {g^5 x^4}{4 b d}\right )}{5 g}\) |
Input:
Int[(f + g*x)^4*(A + B*Log[(e*(a + b*x))/(c + d*x)]),x]
Output:
((f + g*x)^5*(A + B*Log[(e*(a + b*x))/(c + d*x)]))/(5*g) - (B*(b*c - a*d)* (-((g^2*(a^3*d^3*g^3 - a^2*b*d^2*g^2*(5*d*f - c*g) + a*b^2*d*g*(10*d^2*f^2 - 5*c*d*f*g + c^2*g^2) - b^3*(10*d^3*f^3 - 10*c*d^2*f^2*g + 5*c^2*d*f*g^2 - c^3*g^3))*x)/(b^4*d^4)) + (g^3*(a^2*d^2*g^2 - a*b*d*g*(5*d*f - c*g) + b ^2*(10*d^2*f^2 - 5*c*d*f*g + c^2*g^2))*x^2)/(2*b^3*d^3) + (g^4*(5*b*d*f - b*c*g - a*d*g)*x^3)/(3*b^2*d^2) + (g^5*x^4)/(4*b*d) + ((b*f - a*g)^5*Log[a + b*x])/(b^5*(b*c - a*d)) - ((d*f - c*g)^5*Log[c + d*x])/(d^5*(b*c - a*d) )))/(5*g)
Int[((e_.) + (f_.)*(x_))^(p_)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_] :> Int[ExpandIntegrand[(e + f*x)^p/((a + b*x)*(c + d*x)), x], x] /; Fre eQ[{a, b, c, d, e, f}, x] && IntegerQ[p]
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])
Time = 1.19 (sec) , antiderivative size = 594, normalized size of antiderivative = 1.67
method | result | size |
risch | \(-\frac {g^{2} B c \,f^{2} x^{2}}{d}+\frac {B \ln \left (d x +c \right ) f^{5}}{5 g}-\frac {B \ln \left (-b x -a \right ) f^{5}}{5 g}+\frac {\left (g x +f \right )^{5} B \ln \left (\frac {e \left (b x +a \right )}{d x +c}\right )}{5 g}+\frac {g^{3} B \,a^{3} f x}{b^{3}}-\frac {2 g^{2} B \,a^{2} f^{2} x}{b^{2}}+\frac {2 g B a \,f^{3} x}{b}+g^{3} A f \,x^{4}+\frac {g^{4} B a \,x^{4}}{20 b}-\frac {g^{4} B c \,x^{4}}{20 d}+2 g^{2} A \,f^{2} x^{3}-\frac {g^{4} B \,a^{2} x^{3}}{15 b^{2}}-\frac {2 g B c \,f^{3} x}{d}+\frac {g^{4} B \,c^{2} x^{3}}{15 d^{2}}+2 g A \,f^{3} x^{2}+\frac {g^{4} B \,a^{3} x^{2}}{10 b^{3}}-\frac {g^{4} B \,c^{3} x^{2}}{10 d^{3}}+A \,f^{4} x -\frac {g^{4} B \,a^{4} x}{5 b^{4}}+\frac {g^{4} B \,c^{4} x}{5 d^{4}}-\frac {g^{3} B \,c^{3} f x}{d^{3}}+\frac {2 g^{2} B \,c^{2} f^{2} x}{d^{2}}+\frac {g^{3} B \ln \left (d x +c \right ) c^{4} f}{d^{4}}-\frac {2 g B \ln \left (-b x -a \right ) a^{2} f^{3}}{b^{2}}-\frac {2 g^{2} B \ln \left (d x +c \right ) c^{3} f^{2}}{d^{3}}+\frac {2 g B \ln \left (d x +c \right ) c^{2} f^{3}}{d^{2}}-\frac {g^{3} B \ln \left (-b x -a \right ) a^{4} f}{b^{4}}+\frac {2 g^{2} B \ln \left (-b x -a \right ) a^{3} f^{2}}{b^{3}}-\frac {B \ln \left (d x +c \right ) c \,f^{4}}{d}+\frac {g^{4} A \,x^{5}}{5}+\frac {B \ln \left (-b x -a \right ) a \,f^{4}}{b}-\frac {g^{4} B \ln \left (d x +c \right ) c^{5}}{5 d^{5}}+\frac {g^{4} B \ln \left (-b x -a \right ) a^{5}}{5 b^{5}}+\frac {g^{3} B a f \,x^{3}}{3 b}-\frac {g^{3} B c f \,x^{3}}{3 d}-\frac {g^{3} B \,a^{2} f \,x^{2}}{2 b^{2}}+\frac {g^{2} B a \,f^{2} x^{2}}{b}+\frac {g^{3} B \,c^{2} f \,x^{2}}{2 d^{2}}\) | \(594\) |
parallelrisch | \(\text {Expression too large to display}\) | \(1200\) |
parts | \(\text {Expression too large to display}\) | \(2020\) |
derivativedivides | \(\text {Expression too large to display}\) | \(2612\) |
default | \(\text {Expression too large to display}\) | \(2612\) |
Input:
int((g*x+f)^4*(A+B*ln(e*(b*x+a)/(d*x+c))),x,method=_RETURNVERBOSE)
Output:
-1/d*g^2*B*c*f^2*x^2+1/5/g*B*ln(d*x+c)*f^5-1/5/g*B*ln(-b*x-a)*f^5+1/5*(g*x +f)^5*B/g*ln(e*(b*x+a)/(d*x+c))+1/b^3*g^3*B*a^3*f*x-2/b^2*g^2*B*a^2*f^2*x+ 2/b*g*B*a*f^3*x+g^3*A*f*x^4+1/20/b*g^4*B*a*x^4-1/20/d*g^4*B*c*x^4+2*g^2*A* f^2*x^3-1/15/b^2*g^4*B*a^2*x^3-2/d*g*B*c*f^3*x+1/15/d^2*g^4*B*c^2*x^3+2*g* A*f^3*x^2+1/10/b^3*g^4*B*a^3*x^2-1/10/d^3*g^4*B*c^3*x^2+A*f^4*x-1/5/b^4*g^ 4*B*a^4*x+1/5/d^4*g^4*B*c^4*x-1/d^3*g^3*B*c^3*f*x+2/d^2*g^2*B*c^2*f^2*x+1/ d^4*g^3*B*ln(d*x+c)*c^4*f-2/b^2*g*B*ln(-b*x-a)*a^2*f^3-2/d^3*g^2*B*ln(d*x+ c)*c^3*f^2+2/d^2*g*B*ln(d*x+c)*c^2*f^3-1/b^4*g^3*B*ln(-b*x-a)*a^4*f+2/b^3* g^2*B*ln(-b*x-a)*a^3*f^2-1/d*B*ln(d*x+c)*c*f^4+1/5*g^4*A*x^5+1/b*B*ln(-b*x -a)*a*f^4-1/5/d^5*g^4*B*ln(d*x+c)*c^5+1/5/b^5*g^4*B*ln(-b*x-a)*a^5+1/3/b*g ^3*B*a*f*x^3-1/3/d*g^3*B*c*f*x^3-1/2/b^2*g^3*B*a^2*f*x^2+1/b*g^2*B*a*f^2*x ^2+1/2/d^2*g^3*B*c^2*f*x^2
Time = 0.40 (sec) , antiderivative size = 636, normalized size of antiderivative = 1.79 \[ \int (f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \, dx=\frac {12 \, A b^{5} d^{5} g^{4} x^{5} + 3 \, {\left (20 \, A b^{5} d^{5} f g^{3} - {\left (B b^{5} c d^{4} - B a b^{4} d^{5}\right )} g^{4}\right )} x^{4} + 4 \, {\left (30 \, A b^{5} d^{5} f^{2} g^{2} - 5 \, {\left (B b^{5} c d^{4} - B a b^{4} d^{5}\right )} f g^{3} + {\left (B b^{5} c^{2} d^{3} - B a^{2} b^{3} d^{5}\right )} g^{4}\right )} x^{3} + 6 \, {\left (20 \, A b^{5} d^{5} f^{3} g - 10 \, {\left (B b^{5} c d^{4} - B a b^{4} d^{5}\right )} f^{2} g^{2} + 5 \, {\left (B b^{5} c^{2} d^{3} - B a^{2} b^{3} d^{5}\right )} f g^{3} - {\left (B b^{5} c^{3} d^{2} - B a^{3} b^{2} d^{5}\right )} g^{4}\right )} x^{2} + 12 \, {\left (5 \, A b^{5} d^{5} f^{4} - 10 \, {\left (B b^{5} c d^{4} - B a b^{4} d^{5}\right )} f^{3} g + 10 \, {\left (B b^{5} c^{2} d^{3} - B a^{2} b^{3} d^{5}\right )} f^{2} g^{2} - 5 \, {\left (B b^{5} c^{3} d^{2} - B a^{3} b^{2} d^{5}\right )} f g^{3} + {\left (B b^{5} c^{4} d - B a^{4} b d^{5}\right )} g^{4}\right )} x + 12 \, {\left (5 \, B a b^{4} d^{5} f^{4} - 10 \, B a^{2} b^{3} d^{5} f^{3} g + 10 \, B a^{3} b^{2} d^{5} f^{2} g^{2} - 5 \, B a^{4} b d^{5} f g^{3} + B a^{5} d^{5} g^{4}\right )} \log \left (b x + a\right ) - 12 \, {\left (5 \, B b^{5} c d^{4} f^{4} - 10 \, B b^{5} c^{2} d^{3} f^{3} g + 10 \, B b^{5} c^{3} d^{2} f^{2} g^{2} - 5 \, B b^{5} c^{4} d f g^{3} + B b^{5} c^{5} g^{4}\right )} \log \left (d x + c\right ) + 12 \, {\left (B b^{5} d^{5} g^{4} x^{5} + 5 \, B b^{5} d^{5} f g^{3} x^{4} + 10 \, B b^{5} d^{5} f^{2} g^{2} x^{3} + 10 \, B b^{5} d^{5} f^{3} g x^{2} + 5 \, B b^{5} d^{5} f^{4} x\right )} \log \left (\frac {b e x + a e}{d x + c}\right )}{60 \, b^{5} d^{5}} \] Input:
integrate((g*x+f)^4*(A+B*log(e*(b*x+a)/(d*x+c))),x, algorithm="fricas")
Output:
1/60*(12*A*b^5*d^5*g^4*x^5 + 3*(20*A*b^5*d^5*f*g^3 - (B*b^5*c*d^4 - B*a*b^ 4*d^5)*g^4)*x^4 + 4*(30*A*b^5*d^5*f^2*g^2 - 5*(B*b^5*c*d^4 - B*a*b^4*d^5)* f*g^3 + (B*b^5*c^2*d^3 - B*a^2*b^3*d^5)*g^4)*x^3 + 6*(20*A*b^5*d^5*f^3*g - 10*(B*b^5*c*d^4 - B*a*b^4*d^5)*f^2*g^2 + 5*(B*b^5*c^2*d^3 - B*a^2*b^3*d^5 )*f*g^3 - (B*b^5*c^3*d^2 - B*a^3*b^2*d^5)*g^4)*x^2 + 12*(5*A*b^5*d^5*f^4 - 10*(B*b^5*c*d^4 - B*a*b^4*d^5)*f^3*g + 10*(B*b^5*c^2*d^3 - B*a^2*b^3*d^5) *f^2*g^2 - 5*(B*b^5*c^3*d^2 - B*a^3*b^2*d^5)*f*g^3 + (B*b^5*c^4*d - B*a^4* b*d^5)*g^4)*x + 12*(5*B*a*b^4*d^5*f^4 - 10*B*a^2*b^3*d^5*f^3*g + 10*B*a^3* b^2*d^5*f^2*g^2 - 5*B*a^4*b*d^5*f*g^3 + B*a^5*d^5*g^4)*log(b*x + a) - 12*( 5*B*b^5*c*d^4*f^4 - 10*B*b^5*c^2*d^3*f^3*g + 10*B*b^5*c^3*d^2*f^2*g^2 - 5* B*b^5*c^4*d*f*g^3 + B*b^5*c^5*g^4)*log(d*x + c) + 12*(B*b^5*d^5*g^4*x^5 + 5*B*b^5*d^5*f*g^3*x^4 + 10*B*b^5*d^5*f^2*g^2*x^3 + 10*B*b^5*d^5*f^3*g*x^2 + 5*B*b^5*d^5*f^4*x)*log((b*e*x + a*e)/(d*x + c)))/(b^5*d^5)
Leaf count of result is larger than twice the leaf count of optimal. 1436 vs. \(2 (337) = 674\).
Time = 12.10 (sec) , antiderivative size = 1436, normalized size of antiderivative = 4.05 \[ \int (f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \, dx =\text {Too large to display} \] Input:
integrate((g*x+f)**4*(A+B*ln(e*(b*x+a)/(d*x+c))),x)
Output:
A*g**4*x**5/5 + B*a*(a**4*g**4 - 5*a**3*b*f*g**3 + 10*a**2*b**2*f**2*g**2 - 10*a*b**3*f**3*g + 5*b**4*f**4)*log(x + (B*a**5*c*d**4*g**4 - 5*B*a**4*b *c*d**4*f*g**3 + 10*B*a**3*b**2*c*d**4*f**2*g**2 - 10*B*a**2*b**3*c*d**4*f **3*g + B*a**2*d**5*(a**4*g**4 - 5*a**3*b*f*g**3 + 10*a**2*b**2*f**2*g**2 - 10*a*b**3*f**3*g + 5*b**4*f**4)/b + B*a*b**4*c**5*g**4 - 5*B*a*b**4*c**4 *d*f*g**3 + 10*B*a*b**4*c**3*d**2*f**2*g**2 - 10*B*a*b**4*c**2*d**3*f**3*g + 10*B*a*b**4*c*d**4*f**4 - B*a*c*d**4*(a**4*g**4 - 5*a**3*b*f*g**3 + 10* a**2*b**2*f**2*g**2 - 10*a*b**3*f**3*g + 5*b**4*f**4))/(B*a**5*d**5*g**4 - 5*B*a**4*b*d**5*f*g**3 + 10*B*a**3*b**2*d**5*f**2*g**2 - 10*B*a**2*b**3*d **5*f**3*g + 5*B*a*b**4*d**5*f**4 + B*b**5*c**5*g**4 - 5*B*b**5*c**4*d*f*g **3 + 10*B*b**5*c**3*d**2*f**2*g**2 - 10*B*b**5*c**2*d**3*f**3*g + 5*B*b** 5*c*d**4*f**4))/(5*b**5) - B*c*(c**4*g**4 - 5*c**3*d*f*g**3 + 10*c**2*d**2 *f**2*g**2 - 10*c*d**3*f**3*g + 5*d**4*f**4)*log(x + (B*a**5*c*d**4*g**4 - 5*B*a**4*b*c*d**4*f*g**3 + 10*B*a**3*b**2*c*d**4*f**2*g**2 - 10*B*a**2*b* *3*c*d**4*f**3*g + B*a*b**4*c**5*g**4 - 5*B*a*b**4*c**4*d*f*g**3 + 10*B*a* b**4*c**3*d**2*f**2*g**2 - 10*B*a*b**4*c**2*d**3*f**3*g + 10*B*a*b**4*c*d* *4*f**4 - B*a*b**4*c*(c**4*g**4 - 5*c**3*d*f*g**3 + 10*c**2*d**2*f**2*g**2 - 10*c*d**3*f**3*g + 5*d**4*f**4) + B*b**5*c**2*(c**4*g**4 - 5*c**3*d*f*g **3 + 10*c**2*d**2*f**2*g**2 - 10*c*d**3*f**3*g + 5*d**4*f**4)/d)/(B*a**5* d**5*g**4 - 5*B*a**4*b*d**5*f*g**3 + 10*B*a**3*b**2*d**5*f**2*g**2 - 10...
Time = 0.05 (sec) , antiderivative size = 593, normalized size of antiderivative = 1.67 \[ \int (f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \, dx=\frac {1}{5} \, A g^{4} x^{5} + A f g^{3} x^{4} + 2 \, A f^{2} g^{2} x^{3} + 2 \, A f^{3} g x^{2} + {\left (x \log \left (\frac {b e x}{d x + c} + \frac {a e}{d x + c}\right ) + \frac {a \log \left (b x + a\right )}{b} - \frac {c \log \left (d x + c\right )}{d}\right )} B f^{4} + 2 \, {\left (x^{2} \log \left (\frac {b e x}{d x + c} + \frac {a e}{d x + c}\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 f^{3} g + {\left (2 \, x^{3} \log \left (\frac {b e x}{d x + c} + \frac {a e}{d x + c}\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 f^{2} g^{2} + \frac {1}{6} \, {\left (6 \, x^{4} \log \left (\frac {b e x}{d x + c} + \frac {a e}{d x + c}\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 f g^{3} + \frac {1}{60} \, {\left (12 \, x^{5} \log \left (\frac {b e x}{d x + c} + \frac {a e}{d x + c}\right ) + \frac {12 \, a^{5} \log \left (b x + a\right )}{b^{5}} - \frac {12 \, c^{5} \log \left (d x + c\right )}{d^{5}} - \frac {3 \, {\left (b^{4} c d^{3} - a b^{3} d^{4}\right )} x^{4} - 4 \, {\left (b^{4} c^{2} d^{2} - a^{2} b^{2} d^{4}\right )} x^{3} + 6 \, {\left (b^{4} c^{3} d - a^{3} b d^{4}\right )} x^{2} - 12 \, {\left (b^{4} c^{4} - a^{4} d^{4}\right )} x}{b^{4} d^{4}}\right )} B g^{4} + A f^{4} x \] Input:
integrate((g*x+f)^4*(A+B*log(e*(b*x+a)/(d*x+c))),x, algorithm="maxima")
Output:
1/5*A*g^4*x^5 + A*f*g^3*x^4 + 2*A*f^2*g^2*x^3 + 2*A*f^3*g*x^2 + (x*log(b*e *x/(d*x + c) + a*e/(d*x + c)) + a*log(b*x + a)/b - c*log(d*x + c)/d)*B*f^4 + 2*(x^2*log(b*e*x/(d*x + c) + a*e/(d*x + c)) - a^2*log(b*x + a)/b^2 + c^ 2*log(d*x + c)/d^2 - (b*c - a*d)*x/(b*d))*B*f^3*g + (2*x^3*log(b*e*x/(d*x + c) + a*e/(d*x + c)) + 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*f^2*g^2 + 1/6*(6*x^4*log(b*e*x/(d*x + c) + a*e/(d*x + c)) - 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*f*g^3 + 1/60*(12*x ^5*log(b*e*x/(d*x + c) + a*e/(d*x + c)) + 12*a^5*log(b*x + a)/b^5 - 12*c^5 *log(d*x + c)/d^5 - (3*(b^4*c*d^3 - a*b^3*d^4)*x^4 - 4*(b^4*c^2*d^2 - a^2* b^2*d^4)*x^3 + 6*(b^4*c^3*d - a^3*b*d^4)*x^2 - 12*(b^4*c^4 - a^4*d^4)*x)/( b^4*d^4))*B*g^4 + A*f^4*x
Leaf count of result is larger than twice the leaf count of optimal. 10664 vs. \(2 (341) = 682\).
Time = 0.93 (sec) , antiderivative size = 10664, normalized size of antiderivative = 30.04 \[ \int (f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \, dx=\text {Too large to display} \] Input:
integrate((g*x+f)^4*(A+B*log(e*(b*x+a)/(d*x+c))),x, algorithm="giac")
Output:
1/60*(12*(5*B*b^6*c^2*d^4*e^6*f^4 - 10*B*a*b^5*c*d^5*e^6*f^4 + 5*B*a^2*b^4 *d^6*e^6*f^4 - 10*B*b^6*c^3*d^3*e^6*f^3*g + 10*B*a*b^5*c^2*d^4*e^6*f^3*g + 10*B*a^2*b^4*c*d^5*e^6*f^3*g - 10*B*a^3*b^3*d^6*e^6*f^3*g + 10*B*b^6*c^4* d^2*e^6*f^2*g^2 - 10*B*a*b^5*c^3*d^3*e^6*f^2*g^2 - 10*B*a^3*b^3*c*d^5*e^6* f^2*g^2 + 10*B*a^4*b^2*d^6*e^6*f^2*g^2 - 5*B*b^6*c^5*d*e^6*f*g^3 + 5*B*a*b ^5*c^4*d^2*e^6*f*g^3 + 5*B*a^4*b^2*c*d^5*e^6*f*g^3 - 5*B*a^5*b*d^6*e^6*f*g ^3 + B*b^6*c^6*e^6*g^4 - B*a*b^5*c^5*d*e^6*g^4 - B*a^5*b*c*d^5*e^6*g^4 + B *a^6*d^6*e^6*g^4 - 20*(b*e*x + a*e)*B*b^5*c^2*d^5*e^5*f^4/(d*x + c) + 40*( b*e*x + a*e)*B*a*b^4*c*d^6*e^5*f^4/(d*x + c) - 20*(b*e*x + a*e)*B*a^2*b^3* d^7*e^5*f^4/(d*x + c) + 50*(b*e*x + a*e)*B*b^5*c^3*d^4*e^5*f^3*g/(d*x + c) - 70*(b*e*x + a*e)*B*a*b^4*c^2*d^5*e^5*f^3*g/(d*x + c) - 10*(b*e*x + a*e) *B*a^2*b^3*c*d^6*e^5*f^3*g/(d*x + c) + 30*(b*e*x + a*e)*B*a^3*b^2*d^7*e^5* f^3*g/(d*x + c) - 50*(b*e*x + a*e)*B*b^5*c^4*d^3*e^5*f^2*g^2/(d*x + c) + 5 0*(b*e*x + a*e)*B*a*b^4*c^3*d^4*e^5*f^2*g^2/(d*x + c) + 30*(b*e*x + a*e)*B *a^2*b^3*c^2*d^5*e^5*f^2*g^2/(d*x + c) - 10*(b*e*x + a*e)*B*a^3*b^2*c*d^6* e^5*f^2*g^2/(d*x + c) - 20*(b*e*x + a*e)*B*a^4*b*d^7*e^5*f^2*g^2/(d*x + c) + 25*(b*e*x + a*e)*B*b^5*c^5*d^2*e^5*f*g^3/(d*x + c) - 25*(b*e*x + a*e)*B *a*b^4*c^4*d^3*e^5*f*g^3/(d*x + c) - 20*(b*e*x + a*e)*B*a^3*b^2*c^2*d^5*e^ 5*f*g^3/(d*x + c) + 15*(b*e*x + a*e)*B*a^4*b*c*d^6*e^5*f*g^3/(d*x + c) + 5 *(b*e*x + a*e)*B*a^5*d^7*e^5*f*g^3/(d*x + c) - 5*(b*e*x + a*e)*B*b^5*c^...
Time = 26.23 (sec) , antiderivative size = 1392, normalized size of antiderivative = 3.92 \[ \int (f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \, dx=\text {Too large to display} \] Input:
int((f + g*x)^4*(A + B*log((e*(a + b*x))/(c + d*x))),x)
Output:
x^2*((20*A*a*c*f*g^3 + 20*A*b*d*f^3*g + 30*A*a*d*f^2*g^2 + 30*A*b*c*f^2*g^ 2 + 10*B*a*d*f^2*g^2 - 10*B*b*c*f^2*g^2)/(10*b*d) + ((5*a*d + 5*b*c)*((((5 *A*a*d*g^4 + 5*A*b*c*g^4 + B*a*d*g^4 - B*b*c*g^4 + 20*A*b*d*f*g^3)/(5*b*d) - (A*g^4*(5*a*d + 5*b*c))/(5*b*d))*(5*a*d + 5*b*c))/(5*b*d) - (5*A*a*c*g^ 4 + 20*A*a*d*f*g^3 + 20*A*b*c*f*g^3 + 5*B*a*d*f*g^3 - 5*B*b*c*f*g^3 + 30*A *b*d*f^2*g^2)/(5*b*d) + (A*a*c*g^4)/(b*d)))/(10*b*d) - (a*c*((5*A*a*d*g^4 + 5*A*b*c*g^4 + B*a*d*g^4 - B*b*c*g^4 + 20*A*b*d*f*g^3)/(5*b*d) - (A*g^4*( 5*a*d + 5*b*c))/(5*b*d)))/(2*b*d)) + x^4*((5*A*a*d*g^4 + 5*A*b*c*g^4 + B*a *d*g^4 - B*b*c*g^4 + 20*A*b*d*f*g^3)/(20*b*d) - (A*g^4*(5*a*d + 5*b*c))/(2 0*b*d)) + log((e*(a + b*x))/(c + d*x))*((B*g^4*x^5)/5 + B*f^4*x + 2*B*f^2* g^2*x^3 + 2*B*f^3*g*x^2 + B*f*g^3*x^4) + x*((5*A*b*d*f^4 + 20*A*a*d*f^3*g + 20*A*b*c*f^3*g + 10*B*a*d*f^3*g - 10*B*b*c*f^3*g + 30*A*a*c*f^2*g^2)/(5* b*d) - ((5*a*d + 5*b*c)*((20*A*a*c*f*g^3 + 20*A*b*d*f^3*g + 30*A*a*d*f^2*g ^2 + 30*A*b*c*f^2*g^2 + 10*B*a*d*f^2*g^2 - 10*B*b*c*f^2*g^2)/(5*b*d) + ((5 *a*d + 5*b*c)*((((5*A*a*d*g^4 + 5*A*b*c*g^4 + B*a*d*g^4 - B*b*c*g^4 + 20*A *b*d*f*g^3)/(5*b*d) - (A*g^4*(5*a*d + 5*b*c))/(5*b*d))*(5*a*d + 5*b*c))/(5 *b*d) - (5*A*a*c*g^4 + 20*A*a*d*f*g^3 + 20*A*b*c*f*g^3 + 5*B*a*d*f*g^3 - 5 *B*b*c*f*g^3 + 30*A*b*d*f^2*g^2)/(5*b*d) + (A*a*c*g^4)/(b*d)))/(5*b*d) - ( a*c*((5*A*a*d*g^4 + 5*A*b*c*g^4 + B*a*d*g^4 - B*b*c*g^4 + 20*A*b*d*f*g^3)/ (5*b*d) - (A*g^4*(5*a*d + 5*b*c))/(5*b*d)))/(b*d)))/(5*b*d) + (a*c*((((...
Time = 0.15 (sec) , antiderivative size = 918, normalized size of antiderivative = 2.59 \[ \int (f+g x)^4 \left (A+B \log \left (\frac {e (a+b x)}{c+d x}\right )\right ) \, dx =\text {Too large to display} \] Input:
int((g*x+f)^4*(A+B*log(e*(b*x+a)/(d*x+c))),x)
Output:
(12*log(c + d*x)*a**5*d**5*g**4 - 60*log(c + d*x)*a**4*b*d**5*f*g**3 + 120 *log(c + d*x)*a**3*b**2*d**5*f**2*g**2 - 120*log(c + d*x)*a**2*b**3*d**5*f **3*g + 60*log(c + d*x)*a*b**4*d**5*f**4 - 12*log(c + d*x)*b**5*c**5*g**4 + 60*log(c + d*x)*b**5*c**4*d*f*g**3 - 120*log(c + d*x)*b**5*c**3*d**2*f** 2*g**2 + 120*log(c + d*x)*b**5*c**2*d**3*f**3*g - 60*log(c + d*x)*b**5*c*d **4*f**4 + 12*log((a*e + b*e*x)/(c + d*x))*a**5*d**5*g**4 - 60*log((a*e + b*e*x)/(c + d*x))*a**4*b*d**5*f*g**3 + 120*log((a*e + b*e*x)/(c + d*x))*a* *3*b**2*d**5*f**2*g**2 - 120*log((a*e + b*e*x)/(c + d*x))*a**2*b**3*d**5*f **3*g + 60*log((a*e + b*e*x)/(c + d*x))*a*b**4*d**5*f**4 + 60*log((a*e + b *e*x)/(c + d*x))*b**5*d**5*f**4*x + 120*log((a*e + b*e*x)/(c + d*x))*b**5* d**5*f**3*g*x**2 + 120*log((a*e + b*e*x)/(c + d*x))*b**5*d**5*f**2*g**2*x* *3 + 60*log((a*e + b*e*x)/(c + d*x))*b**5*d**5*f*g**3*x**4 + 12*log((a*e + b*e*x)/(c + d*x))*b**5*d**5*g**4*x**5 - 12*a**4*b*d**5*g**4*x + 60*a**3*b **2*d**5*f*g**3*x + 6*a**3*b**2*d**5*g**4*x**2 - 120*a**2*b**3*d**5*f**2*g **2*x - 30*a**2*b**3*d**5*f*g**3*x**2 - 4*a**2*b**3*d**5*g**4*x**3 + 60*a* b**4*d**5*f**4*x + 120*a*b**4*d**5*f**3*g*x**2 + 120*a*b**4*d**5*f**3*g*x + 120*a*b**4*d**5*f**2*g**2*x**3 + 60*a*b**4*d**5*f**2*g**2*x**2 + 60*a*b* *4*d**5*f*g**3*x**4 + 20*a*b**4*d**5*f*g**3*x**3 + 12*a*b**4*d**5*g**4*x** 5 + 3*a*b**4*d**5*g**4*x**4 + 12*b**5*c**4*d*g**4*x - 60*b**5*c**3*d**2*f* g**3*x - 6*b**5*c**3*d**2*g**4*x**2 + 120*b**5*c**2*d**3*f**2*g**2*x + ...