\(\int \frac {a+b \log (c (d (e+f x)^p)^q)}{(g+h x)^4} \, dx\) [446]

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 = 26, antiderivative size = 149 \[ \int \frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{(g+h x)^4} \, dx=\frac {b f p q}{6 h (f g-e h) (g+h x)^2}+\frac {b f^2 p q}{3 h (f g-e h)^2 (g+h x)}+\frac {b f^3 p q \log (e+f x)}{3 h (f g-e h)^3}-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{3 h (g+h x)^3}-\frac {b f^3 p q \log (g+h x)}{3 h (f g-e h)^3} \] Output:

1/6*b*f*p*q/h/(-e*h+f*g)/(h*x+g)^2+1/3*b*f^2*p*q/h/(-e*h+f*g)^2/(h*x+g)+1/ 
3*b*f^3*p*q*ln(f*x+e)/h/(-e*h+f*g)^3-1/3*(a+b*ln(c*(d*(f*x+e)^p)^q))/h/(h* 
x+g)^3-1/3*b*f^3*p*q*ln(h*x+g)/h/(-e*h+f*g)^3
 

Mathematica [A] (verified)

Time = 0.21 (sec) , antiderivative size = 115, normalized size of antiderivative = 0.77 \[ \int \frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{(g+h x)^4} \, dx=\frac {-2 a-2 b \log \left (c \left (d (e+f x)^p\right )^q\right )+\frac {b f p q (g+h x) \left ((f g-e h) (3 f g-e h+2 f h x)+2 f^2 (g+h x)^2 \log (e+f x)-2 f^2 (g+h x)^2 \log (g+h x)\right )}{(f g-e h)^3}}{6 h (g+h x)^3} \] Input:

Integrate[(a + b*Log[c*(d*(e + f*x)^p)^q])/(g + h*x)^4,x]
 

Output:

(-2*a - 2*b*Log[c*(d*(e + f*x)^p)^q] + (b*f*p*q*(g + h*x)*((f*g - e*h)*(3* 
f*g - e*h + 2*f*h*x) + 2*f^2*(g + h*x)^2*Log[e + f*x] - 2*f^2*(g + h*x)^2* 
Log[g + h*x]))/(f*g - e*h)^3)/(6*h*(g + h*x)^3)
 

Rubi [A] (verified)

Time = 0.72 (sec) , antiderivative size = 126, normalized size of antiderivative = 0.85, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {2895, 2842, 54, 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+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{(g+h x)^4} \, dx\)

\(\Big \downarrow \) 2895

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

\(\Big \downarrow \) 2842

\(\displaystyle \frac {b f p q \int \frac {1}{(e+f x) (g+h x)^3}dx}{3 h}-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{3 h (g+h x)^3}\)

\(\Big \downarrow \) 54

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {b f p q \left (\frac {f^2 \log (e+f x)}{(f g-e h)^3}-\frac {f^2 \log (g+h x)}{(f g-e h)^3}+\frac {f}{(g+h x) (f g-e h)^2}+\frac {1}{2 (g+h x)^2 (f g-e h)}\right )}{3 h}-\frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{3 h (g+h x)^3}\)

Input:

Int[(a + b*Log[c*(d*(e + f*x)^p)^q])/(g + h*x)^4,x]
 

Output:

-1/3*(a + b*Log[c*(d*(e + f*x)^p)^q])/(h*(g + h*x)^3) + (b*f*p*q*(1/(2*(f* 
g - e*h)*(g + h*x)^2) + f/((f*g - e*h)^2*(g + h*x)) + (f^2*Log[e + f*x])/( 
f*g - e*h)^3 - (f^2*Log[g + h*x])/(f*g - e*h)^3))/(3*h)
 

Defintions of rubi rules used

