\(\int \frac {(h+i x) (a+b \log (c (d+e x)^n))}{f+g x} \, dx\) [219]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [C] (warning: unable to verify)
Fricas [F]
Sympy [F]
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 27, antiderivative size = 119 \[ \int \frac {(h+i x) \left (a+b \log \left (c (d+e x)^n\right )\right )}{f+g x} \, dx=\frac {a i x}{g}-\frac {b i n x}{g}+\frac {b i (d+e x) \log \left (c (d+e x)^n\right )}{e g}+\frac {(g h-f i) \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )}{g^2}+\frac {b (g h-f i) n \operatorname {PolyLog}\left (2,-\frac {g (d+e x)}{e f-d g}\right )}{g^2} \] Output:

a*i*x/g-b*i*n*x/g+b*i*(e*x+d)*ln(c*(e*x+d)^n)/e/g+(-f*i+g*h)*(a+b*ln(c*(e* 
x+d)^n))*ln(e*(g*x+f)/(-d*g+e*f))/g^2+b*(-f*i+g*h)*n*polylog(2,-g*(e*x+d)/ 
(-d*g+e*f))/g^2
 

Mathematica [A] (verified)

Time = 0.12 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.92 \[ \int \frac {(h+i x) \left (a+b \log \left (c (d+e x)^n\right )\right )}{f+g x} \, dx=\frac {a g i x-b g i n x+\frac {b g i (d+e x) \log \left (c (d+e x)^n\right )}{e}+(g h-f i) \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (f+g x)}{e f-d g}\right )+b (g h-f i) n \operatorname {PolyLog}\left (2,\frac {g (d+e x)}{-e f+d g}\right )}{g^2} \] Input:

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

Output:

(a*g*i*x - b*g*i*n*x + (b*g*i*(d + e*x)*Log[c*(d + e*x)^n])/e + (g*h - f*i 
)*(a + b*Log[c*(d + e*x)^n])*Log[(e*(f + g*x))/(e*f - d*g)] + b*(g*h - f*i 
)*n*PolyLog[2, (g*(d + e*x))/(-(e*f) + d*g)])/g^2
 

Rubi [A] (verified)

Time = 0.59 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.074, Rules used = {2865, 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 {(h+i x) \left (a+b \log \left (c (d+e x)^n\right )\right )}{f+g x} \, dx\)

\(\Big \downarrow \) 2865

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

\(\Big \downarrow \) 2009

\(\displaystyle \frac {(g h-f i) \log \left (\frac {e (f+g x)}{e f-d g}\right ) \left (a+b \log \left (c (d+e x)^n\right )\right )}{g^2}+\frac {a i x}{g}+\frac {b i (d+e x) \log \left (c (d+e x)^n\right )}{e g}+\frac {b n (g h-f i) \operatorname {PolyLog}\left (2,-\frac {g (d+e x)}{e f-d g}\right )}{g^2}-\frac {b i n x}{g}\)

Input:

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

Output:

(a*i*x)/g - (b*i*n*x)/g + (b*i*(d + e*x)*Log[c*(d + e*x)^n])/(e*g) + ((g*h 
 - f*i)*(a + b*Log[c*(d + e*x)^n])*Log[(e*(f + g*x))/(e*f - d*g)])/g^2 + ( 
b*(g*h - f*i)*n*PolyLog[2, -((g*(d + e*x))/(e*f - d*g))])/g^2
 

Defintions of rubi rules used

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

rule 2865
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Sy 
mbol] :> With[{u = ExpandIntegrand[(a + b*Log[c*(d + e*x)^n])^p, RFx, x]}, 
Int[u, x] /; SumQ[u]] /; FreeQ[{a, b, c, d, e, n}, x] && RationalFunctionQ[ 
RFx, x] && IntegerQ[p]
 
Maple [C] (warning: unable to verify)

Result contains higher order function than in optimal. Order 9 vs. order 4.

Time = 1.60 (sec) , antiderivative size = 394, normalized size of antiderivative = 3.31

