\(\int (f+g x)^3 (a+b \log (c (d+e x)^n)) \, dx\) [36]

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

Optimal result

Integrand size = 22, antiderivative size = 149 \[ \int (f+g x)^3 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx=-\frac {b (e f-d g)^3 n x}{4 e^3}-\frac {b (e f-d g)^2 n (f+g x)^2}{8 e^2 g}-\frac {b (e f-d g) n (f+g x)^3}{12 e g}-\frac {b n (f+g x)^4}{16 g}-\frac {b (e f-d g)^4 n \log (d+e x)}{4 e^4 g}+\frac {(f+g x)^4 \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 g} \] Output:

-1/4*b*(-d*g+e*f)^3*n*x/e^3-1/8*b*(-d*g+e*f)^2*n*(g*x+f)^2/e^2/g-1/12*b*(- 
d*g+e*f)*n*(g*x+f)^3/e/g-1/16*b*n*(g*x+f)^4/g-1/4*b*(-d*g+e*f)^4*n*ln(e*x+ 
d)/e^4/g+1/4*(g*x+f)^4*(a+b*ln(c*(e*x+d)^n))/g
 

Mathematica [A] (verified)

Time = 0.22 (sec) , antiderivative size = 226, normalized size of antiderivative = 1.52 \[ \int (f+g x)^3 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {e x \left (12 a e^3 \left (4 f^3+6 f^2 g x+4 f g^2 x^2+g^3 x^3\right )-b n \left (-12 d^3 g^3+6 d^2 e g^2 (8 f+g x)-4 d e^2 g \left (18 f^2+6 f g x+g^2 x^2\right )+e^3 \left (48 f^3+36 f^2 g x+16 f g^2 x^2+3 g^3 x^3\right )\right )\right )-12 b d^2 g \left (6 e^2 f^2-4 d e f g+d^2 g^2\right ) n \log (d+e x)+12 b e^3 \left (4 d f^3+e x \left (4 f^3+6 f^2 g x+4 f g^2 x^2+g^3 x^3\right )\right ) \log \left (c (d+e x)^n\right )}{48 e^4} \] Input:

Integrate[(f + g*x)^3*(a + b*Log[c*(d + e*x)^n]),x]
 

Output:

(e*x*(12*a*e^3*(4*f^3 + 6*f^2*g*x + 4*f*g^2*x^2 + g^3*x^3) - b*n*(-12*d^3* 
g^3 + 6*d^2*e*g^2*(8*f + g*x) - 4*d*e^2*g*(18*f^2 + 6*f*g*x + g^2*x^2) + e 
^3*(48*f^3 + 36*f^2*g*x + 16*f*g^2*x^2 + 3*g^3*x^3))) - 12*b*d^2*g*(6*e^2* 
f^2 - 4*d*e*f*g + d^2*g^2)*n*Log[d + e*x] + 12*b*e^3*(4*d*f^3 + e*x*(4*f^3 
 + 6*f^2*g*x + 4*f*g^2*x^2 + g^3*x^3))*Log[c*(d + e*x)^n])/(48*e^4)
 

Rubi [A] (verified)

Time = 0.50 (sec) , antiderivative size = 136, normalized size of antiderivative = 0.91, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {2842, 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 (f+g x)^3 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx\)

\(\Big \downarrow \) 2842

\(\displaystyle \frac {(f+g x)^4 \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 g}-\frac {b e n \int \frac {(f+g x)^4}{d+e x}dx}{4 g}\)

\(\Big \downarrow \) 49

\(\displaystyle \frac {(f+g x)^4 \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 g}-\frac {b e n \int \left (\frac {(e f-d g)^4}{e^4 (d+e x)}+\frac {g (e f-d g)^3}{e^4}+\frac {g (f+g x) (e f-d g)^2}{e^3}+\frac {g (f+g x)^2 (e f-d g)}{e^2}+\frac {g (f+g x)^3}{e}\right )dx}{4 g}\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {(f+g x)^4 \left (a+b \log \left (c (d+e x)^n\right )\right )}{4 g}-\frac {b e n \left (\frac {(e f-d g)^4 \log (d+e x)}{e^5}+\frac {g x (e f-d g)^3}{e^4}+\frac {(f+g x)^2 (e f-d g)^2}{2 e^3}+\frac {(f+g x)^3 (e f-d g)}{3 e^2}+\frac {(f+g x)^4}{4 e}\right )}{4 g}\)