rule 54
Int[((a_) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[E 
xpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && 
 ILtQ[m, 0] && IntegerQ[n] &&  !(IGtQ[n, 0] && LtQ[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]
 

rule 2895
Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_. 
)*(u_.), x_Symbol] :> Subst[Int[u*(a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], 
 c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e, f, m, 
 n, p}, x] &&  !IntegerQ[n] &&  !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[ 
IntHide[u*(a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x]]
 
Maple [B] (verified)

Leaf count of result is larger than twice the leaf count of optimal. \(486\) vs. \(2(139)=278\).

Time = 15.26 (sec) , antiderivative size = 487, normalized size of antiderivative = 3.27

method result size
parallelrisch \(-\frac {2 a \,e^{3} f \,h^{5}-2 a \,f^{4} g^{3} h^{2}+2 x^{2} b \,f^{4} g \,h^{4} p q +x b \,e^{2} f^{2} h^{5} p q +5 x b \,f^{4} g^{2} h^{3} p q +2 \ln \left (f x +e \right ) x^{3} b \,f^{4} h^{5} p q -2 \ln \left (h x +g \right ) x^{3} b \,f^{4} h^{5} p q -6 \ln \left (h x +g \right ) x^{2} b \,f^{4} g \,h^{4} p q +6 \ln \left (f x +e \right ) x b \,f^{4} g^{2} h^{3} p q -6 \ln \left (h x +g \right ) x b \,f^{4} g^{2} h^{3} p q -6 x b e \,f^{3} g \,h^{4} p q +6 \ln \left (f x +e \right ) x^{2} b \,f^{4} g \,h^{4} p q +b \,e^{2} f^{2} g \,h^{4} p q -4 b e \,f^{3} g^{2} h^{3} p q +2 \ln \left (f x +e \right ) b \,f^{4} g^{3} h^{2} p q -2 \ln \left (h x +g \right ) b \,f^{4} g^{3} h^{2} p q -2 x^{2} b e \,f^{3} h^{5} p q +2 \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right ) b \,e^{3} f \,h^{5}-2 \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right ) b \,f^{4} g^{3} h^{2}-6 \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right ) b \,e^{2} f^{2} g \,h^{4}+6 \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right ) b e \,f^{3} g^{2} h^{3}+3 b \,f^{4} g^{3} h^{2} p q -6 a \,e^{2} f^{2} g \,h^{4}+6 a e \,f^{3} g^{2} h^{3}}{6 \left (e^{3} h^{3}-3 e^{2} f g \,h^{2}+3 e \,f^{2} g^{2} h -g^{3} f^{3}\right ) \left (h x +g \right )^{3} f \,h^{3}}\) \(487\)

Input:

int((a+b*ln(c*(d*(f*x+e)^p)^q))/(h*x+g)^4,x,method=_RETURNVERBOSE)
 

Output:

-1/6*(2*a*e^3*f*h^5-2*a*f^4*g^3*h^2+2*x^2*b*f^4*g*h^4*p*q+x*b*e^2*f^2*h^5* 
p*q+5*x*b*f^4*g^2*h^3*p*q+2*ln(f*x+e)*x^3*b*f^4*h^5*p*q-2*ln(h*x+g)*x^3*b* 
f^4*h^5*p*q-6*ln(h*x+g)*x^2*b*f^4*g*h^4*p*q+6*ln(f*x+e)*x*b*f^4*g^2*h^3*p* 
q-6*ln(h*x+g)*x*b*f^4*g^2*h^3*p*q-6*x*b*e*f^3*g*h^4*p*q+6*ln(f*x+e)*x^2*b* 
f^4*g*h^4*p*q+b*e^2*f^2*g*h^4*p*q-4*b*e*f^3*g^2*h^3*p*q+2*ln(f*x+e)*b*f^4* 
g^3*h^2*p*q-2*ln(h*x+g)*b*f^4*g^3*h^2*p*q-2*x^2*b*e*f^3*h^5*p*q+2*ln(c*(d* 
(f*x+e)^p)^q)*b*e^3*f*h^5-2*ln(c*(d*(f*x+e)^p)^q)*b*f^4*g^3*h^2-6*ln(c*(d* 
(f*x+e)^p)^q)*b*e^2*f^2*g*h^4+6*ln(c*(d*(f*x+e)^p)^q)*b*e*f^3*g^2*h^3+3*b* 
f^4*g^3*h^2*p*q-6*a*e^2*f^2*g*h^4+6*a*e*f^3*g^2*h^3)/(e^3*h^3-3*e^2*f*g*h^ 
2+3*e*f^2*g^2*h-f^3*g^3)/(h*x+g)^3/f/h^3
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 563 vs. \(2 (139) = 278\).