method result size
risch \(\frac {b \ln \left (\left (e x +d \right )^{n}\right ) x i}{g}-\frac {b \ln \left (\left (e x +d \right )^{n}\right ) \ln \left (g x +f \right ) f i}{g^{2}}+\frac {b \ln \left (\left (e x +d \right )^{n}\right ) \ln \left (g x +f \right ) h}{g}-\frac {b i n x}{g}-\frac {b n i f}{g^{2}}+\frac {b n i d \ln \left (\left (g x +f \right ) e +d g -e f \right )}{e g}+\frac {b n \operatorname {dilog}\left (\frac {\left (g x +f \right ) e +d g -e f}{d g -e f}\right ) f i}{g^{2}}-\frac {b n \operatorname {dilog}\left (\frac {\left (g x +f \right ) e +d g -e f}{d g -e f}\right ) h}{g}+\frac {b n \ln \left (g x +f \right ) \ln \left (\frac {\left (g x +f \right ) e +d g -e f}{d g -e f}\right ) f i}{g^{2}}-\frac {b n \ln \left (g x +f \right ) \ln \left (\frac {\left (g x +f \right ) e +d g -e f}{d g -e f}\right ) h}{g}+\left (\frac {i b \pi \,\operatorname {csgn}\left (i \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2}}{2}-\frac {i b \pi \,\operatorname {csgn}\left (i \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right ) \operatorname {csgn}\left (i c \right )}{2}-\frac {i b \pi \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{3}}{2}+\frac {i b \pi \operatorname {csgn}\left (i c \left (e x +d \right )^{n}\right )^{2} \operatorname {csgn}\left (i c \right )}{2}+b \ln \left (c \right )+a \right ) \left (\frac {x i}{g}+\frac {\left (-f i +g h \right ) \ln \left (g x +f \right )}{g^{2}}\right )\) \(394\)

Input:

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

Output:

b*ln((e*x+d)^n)*x*i/g-b*ln((e*x+d)^n)/g^2*ln(g*x+f)*f*i+b*ln((e*x+d)^n)/g* 
ln(g*x+f)*h-b*i*n*x/g-b*n/g^2*i*f+b/e*n/g*i*d*ln((g*x+f)*e+d*g-e*f)+b*n/g^ 
2*dilog(((g*x+f)*e+d*g-e*f)/(d*g-e*f))*f*i-b*n/g*dilog(((g*x+f)*e+d*g-e*f) 
/(d*g-e*f))*h+b*n/g^2*ln(g*x+f)*ln(((g*x+f)*e+d*g-e*f)/(d*g-e*f))*f*i-b*n/ 
g*ln(g*x+f)*ln(((g*x+f)*e+d*g-e*f)/(d*g-e*f))*h+(1/2*I*b*Pi*csgn(I*(e*x+d) 
^n)*csgn(I*c*(e*x+d)^n)^2-1/2*I*b*Pi*csgn(I*(e*x+d)^n)*csgn(I*c*(e*x+d)^n) 
*csgn(I*c)-1/2*I*b*Pi*csgn(I*c*(e*x+d)^n)^3+1/2*I*b*Pi*csgn(I*c*(e*x+d)^n) 
^2*csgn(I*c)+b*ln(c)+a)*(x*i/g+(-f*i+g*h)/g^2*ln(g*x+f))
 

Fricas [F]

\[ \int \frac {(h+i x) \left (a+b \log \left (c (d+e x)^n\right )\right )}{f+g x} \, dx=\int { \frac {{\left (i x + h\right )} {\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}}{g x + f} \,d x } \] Input:

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

Output:

integral((a*i*x + a*h + (b*i*x + b*h)*log((e*x + d)^n*c))/(g*x + f), x)
 

Sympy [F]

\[ \int \frac {(h+i x) \left (a+b \log \left (c (d+e x)^n\right )\right )}{f+g x} \, dx=\int \frac {\left (a + b \log {\left (c \left (d + e x\right )^{n} \right )}\right ) \left (h + i x\right )}{f + g x}\, dx \] Input:

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

Output:

Integral((a + b*log(c*(d + e*x)**n))*(h + i*x)/(f + g*x), x)
 

Maxima [F]