Input:

Int[(f + g*x)^3*(a + b*Log[c*(d + e*x)^n]),x]
 

Output:

-1/4*(b*e*n*((g*(e*f - d*g)^3*x)/e^4 + ((e*f - d*g)^2*(f + g*x)^2)/(2*e^3) 
 + ((e*f - d*g)*(f + g*x)^3)/(3*e^2) + (f + g*x)^4/(4*e) + ((e*f - d*g)^4* 
Log[d + e*x])/e^5))/g + ((f + g*x)^4*(a + b*Log[c*(d + e*x)^n]))/(4*g)
 

Defintions of rubi rules used

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 2842
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_ 
))^(q_.), x_Symbol] :> Simp[(f + g*x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/( 
g*(q + 1))), x] - Simp[b*e*(n/(g*(q + 1)))   Int[(f + g*x)^(q + 1)/(d + e*x 
), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && 
NeQ[q, -1]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(427\) vs. \(2(137)=274\).

Time = 1.70 (sec) , antiderivative size = 428, normalized size of antiderivative = 2.87

method result size
parallelrisch \(-\frac {-96 \ln \left (e x +d \right ) b d \,e^{3} f^{3} n -72 x^{2} a \,e^{4} f^{2} g -48 x \ln \left (c \left (e x +d \right )^{n}\right ) b \,e^{4} f^{3}+48 x b \,e^{4} f^{3} n +48 \ln \left (c \left (e x +d \right )^{n}\right ) b d \,e^{3} f^{3}+12 \ln \left (e x +d \right ) b \,d^{4} g^{3} n -12 x^{4} \ln \left (c \left (e x +d \right )^{n}\right ) b \,e^{4} g^{3}+3 x^{4} b \,e^{4} g^{3} n -48 x^{3} a \,e^{4} f \,g^{2}+48 a d \,f^{3} e^{3}-12 x^{4} a \,e^{4} g^{3}-48 x a \,e^{4} f^{3}-48 b d \,e^{3} f^{3} n -48 \ln \left (e x +d \right ) b \,d^{3} e f \,g^{2} n +72 \ln \left (e x +d \right ) b \,d^{2} e^{2} f^{2} g n -24 x^{2} b d \,e^{3} f \,g^{2} n +48 x b \,d^{2} e^{2} f \,g^{2} n -72 x b d \,e^{3} f^{2} g n +12 b \,d^{4} g^{3} n -48 b \,d^{3} e f \,g^{2} n +72 b \,d^{2} e^{2} f^{2} g n -48 x^{3} \ln \left (c \left (e x +d \right )^{n}\right ) b \,e^{4} f \,g^{2}-4 x^{3} b d \,e^{3} g^{3} n +16 x^{3} b \,e^{4} f \,g^{2} n -72 x^{2} \ln \left (c \left (e x +d \right )^{n}\right ) b \,e^{4} f^{2} g +6 x^{2} b \,d^{2} e^{2} g^{3} n +36 x^{2} b \,e^{4} f^{2} g n -12 x b \,d^{3} e \,g^{3} n}{48 e^{4}}\) \(428\)
risch \(\text {Expression too large to display}\) \(836\)

Input:

int((g*x+f)^3*(a+b*ln(c*(e*x+d)^n)),x,method=_RETURNVERBOSE)
 

Output:

-1/48*(-96*ln(e*x+d)*b*d*e^3*f^3*n-72*x^2*a*e^4*f^2*g-48*x*ln(c*(e*x+d)^n) 
*b*e^4*f^3+48*x*b*e^4*f^3*n+48*ln(c*(e*x+d)^n)*b*d*e^3*f^3+12*ln(e*x+d)*b* 
d^4*g^3*n-12*x^4*ln(c*(e*x+d)^n)*b*e^4*g^3+3*x^4*b*e^4*g^3*n-48*x^3*a*e^4* 
f*g^2+48*a*d*f^3*e^3-12*x^4*a*e^4*g^3-48*x*a*e^4*f^3-48*b*d*e^3*f^3*n-48*l 
n(e*x+d)*b*d^3*e*f*g^2*n+72*ln(e*x+d)*b*d^2*e^2*f^2*g*n-24*x^2*b*d*e^3*f*g 
^2*n+48*x*b*d^2*e^2*f*g^2*n-72*x*b*d*e^3*f^2*g*n+12*b*d^4*g^3*n-48*b*d^3*e 
*f*g^2*n+72*b*d^2*e^2*f^2*g*n-48*x^3*ln(c*(e*x+d)^n)*b*e^4*f*g^2-4*x^3*b*d 
*e^3*g^3*n+16*x^3*b*e^4*f*g^2*n-72*x^2*ln(c*(e*x+d)^n)*b*e^4*f^2*g+6*x^2*b 
*d^2*e^2*g^3*n+36*x^2*b*e^4*f^2*g*n-12*x*b*d^3*e*g^3*n)/e^4
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 340 vs. \(2 (137) = 274\).

Time = 0.10 (sec) , antiderivative size = 340, normalized size of antiderivative = 2.28 \[ \int (f+g x)^3 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx=-\frac {3 \, {\left (b e^{4} g^{3} n - 4 \, a e^{4} g^{3}\right )} x^{4} - 4 \, {\left (12 \, a e^{4} f g^{2} - {\left (4 \, b e^{4} f g^{2} - b d e^{3} g^{3}\right )} n\right )} x^{3} - 6 \, {\left (12 \, a e^{4} f^{2} g - {\left (6 \, b e^{4} f^{2} g - 4 \, b d e^{3} f g^{2} + b d^{2} e^{2} g^{3}\right )} n\right )} x^{2} - 12 \, {\left (4 \, a e^{4} f^{3} - {\left (4 \, b e^{4} f^{3} - 6 \, b d e^{3} f^{2} g + 4 \, b d^{2} e^{2} f g^{2} - b d^{3} e g^{3}\right )} n\right )} x - 12 \, {\left (b e^{4} g^{3} n x^{4} + 4 \, b e^{4} f g^{2} n x^{3} + 6 \, b e^{4} f^{2} g n x^{2} + 4 \, b e^{4} f^{3} n x + {\left (4 \, b d e^{3} f^{3} - 6 \, b d^{2} e^{2} f^{2} g + 4 \, b d^{3} e f g^{2} - b d^{4} g^{3}\right )} n\right )} \log \left (e x + d\right ) - 12 \, {\left (b e^{4} g^{3} x^{4} + 4 \, b e^{4} f g^{2} x^{3} + 6 \, b e^{4} f^{2} g x^{2} + 4 \, b e^{4} f^{3} x\right )} \log \left (c\right )}{48 \, e^{4}} \] Input:

integrate((g*x+f)^3*(a+b*log(c*(e*x+d)^n)),x, algorithm="fricas")
 

Output:

-1/48*(3*(b*e^4*g^3*n - 4*a*e^4*g^3)*x^4 - 4*(12*a*e^4*f*g^2 - (4*b*e^4*f* 
g^2 - b*d*e^3*g^3)*n)*x^3 - 6*(12*a*e^4*f^2*g - (6*b*e^4*f^2*g - 4*b*d*e^3 
*f*g^2 + b*d^2*e^2*g^3)*n)*x^2 - 12*(4*a*e^4*f^3 - (4*b*e^4*f^3 - 6*b*d*e^ 
3*f^2*g + 4*b*d^2*e^2*f*g^2 - b*d^3*e*g^3)*n)*x - 12*(b*e^4*g^3*n*x^4 + 4* 
b*e^4*f*g^2*n*x^3 + 6*b*e^4*f^2*g*n*x^2 + 4*b*e^4*f^3*n*x + (4*b*d*e^3*f^3 
 - 6*b*d^2*e^2*f^2*g + 4*b*d^3*e*f*g^2 - b*d^4*g^3)*n)*log(e*x + d) - 12*( 
b*e^4*g^3*x^4 + 4*b*e^4*f*g^2*x^3 + 6*b*e^4*f^2*g*x^2 + 4*b*e^4*f^3*x)*log 
(c))/e^4
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 410 vs. \(2 (128) = 256\).

Time = 1.25 (sec) , antiderivative size = 410, normalized size of antiderivative = 2.75 \[ \int (f+g x)^3 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx=\begin {cases} a f^{3} x + \frac {3 a f^{2} g x^{2}}{2} + a f g^{2} x^{3} + \frac {a g^{3} x^{4}}{4} - \frac {b d^{4} g^{3} \log {\left (c \left (d + e x\right )^{n} \right )}}{4 e^{4}} + \frac {b d^{3} f g^{2} \log {\left (c \left (d + e x\right )^{n} \right )}}{e^{3}} + \frac {b d^{3} g^{3} n x}{4 e^{3}} - \frac {3 b d^{2} f^{2} g \log {\left (c \left (d + e x\right )^{n} \right )}}{2 e^{2}} - \frac {b d^{2} f g^{2} n x}{e^{2}} - \frac {b d^{2} g^{3} n x^{2}}{8 e^{2}} + \frac {b d f^{3} \log {\left (c \left (d + e x\right )^{n} \right )}}{e} + \frac {3 b d f^{2} g n x}{2 e} + \frac {b d f g^{2} n x^{2}}{2 e} + \frac {b d g^{3} n x^{3}}{12 e} - b f^{3} n x + b f^{3} x \log {\left (c \left (d + e x\right )^{n} \right )} - \frac {3 b f^{2} g n x^{2}}{4} + \frac {3 b f^{2} g x^{2} \log {\left (c \left (d + e x\right )^{n} \right )}}{2} - \frac {b f g^{2} n x^{3}}{3} + b f g^{2} x^{3} \log {\left (c \left (d + e x\right )^{n} \right )} - \frac {b g^{3} n x^{4}}{16} + \frac {b g^{3} x^{4} \log {\left (c \left (d + e x\right )^{n} \right )}}{4} & \text {for}\: e \neq 0 \\\left (a + b \log {\left (c d^{n} \right )}\right ) \left (f^{3} x + \frac {3 f^{2} g x^{2}}{2} + f g^{2} x^{3} + \frac {g^{3} x^{4}}{4}\right ) & \text {otherwise} \end {cases} \] Input:

integrate((g*x+f)**3*(a+b*ln(c*(e*x+d)**n)),x)
 

Output:

Piecewise((a*f**3*x + 3*a*f**2*g*x**2/2 + a*f*g**2*x**3 + a*g**3*x**4/4 - 
b*d**4*g**3*log(c*(d + e*x)**n)/(4*e**4) + b*d**3*f*g**2*log(c*(d + e*x)** 
n)/e**3 + b*d**3*g**3*n*x/(4*e**3) - 3*b*d**2*f**2*g*log(c*(d + e*x)**n)/( 
2*e**2) - b*d**2*f*g**2*n*x/e**2 - b*d**2*g**3*n*x**2/(8*e**2) + b*d*f**3* 
log(c*(d + e*x)**n)/e + 3*b*d*f**2*g*n*x/(2*e) + b*d*f*g**2*n*x**2/(2*e) + 
 b*d*g**3*n*x**3/(12*e) - b*f**3*n*x + b*f**3*x*log(c*(d + e*x)**n) - 3*b* 
f**2*g*n*x**2/4 + 3*b*f**2*g*x**2*log(c*(d + e*x)**n)/2 - b*f*g**2*n*x**3/ 
3 + b*f*g**2*x**3*log(c*(d + e*x)**n) - b*g**3*n*x**4/16 + b*g**3*x**4*log 
(c*(d + e*x)**n)/4, Ne(e, 0)), ((a + b*log(c*d**n))*(f**3*x + 3*f**2*g*x** 
2/2 + f*g**2*x**3 + g**3*x**4/4), True))
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 284 vs. \(2 (137) = 274\).

Time = 0.04 (sec) , antiderivative size = 284, normalized size of antiderivative = 1.91 \[ \int (f+g x)^3 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {1}{4} \, b g^{3} x^{4} \log \left ({\left (e x + d\right )}^{n} c\right ) + \frac {1}{4} \, a g^{3} x^{4} + b f g^{2} x^{3} \log \left ({\left (e x + d\right )}^{n} c\right ) + a f g^{2} x^{3} - b e f^{3} n {\left (\frac {x}{e} - \frac {d \log \left (e x + d\right )}{e^{2}}\right )} - \frac {1}{48} \, b e g^{3} n {\left (\frac {12 \, d^{4} \log \left (e x + d\right )}{e^{5}} + \frac {3 \, e^{3} x^{4} - 4 \, d e^{2} x^{3} + 6 \, d^{2} e x^{2} - 12 \, d^{3} x}{e^{4}}\right )} + \frac {1}{6} \, b e f g^{2} n {\left (\frac {6 \, d^{3} \log \left (e x + d\right )}{e^{4}} - \frac {2 \, e^{2} x^{3} - 3 \, d e x^{2} + 6 \, d^{2} x}{e^{3}}\right )} - \frac {3}{4} \, b e f^{2} g n {\left (\frac {2 \, d^{2} \log \left (e x + d\right )}{e^{3}} + \frac {e x^{2} - 2 \, d x}{e^{2}}\right )} + \frac {3}{2} \, b f^{2} g x^{2} \log \left ({\left (e x + d\right )}^{n} c\right ) + \frac {3}{2} \, a f^{2} g x^{2} + b f^{3} x \log \left ({\left (e x + d\right )}^{n} c\right ) + a f^{3} x \] Input:

integrate((g*x+f)^3*(a+b*log(c*(e*x+d)^n)),x, algorithm="maxima")
 

Output:

1/4*b*g^3*x^4*log((e*x + d)^n*c) + 1/4*a*g^3*x^4 + b*f*g^2*x^3*log((e*x + 
d)^n*c) + a*f*g^2*x^3 - b*e*f^3*n*(x/e - d*log(e*x + d)/e^2) - 1/48*b*e*g^ 
3*n*(12*d^4*log(e*x + d)/e^5 + (3*e^3*x^4 - 4*d*e^2*x^3 + 6*d^2*e*x^2 - 12 
*d^3*x)/e^4) + 1/6*b*e*f*g^2*n*(6*d^3*log(e*x + d)/e^4 - (2*e^2*x^3 - 3*d* 
e*x^2 + 6*d^2*x)/e^3) - 3/4*b*e*f^2*g*n*(2*d^2*log(e*x + d)/e^3 + (e*x^2 - 
 2*d*x)/e^2) + 3/2*b*f^2*g*x^2*log((e*x + d)^n*c) + 3/2*a*f^2*g*x^2 + b*f^ 
3*x*log((e*x + d)^n*c) + a*f^3*x
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 770 vs. \(2 (137) = 274\).

Time = 0.15 (sec) , antiderivative size = 770, normalized size of antiderivative = 5.17 \[ \int (f+g x)^3 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx =\text {Too large to display} \] Input:

integrate((g*x+f)^3*(a+b*log(c*(e*x+d)^n)),x, algorithm="giac")
 

Output:

(e*x + d)*b*f^3*n*log(e*x + d)/e + 3/2*(e*x + d)^2*b*f^2*g*n*log(e*x + d)/ 
e^2 - 3*(e*x + d)*b*d*f^2*g*n*log(e*x + d)/e^2 + (e*x + d)^3*b*f*g^2*n*log 
(e*x + d)/e^3 - 3*(e*x + d)^2*b*d*f*g^2*n*log(e*x + d)/e^3 + 3*(e*x + d)*b 
*d^2*f*g^2*n*log(e*x + d)/e^3 + 1/4*(e*x + d)^4*b*g^3*n*log(e*x + d)/e^4 - 
 (e*x + d)^3*b*d*g^3*n*log(e*x + d)/e^4 + 3/2*(e*x + d)^2*b*d^2*g^3*n*log( 
e*x + d)/e^4 - (e*x + d)*b*d^3*g^3*n*log(e*x + d)/e^4 - (e*x + d)*b*f^3*n/ 
e - 3/4*(e*x + d)^2*b*f^2*g*n/e^2 + 3*(e*x + d)*b*d*f^2*g*n/e^2 - 1/3*(e*x 
 + d)^3*b*f*g^2*n/e^3 + 3/2*(e*x + d)^2*b*d*f*g^2*n/e^3 - 3*(e*x + d)*b*d^ 
2*f*g^2*n/e^3 - 1/16*(e*x + d)^4*b*g^3*n/e^4 + 1/3*(e*x + d)^3*b*d*g^3*n/e 
^4 - 3/4*(e*x + d)^2*b*d^2*g^3*n/e^4 + (e*x + d)*b*d^3*g^3*n/e^4 + (e*x + 
d)*b*f^3*log(c)/e + 3/2*(e*x + d)^2*b*f^2*g*log(c)/e^2 - 3*(e*x + d)*b*d*f 
^2*g*log(c)/e^2 + (e*x + d)^3*b*f*g^2*log(c)/e^3 - 3*(e*x + d)^2*b*d*f*g^2 
*log(c)/e^3 + 3*(e*x + d)*b*d^2*f*g^2*log(c)/e^3 + 1/4*(e*x + d)^4*b*g^3*l 
og(c)/e^4 - (e*x + d)^3*b*d*g^3*log(c)/e^4 + 3/2*(e*x + d)^2*b*d^2*g^3*log 
(c)/e^4 - (e*x + d)*b*d^3*g^3*log(c)/e^4 + (e*x + d)*a*f^3/e + 3/2*(e*x + 
d)^2*a*f^2*g/e^2 - 3*(e*x + d)*a*d*f^2*g/e^2 + (e*x + d)^3*a*f*g^2/e^3 - 3 
*(e*x + d)^2*a*d*f*g^2/e^3 + 3*(e*x + d)*a*d^2*f*g^2/e^3 + 1/4*(e*x + d)^4 
*a*g^3/e^4 - (e*x + d)^3*a*d*g^3/e^4 + 3/2*(e*x + d)^2*a*d^2*g^3/e^4 - (e* 
x + d)*a*d^3*g^3/e^4
 

Mupad [B] (verification not implemented)

Time = 25.71 (sec) , antiderivative size = 352, normalized size of antiderivative = 2.36 \[ \int (f+g x)^3 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx=x\,\left (\frac {4\,a\,e\,f^3+12\,a\,d\,f^2\,g-4\,b\,e\,f^3\,n}{4\,e}+\frac {d\,\left (\frac {d\,\left (\frac {g^2\,\left (a\,d\,g+3\,a\,e\,f-b\,e\,f\,n\right )}{e}-\frac {d\,g^3\,\left (4\,a-b\,n\right )}{4\,e}\right )}{e}-\frac {3\,f\,g\,\left (2\,a\,d\,g+2\,a\,e\,f-b\,e\,f\,n\right )}{2\,e}\right )}{e}\right )+x^3\,\left (\frac {g^2\,\left (a\,d\,g+3\,a\,e\,f-b\,e\,f\,n\right )}{3\,e}-\frac {d\,g^3\,\left (4\,a-b\,n\right )}{12\,e}\right )+\ln \left (c\,{\left (d+e\,x\right )}^n\right )\,\left (b\,f^3\,x+\frac {3\,b\,f^2\,g\,x^2}{2}+b\,f\,g^2\,x^3+\frac {b\,g^3\,x^4}{4}\right )-x^2\,\left (\frac {d\,\left (\frac {g^2\,\left (a\,d\,g+3\,a\,e\,f-b\,e\,f\,n\right )}{e}-\frac {d\,g^3\,\left (4\,a-b\,n\right )}{4\,e}\right )}{2\,e}-\frac {3\,f\,g\,\left (2\,a\,d\,g+2\,a\,e\,f-b\,e\,f\,n\right )}{4\,e}\right )-\frac {\ln \left (d+e\,x\right )\,\left (b\,n\,d^4\,g^3-4\,b\,n\,d^3\,e\,f\,g^2+6\,b\,n\,d^2\,e^2\,f^2\,g-4\,b\,n\,d\,e^3\,f^3\right )}{4\,e^4}+\frac {g^3\,x^4\,\left (4\,a-b\,n\right )}{16} \] Input:

int((f + g*x)^3*(a + b*log(c*(d + e*x)^n)),x)
 

Output:

x*((4*a*e*f^3 + 12*a*d*f^2*g - 4*b*e*f^3*n)/(4*e) + (d*((d*((g^2*(a*d*g + 
3*a*e*f - b*e*f*n))/e - (d*g^3*(4*a - b*n))/(4*e)))/e - (3*f*g*(2*a*d*g + 
2*a*e*f - b*e*f*n))/(2*e)))/e) + x^3*((g^2*(a*d*g + 3*a*e*f - b*e*f*n))/(3 
*e) - (d*g^3*(4*a - b*n))/(12*e)) + log(c*(d + e*x)^n)*((b*g^3*x^4)/4 + b* 
f^3*x + (3*b*f^2*g*x^2)/2 + b*f*g^2*x^3) - x^2*((d*((g^2*(a*d*g + 3*a*e*f 
- b*e*f*n))/e - (d*g^3*(4*a - b*n))/(4*e)))/(2*e) - (3*f*g*(2*a*d*g + 2*a* 
e*f - b*e*f*n))/(4*e)) - (log(d + e*x)*(b*d^4*g^3*n - 4*b*d*e^3*f^3*n - 4* 
b*d^3*e*f*g^2*n + 6*b*d^2*e^2*f^2*g*n))/(4*e^4) + (g^3*x^4*(4*a - b*n))/16
 

Reduce [B] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 362, normalized size of antiderivative = 2.43 \[ \int (f+g x)^3 \left (a+b \log \left (c (d+e x)^n\right )\right ) \, dx=\frac {-12 \,\mathrm {log}\left (\left (e x +d \right )^{n} c \right ) b \,d^{4} g^{3}+48 \,\mathrm {log}\left (\left (e x +d \right )^{n} c \right ) b \,d^{3} e f \,g^{2}-72 \,\mathrm {log}\left (\left (e x +d \right )^{n} c \right ) b \,d^{2} e^{2} f^{2} g +48 \,\mathrm {log}\left (\left (e x +d \right )^{n} c \right ) b d \,e^{3} f^{3}+48 \,\mathrm {log}\left (\left (e x +d \right )^{n} c \right ) b \,e^{4} f^{3} x +72 \,\mathrm {log}\left (\left (e x +d \right )^{n} c \right ) b \,e^{4} f^{2} g \,x^{2}+48 \,\mathrm {log}\left (\left (e x +d \right )^{n} c \right ) b \,e^{4} f \,g^{2} x^{3}+12 \,\mathrm {log}\left (\left (e x +d \right )^{n} c \right ) b \,e^{4} g^{3} x^{4}+48 a \,e^{4} f^{3} x +72 a \,e^{4} f^{2} g \,x^{2}+48 a \,e^{4} f \,g^{2} x^{3}+12 a \,e^{4} g^{3} x^{4}+12 b \,d^{3} e \,g^{3} n x -48 b \,d^{2} e^{2} f \,g^{2} n x -6 b \,d^{2} e^{2} g^{3} n \,x^{2}+72 b d \,e^{3} f^{2} g n x +24 b d \,e^{3} f \,g^{2} n \,x^{2}+4 b d \,e^{3} g^{3} n \,x^{3}-48 b \,e^{4} f^{3} n x -36 b \,e^{4} f^{2} g n \,x^{2}-16 b \,e^{4} f \,g^{2} n \,x^{3}-3 b \,e^{4} g^{3} n \,x^{4}}{48 e^{4}} \] Input:

int((g*x+f)^3*(a+b*log(c*(e*x+d)^n)),x)
 

Output:

( - 12*log((d + e*x)**n*c)*b*d**4*g**3 + 48*log((d + e*x)**n*c)*b*d**3*e*f 
*g**2 - 72*log((d + e*x)**n*c)*b*d**2*e**2*f**2*g + 48*log((d + e*x)**n*c) 
*b*d*e**3*f**3 + 48*log((d + e*x)**n*c)*b*e**4*f**3*x + 72*log((d + e*x)** 
n*c)*b*e**4*f**2*g*x**2 + 48*log((d + e*x)**n*c)*b*e**4*f*g**2*x**3 + 12*l 
og((d + e*x)**n*c)*b*e**4*g**3*x**4 + 48*a*e**4*f**3*x + 72*a*e**4*f**2*g* 
x**2 + 48*a*e**4*f*g**2*x**3 + 12*a*e**4*g**3*x**4 + 12*b*d**3*e*g**3*n*x 
- 48*b*d**2*e**2*f*g**2*n*x - 6*b*d**2*e**2*g**3*n*x**2 + 72*b*d*e**3*f**2 
*g*n*x + 24*b*d*e**3*f*g**2*n*x**2 + 4*b*d*e**3*g**3*n*x**3 - 48*b*e**4*f* 
*3*n*x - 36*b*e**4*f**2*g*n*x**2 - 16*b*e**4*f*g**2*n*x**3 - 3*b*e**4*g**3 
*n*x**4)/(48*e**4)