Time = 0.12 (sec) , antiderivative size = 563, normalized size of antiderivative = 3.78 \[ \int \frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{(g+h x)^4} \, dx=-\frac {2 \, a f^{3} g^{3} - 6 \, a e f^{2} g^{2} h + 6 \, a e^{2} f g h^{2} - 2 \, a e^{3} h^{3} - 2 \, {\left (b f^{3} g h^{2} - b e f^{2} h^{3}\right )} p q x^{2} - {\left (5 \, b f^{3} g^{2} h - 6 \, b e f^{2} g h^{2} + b e^{2} f h^{3}\right )} p q x - {\left (3 \, b f^{3} g^{3} - 4 \, b e f^{2} g^{2} h + b e^{2} f g h^{2}\right )} p q + 2 \, {\left (b f^{3} g^{3} - 3 \, b e f^{2} g^{2} h + 3 \, b e^{2} f g h^{2} - b e^{3} h^{3}\right )} q \log \left (d\right ) - 2 \, {\left (b f^{3} h^{3} p q x^{3} + 3 \, b f^{3} g h^{2} p q x^{2} + 3 \, b f^{3} g^{2} h p q x + {\left (3 \, b e f^{2} g^{2} h - 3 \, b e^{2} f g h^{2} + b e^{3} h^{3}\right )} p q\right )} \log \left (f x + e\right ) + 2 \, {\left (b f^{3} h^{3} p q x^{3} + 3 \, b f^{3} g h^{2} p q x^{2} + 3 \, b f^{3} g^{2} h p q x + b f^{3} g^{3} p q\right )} \log \left (h x + g\right ) + 2 \, {\left (b f^{3} g^{3} - 3 \, b e f^{2} g^{2} h + 3 \, b e^{2} f g h^{2} - b e^{3} h^{3}\right )} \log \left (c\right )}{6 \, {\left (f^{3} g^{6} h - 3 \, e f^{2} g^{5} h^{2} + 3 \, e^{2} f g^{4} h^{3} - e^{3} g^{3} h^{4} + {\left (f^{3} g^{3} h^{4} - 3 \, e f^{2} g^{2} h^{5} + 3 \, e^{2} f g h^{6} - e^{3} h^{7}\right )} x^{3} + 3 \, {\left (f^{3} g^{4} h^{3} - 3 \, e f^{2} g^{3} h^{4} + 3 \, e^{2} f g^{2} h^{5} - e^{3} g h^{6}\right )} x^{2} + 3 \, {\left (f^{3} g^{5} h^{2} - 3 \, e f^{2} g^{4} h^{3} + 3 \, e^{2} f g^{3} h^{4} - e^{3} g^{2} h^{5}\right )} x\right )}} \] Input:

integrate((a+b*log(c*(d*(f*x+e)^p)^q))/(h*x+g)^4,x, algorithm="fricas")
 

Output:

-1/6*(2*a*f^3*g^3 - 6*a*e*f^2*g^2*h + 6*a*e^2*f*g*h^2 - 2*a*e^3*h^3 - 2*(b 
*f^3*g*h^2 - b*e*f^2*h^3)*p*q*x^2 - (5*b*f^3*g^2*h - 6*b*e*f^2*g*h^2 + b*e 
^2*f*h^3)*p*q*x - (3*b*f^3*g^3 - 4*b*e*f^2*g^2*h + b*e^2*f*g*h^2)*p*q + 2* 
(b*f^3*g^3 - 3*b*e*f^2*g^2*h + 3*b*e^2*f*g*h^2 - b*e^3*h^3)*q*log(d) - 2*( 
b*f^3*h^3*p*q*x^3 + 3*b*f^3*g*h^2*p*q*x^2 + 3*b*f^3*g^2*h*p*q*x + (3*b*e*f 
^2*g^2*h - 3*b*e^2*f*g*h^2 + b*e^3*h^3)*p*q)*log(f*x + e) + 2*(b*f^3*h^3*p 
*q*x^3 + 3*b*f^3*g*h^2*p*q*x^2 + 3*b*f^3*g^2*h*p*q*x + b*f^3*g^3*p*q)*log( 
h*x + g) + 2*(b*f^3*g^3 - 3*b*e*f^2*g^2*h + 3*b*e^2*f*g*h^2 - b*e^3*h^3)*l 
og(c))/(f^3*g^6*h - 3*e*f^2*g^5*h^2 + 3*e^2*f*g^4*h^3 - e^3*g^3*h^4 + (f^3 
*g^3*h^4 - 3*e*f^2*g^2*h^5 + 3*e^2*f*g*h^6 - e^3*h^7)*x^3 + 3*(f^3*g^4*h^3 
 - 3*e*f^2*g^3*h^4 + 3*e^2*f*g^2*h^5 - e^3*g*h^6)*x^2 + 3*(f^3*g^5*h^2 - 3 
*e*f^2*g^4*h^3 + 3*e^2*f*g^3*h^4 - e^3*g^2*h^5)*x)
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 5673 vs. \(2 (131) = 262\).