\[ \int \frac {(h+i x) \left (a+b \log \left (c (d+e x)^n\right )\right )}{f+g x} \, dx=\int { \frac {{\left (i x + h\right )} {\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}}{g x + f} \,d x } \] Input:

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

Output:

a*i*(x/g - f*log(g*x + f)/g^2) + a*h*log(g*x + f)/g + integrate((b*i*x*log 
(c) + b*h*log(c) + (b*i*x + b*h)*log((e*x + d)^n))/(g*x + f), x)
 

Giac [F]

\[ \int \frac {(h+i x) \left (a+b \log \left (c (d+e x)^n\right )\right )}{f+g x} \, dx=\int { \frac {{\left (i x + h\right )} {\left (b \log \left ({\left (e x + d\right )}^{n} c\right ) + a\right )}}{g x + f} \,d x } \] Input:

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

Output:

integrate((i*x + h)*(b*log((e*x + d)^n*c) + a)/(g*x + f), x)
                                                                                    
                                                                                    
 

Mupad [F(-1)]

Timed out. \[ \int \frac {(h+i x) \left (a+b \log \left (c (d+e x)^n\right )\right )}{f+g x} \, dx=\int \frac {\left (h+i\,x\right )\,\left (a+b\,\ln \left (c\,{\left (d+e\,x\right )}^n\right )\right )}{f+g\,x} \,d x \] Input:

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

Output:

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

Reduce [F]

\[ \int \frac {(h+i x) \left (a+b \log \left (c (d+e x)^n\right )\right )}{f+g x} \, dx=\frac {-2 \left (\int \frac {\mathrm {log}\left (\left (e x +d \right )^{n} c \right )}{e g \,x^{2}+d g x +e f x +d f}d x \right ) b d e f g i n +2 \left (\int \frac {\mathrm {log}\left (\left (e x +d \right )^{n} c \right )}{e g \,x^{2}+d g x +e f x +d f}d x \right ) b d e \,g^{2} h n +2 \left (\int \frac {\mathrm {log}\left (\left (e x +d \right )^{n} c \right )}{e g \,x^{2}+d g x +e f x +d f}d x \right ) b \,e^{2} f^{2} i n -2 \left (\int \frac {\mathrm {log}\left (\left (e x +d \right )^{n} c \right )}{e g \,x^{2}+d g x +e f x +d f}d x \right ) b \,e^{2} f g h n -2 \,\mathrm {log}\left (g x +f \right ) a e f i n +2 \,\mathrm {log}\left (g x +f \right ) a e g h n -\mathrm {log}\left (\left (e x +d \right )^{n} c \right )^{2} b e f i +\mathrm {log}\left (\left (e x +d \right )^{n} c \right )^{2} b e g h +2 \,\mathrm {log}\left (\left (e x +d \right )^{n} c \right ) b d g i n +2 \,\mathrm {log}\left (\left (e x +d \right )^{n} c \right ) b e g i n x +2 a e g i n x -2 b e g i \,n^{2} x}{2 e \,g^{2} n} \] Input:

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

Output:

( - 2*int(log((d + e*x)**n*c)/(d*f + d*g*x + e*f*x + e*g*x**2),x)*b*d*e*f* 
g*i*n + 2*int(log((d + e*x)**n*c)/(d*f + d*g*x + e*f*x + e*g*x**2),x)*b*d* 
e*g**2*h*n + 2*int(log((d + e*x)**n*c)/(d*f + d*g*x + e*f*x + e*g*x**2),x) 
*b*e**2*f**2*i*n - 2*int(log((d + e*x)**n*c)/(d*f + d*g*x + e*f*x + e*g*x* 
*2),x)*b*e**2*f*g*h*n - 2*log(f + g*x)*a*e*f*i*n + 2*log(f + g*x)*a*e*g*h* 
n - log((d + e*x)**n*c)**2*b*e*f*i + log((d + e*x)**n*c)**2*b*e*g*h + 2*lo 
g((d + e*x)**n*c)*b*d*g*i*n + 2*log((d + e*x)**n*c)*b*e*g*i*n*x + 2*a*e*g* 
i*n*x - 2*b*e*g*i*n**2*x)/(2*e*g**2*n)