Time = 58.97 (sec) , antiderivative size = 5673, normalized size of antiderivative = 38.07 \[ \int \frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{(g+h x)^4} \, dx=\text {Too large to display} \] Input:

integrate((a+b*ln(c*(d*(f*x+e)**p)**q))/(h*x+g)**4,x)
 

Output:

Piecewise(((a*x + b*e*log(c*(d*(e + f*x)**p)**q)/f - b*p*q*x + b*x*log(c*( 
d*(e + f*x)**p)**q))/g**4, Eq(h, 0)), (-3*a/(9*g**3*h + 27*g**2*h**2*x + 2 
7*g*h**3*x**2 + 9*h**4*x**3) - b*p*q/(9*g**3*h + 27*g**2*h**2*x + 27*g*h** 
3*x**2 + 9*h**4*x**3) - 3*b*log(c*(d*(f*g/h + f*x)**p)**q)/(9*g**3*h + 27* 
g**2*h**2*x + 27*g*h**3*x**2 + 9*h**4*x**3), Eq(e, f*g/h)), (-2*a*e**3*h** 
3/(6*e**3*g**3*h**4 + 18*e**3*g**2*h**5*x + 18*e**3*g*h**6*x**2 + 6*e**3*h 
**7*x**3 - 18*e**2*f*g**4*h**3 - 54*e**2*f*g**3*h**4*x - 54*e**2*f*g**2*h* 
*5*x**2 - 18*e**2*f*g*h**6*x**3 + 18*e*f**2*g**5*h**2 + 54*e*f**2*g**4*h** 
3*x + 54*e*f**2*g**3*h**4*x**2 + 18*e*f**2*g**2*h**5*x**3 - 6*f**3*g**6*h 
- 18*f**3*g**5*h**2*x - 18*f**3*g**4*h**3*x**2 - 6*f**3*g**3*h**4*x**3) + 
6*a*e**2*f*g*h**2/(6*e**3*g**3*h**4 + 18*e**3*g**2*h**5*x + 18*e**3*g*h**6 
*x**2 + 6*e**3*h**7*x**3 - 18*e**2*f*g**4*h**3 - 54*e**2*f*g**3*h**4*x - 5 
4*e**2*f*g**2*h**5*x**2 - 18*e**2*f*g*h**6*x**3 + 18*e*f**2*g**5*h**2 + 54 
*e*f**2*g**4*h**3*x + 54*e*f**2*g**3*h**4*x**2 + 18*e*f**2*g**2*h**5*x**3 
- 6*f**3*g**6*h - 18*f**3*g**5*h**2*x - 18*f**3*g**4*h**3*x**2 - 6*f**3*g* 
*3*h**4*x**3) - 6*a*e*f**2*g**2*h/(6*e**3*g**3*h**4 + 18*e**3*g**2*h**5*x 
+ 18*e**3*g*h**6*x**2 + 6*e**3*h**7*x**3 - 18*e**2*f*g**4*h**3 - 54*e**2*f 
*g**3*h**4*x - 54*e**2*f*g**2*h**5*x**2 - 18*e**2*f*g*h**6*x**3 + 18*e*f** 
2*g**5*h**2 + 54*e*f**2*g**4*h**3*x + 54*e*f**2*g**3*h**4*x**2 + 18*e*f**2 
*g**2*h**5*x**3 - 6*f**3*g**6*h - 18*f**3*g**5*h**2*x - 18*f**3*g**4*h*...
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 306 vs. \(2 (139) = 278\).

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

integrate((a+b*log(c*(d*(f*x+e)^p)^q))/(h*x+g)^4,x, algorithm="maxima")
 

Output:

1/6*(2*f^2*log(f*x + e)/(f^3*g^3*h - 3*e*f^2*g^2*h^2 + 3*e^2*f*g*h^3 - e^3 
*h^4) - 2*f^2*log(h*x + g)/(f^3*g^3*h - 3*e*f^2*g^2*h^2 + 3*e^2*f*g*h^3 - 
e^3*h^4) + (2*f*h*x + 3*f*g - e*h)/(f^2*g^4*h - 2*e*f*g^3*h^2 + e^2*g^2*h^ 
3 + (f^2*g^2*h^3 - 2*e*f*g*h^4 + e^2*h^5)*x^2 + 2*(f^2*g^3*h^2 - 2*e*f*g^2 
*h^3 + e^2*g*h^4)*x))*b*f*p*q - 1/3*b*log(((f*x + e)^p*d)^q*c)/(h^4*x^3 + 
3*g*h^3*x^2 + 3*g^2*h^2*x + g^3*h) - 1/3*a/(h^4*x^3 + 3*g*h^3*x^2 + 3*g^2* 
h^2*x + g^3*h)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 443 vs. \(2 (139) = 278\).

Time = 0.12 (sec) , antiderivative size = 443, normalized size of antiderivative = 2.97 \[ \int \frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{(g+h x)^4} \, dx=\frac {b f^{3} p q \log \left (f x + e\right )}{3 \, {\left (f^{3} g^{3} h - 3 \, e f^{2} g^{2} h^{2} + 3 \, e^{2} f g h^{3} - e^{3} h^{4}\right )}} - \frac {b f^{3} p q \log \left (h x + g\right )}{3 \, {\left (f^{3} g^{3} h - 3 \, e f^{2} g^{2} h^{2} + 3 \, e^{2} f g h^{3} - e^{3} h^{4}\right )}} - \frac {b p q \log \left (f x + e\right )}{3 \, {\left (h^{4} x^{3} + 3 \, g h^{3} x^{2} + 3 \, g^{2} h^{2} x + g^{3} h\right )}} + \frac {2 \, b f^{2} h^{2} p q x^{2} + 5 \, b f^{2} g h p q x - b e f h^{2} p q x + 3 \, b f^{2} g^{2} p q - b e f g h p q - 2 \, b f^{2} g^{2} q \log \left (d\right ) + 4 \, b e f g h q \log \left (d\right ) - 2 \, b e^{2} h^{2} q \log \left (d\right ) - 2 \, b f^{2} g^{2} \log \left (c\right ) + 4 \, b e f g h \log \left (c\right ) - 2 \, b e^{2} h^{2} \log \left (c\right ) - 2 \, a f^{2} g^{2} + 4 \, a e f g h - 2 \, a e^{2} h^{2}}{6 \, {\left (f^{2} g^{2} h^{4} x^{3} - 2 \, e f g h^{5} x^{3} + e^{2} h^{6} x^{3} + 3 \, f^{2} g^{3} h^{3} x^{2} - 6 \, e f g^{2} h^{4} x^{2} + 3 \, e^{2} g h^{5} x^{2} + 3 \, f^{2} g^{4} h^{2} x - 6 \, e f g^{3} h^{3} x + 3 \, e^{2} g^{2} h^{4} x + f^{2} g^{5} h - 2 \, e f g^{4} h^{2} + e^{2} g^{3} h^{3}\right )}} \] Input:

integrate((a+b*log(c*(d*(f*x+e)^p)^q))/(h*x+g)^4,x, algorithm="giac")
 

Output:

1/3*b*f^3*p*q*log(f*x + e)/(f^3*g^3*h - 3*e*f^2*g^2*h^2 + 3*e^2*f*g*h^3 - 
e^3*h^4) - 1/3*b*f^3*p*q*log(h*x + g)/(f^3*g^3*h - 3*e*f^2*g^2*h^2 + 3*e^2 
*f*g*h^3 - e^3*h^4) - 1/3*b*p*q*log(f*x + e)/(h^4*x^3 + 3*g*h^3*x^2 + 3*g^ 
2*h^2*x + g^3*h) + 1/6*(2*b*f^2*h^2*p*q*x^2 + 5*b*f^2*g*h*p*q*x - b*e*f*h^ 
2*p*q*x + 3*b*f^2*g^2*p*q - b*e*f*g*h*p*q - 2*b*f^2*g^2*q*log(d) + 4*b*e*f 
*g*h*q*log(d) - 2*b*e^2*h^2*q*log(d) - 2*b*f^2*g^2*log(c) + 4*b*e*f*g*h*lo 
g(c) - 2*b*e^2*h^2*log(c) - 2*a*f^2*g^2 + 4*a*e*f*g*h - 2*a*e^2*h^2)/(f^2* 
g^2*h^4*x^3 - 2*e*f*g*h^5*x^3 + e^2*h^6*x^3 + 3*f^2*g^3*h^3*x^2 - 6*e*f*g^ 
2*h^4*x^2 + 3*e^2*g*h^5*x^2 + 3*f^2*g^4*h^2*x - 6*e*f*g^3*h^3*x + 3*e^2*g^ 
2*h^4*x + f^2*g^5*h - 2*e*f*g^4*h^2 + e^2*g^3*h^3)
 

Mupad [B] (verification not implemented)

Time = 16.54 (sec) , antiderivative size = 293, normalized size of antiderivative = 1.97 \[ \int \frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{(g+h x)^4} \, dx=\frac {2\,a\,e\,f\,g}{3\,{\left (g+h\,x\right )}^3\,{\left (e\,h-f\,g\right )}^2}-\frac {a\,e^2\,h}{3\,{\left (g+h\,x\right )}^3\,{\left (e\,h-f\,g\right )}^2}-\frac {b\,\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )}{3\,h\,{\left (g+h\,x\right )}^3}-\frac {a\,f^2\,g^2}{3\,h\,{\left (g+h\,x\right )}^3\,{\left (e\,h-f\,g\right )}^2}+\frac {b\,f^2\,h\,p\,q\,x^2}{3\,{\left (g+h\,x\right )}^3\,{\left (e\,h-f\,g\right )}^2}-\frac {b\,e\,f\,g\,p\,q}{6\,{\left (g+h\,x\right )}^3\,{\left (e\,h-f\,g\right )}^2}+\frac {b\,f^2\,g^2\,p\,q}{2\,h\,{\left (g+h\,x\right )}^3\,{\left (e\,h-f\,g\right )}^2}+\frac {5\,b\,f^2\,g\,p\,q\,x}{6\,{\left (g+h\,x\right )}^3\,{\left (e\,h-f\,g\right )}^2}-\frac {b\,e\,f\,h\,p\,q\,x}{6\,{\left (g+h\,x\right )}^3\,{\left (e\,h-f\,g\right )}^2}+\frac {b\,f^3\,p\,q\,\mathrm {atan}\left (\frac {e\,h\,1{}\mathrm {i}+f\,g\,1{}\mathrm {i}+f\,h\,x\,2{}\mathrm {i}}{e\,h-f\,g}\right )\,2{}\mathrm {i}}{3\,h\,{\left (e\,h-f\,g\right )}^3} \] Input:

int((a + b*log(c*(d*(e + f*x)^p)^q))/(g + h*x)^4,x)
 

Output:

(2*a*e*f*g)/(3*(g + h*x)^3*(e*h - f*g)^2) - (a*e^2*h)/(3*(g + h*x)^3*(e*h 
- f*g)^2) - (b*log(c*(d*(e + f*x)^p)^q))/(3*h*(g + h*x)^3) - (a*f^2*g^2)/( 
3*h*(g + h*x)^3*(e*h - f*g)^2) + (b*f^3*p*q*atan((e*h*1i + f*g*1i + f*h*x* 
2i)/(e*h - f*g))*2i)/(3*h*(e*h - f*g)^3) + (b*f^2*h*p*q*x^2)/(3*(g + h*x)^ 
3*(e*h - f*g)^2) - (b*e*f*g*p*q)/(6*(g + h*x)^3*(e*h - f*g)^2) + (b*f^2*g^ 
2*p*q)/(2*h*(g + h*x)^3*(e*h - f*g)^2) + (5*b*f^2*g*p*q*x)/(6*(g + h*x)^3* 
(e*h - f*g)^2) - (b*e*f*h*p*q*x)/(6*(g + h*x)^3*(e*h - f*g)^2)
 

Reduce [B] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 1063, normalized size of antiderivative = 7.13 \[ \int \frac {a+b \log \left (c \left (d (e+f x)^p\right )^q\right )}{(g+h x)^4} \, dx =\text {Too large to display} \] Input:

int((a+b*log(c*(d*(f*x+e)^p)^q))/(h*x+g)^4,x)
 

Output:

( - 6*log(e + f*x)*b*e**3*g**3*h**3*p*q - 18*log(e + f*x)*b*e**3*g**2*h**4 
*p*q*x - 18*log(e + f*x)*b*e**3*g*h**5*p*q*x**2 - 6*log(e + f*x)*b*e**3*h* 
*6*p*q*x**3 + 18*log(e + f*x)*b*e**2*f*g**4*h**2*p*q + 54*log(e + f*x)*b*e 
**2*f*g**3*h**3*p*q*x + 54*log(e + f*x)*b*e**2*f*g**2*h**4*p*q*x**2 + 18*l 
og(e + f*x)*b*e**2*f*g*h**5*p*q*x**3 - 18*log(e + f*x)*b*e*f**2*g**5*h*p*q 
 - 54*log(e + f*x)*b*e*f**2*g**4*h**2*p*q*x - 54*log(e + f*x)*b*e*f**2*g** 
3*h**3*p*q*x**2 - 18*log(e + f*x)*b*e*f**2*g**2*h**4*p*q*x**3 + 6*log(g + 
h*x)*b*f**3*g**6*p*q + 18*log(g + h*x)*b*f**3*g**5*h*p*q*x + 18*log(g + h* 
x)*b*f**3*g**4*h**2*p*q*x**2 + 6*log(g + h*x)*b*f**3*g**3*h**3*p*q*x**3 + 
18*log(d**q*(e + f*x)**(p*q)*c)*b*e**3*g**2*h**4*x + 18*log(d**q*(e + f*x) 
**(p*q)*c)*b*e**3*g*h**5*x**2 + 6*log(d**q*(e + f*x)**(p*q)*c)*b*e**3*h**6 
*x**3 - 54*log(d**q*(e + f*x)**(p*q)*c)*b*e**2*f*g**3*h**3*x - 54*log(d**q 
*(e + f*x)**(p*q)*c)*b*e**2*f*g**2*h**4*x**2 - 18*log(d**q*(e + f*x)**(p*q 
)*c)*b*e**2*f*g*h**5*x**3 + 54*log(d**q*(e + f*x)**(p*q)*c)*b*e*f**2*g**4* 
h**2*x + 54*log(d**q*(e + f*x)**(p*q)*c)*b*e*f**2*g**3*h**3*x**2 + 18*log( 
d**q*(e + f*x)**(p*q)*c)*b*e*f**2*g**2*h**4*x**3 - 18*log(d**q*(e + f*x)** 
(p*q)*c)*b*f**3*g**5*h*x - 18*log(d**q*(e + f*x)**(p*q)*c)*b*f**3*g**4*h** 
2*x**2 - 6*log(d**q*(e + f*x)**(p*q)*c)*b*f**3*g**3*h**3*x**3 - 6*a*e**3*g 
**3*h**3 + 18*a*e**2*f*g**4*h**2 - 18*a*e*f**2*g**5*h + 6*a*f**3*g**6 - 3* 
b*e**2*f*g**4*h**2*p*q - 3*b*e**2*f*g**3*h**3*p*q*x + 10*b*e*f**2*g**5*...