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

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 = 29, antiderivative size = 252 \[ \int \frac {a+b \log \left (c (d+e x)^n\right )}{(f+g x) (h+i x)^2} \, dx=-\frac {b e n \log (d+e x)}{(e h-d i) (g h-f i)}+\frac {a+b \log \left (c (d+e x)^n\right )}{(g h-f i) (h+i x)}+\frac {g \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 h-f i)^2}+\frac {b e n \log (h+i x)}{(e h-d i) (g h-f i)}-\frac {g \left (a+b \log \left (c (d+e x)^n\right )\right ) \log \left (\frac {e (h+i x)}{e h-d i}\right )}{(g h-f i)^2}+\frac {b g n \operatorname {PolyLog}\left (2,-\frac {g (d+e x)}{e f-d g}\right )}{(g h-f i)^2}-\frac {b g n \operatorname {PolyLog}\left (2,-\frac {i (d+e x)}{e h-d i}\right )}{(g h-f i)^2} \] Output:

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.90 (sec) , antiderivative size = 252, 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.069, 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 {a+b \log \left (c (d+e x)^n\right )}{(f+g x) (h+i x)^2} \, dx\)

\(\Big \downarrow \) 2865

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

-((b*e*n*Log[d + e*x])/((e*h - d*i)*(g*h - f*i))) + (a + b*Log[c*(d + e*x) 
^n])/((g*h - f*i)*(h + i*x)) + (g*(a + b*Log[c*(d + e*x)^n])*Log[(e*(f + g 
*x))/(e*f - d*g)])/(g*h - f*i)^2 + (b*e*n*Log[h + i*x])/((e*h - d*i)*(g*h 
- f*i)) - (g*(a + b*Log[c*(d + e*x)^n])*Log[(e*(h + i*x))/(e*h - d*i)])/(g 
*h - f*i)^2 + (b*g*n*PolyLog[2, -((g*(d + e*x))/(e*f - d*g))])/(g*h - f*i) 
^2 - (b*g*n*PolyLog[2, -((i*(d + e*x))/(e*h - d*i))])/(g*h - f*i)^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 = 3.76 (sec) , antiderivative size = 494, normalized size of antiderivative = 1.96

method result size
risch \(-\frac {b \ln \left (\left (e x +d \right )^{n}\right )}{\left (f i -g h \right ) \left (i x +h \right )}-\frac {b \ln \left (\left (e x +d \right )^{n}\right ) g \ln \left (i x +h \right )}{\left (f i -g h \right )^{2}}+\frac {b \ln \left (\left (e x +d \right )^{n}\right ) g \ln \left (g x +f \right )}{\left (f i -g h \right )^{2}}-\frac {b n g \operatorname {dilog}\left (\frac {\left (g x +f \right ) e +d g -e f}{d g -e f}\right )}{\left (f i -g h \right )^{2}}-\frac {b n g \ln \left (g x +f \right ) \ln \left (\frac {\left (g x +f \right ) e +d g -e f}{d g -e f}\right )}{\left (f i -g h \right )^{2}}+\frac {b e n \ln \left (i x +h \right )}{\left (f i -g h \right ) \left (d i -e h \right )}-\frac {b e n \ln \left (e x +d \right )}{\left (f i -g h \right ) \left (d i -e h \right )}+\frac {b n g \operatorname {dilog}\left (\frac {\left (i x +h \right ) e +d i -e h}{d i -e h}\right )}{\left (f i -g h \right )^{2}}+\frac {b n g \ln \left (i x +h \right ) \ln \left (\frac {\left (i x +h \right ) e +d i -e h}{d i -e h}\right )}{\left (f i -g h \right )^{2}}+\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 {1}{\left (f i -g h \right ) \left (i x +h \right )}-\frac {g \ln \left (i x +h \right )}{\left (f i -g h \right )^{2}}+\frac {g \ln \left (g x +f \right )}{\left (f i -g h \right )^{2}}\right )\) \(494\)

Input:

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

Output:

-b*ln((e*x+d)^n)/(f*i-g*h)/(i*x+h)-b*ln((e*x+d)^n)*g/(f*i-g*h)^2*ln(i*x+h) 
+b*ln((e*x+d)^n)*g/(f*i-g*h)^2*ln(g*x+f)-b*n*g/(f*i-g*h)^2*dilog(((g*x+f)* 
e+d*g-e*f)/(d*g-e*f))-b*n*g/(f*i-g*h)^2*ln(g*x+f)*ln(((g*x+f)*e+d*g-e*f)/( 
d*g-e*f))+b*e*n/(f*i-g*h)/(d*i-e*h)*ln(i*x+h)-b*e*n/(f*i-g*h)/(d*i-e*h)*ln 
(e*x+d)+b*n*g/(f*i-g*h)^2*dilog(((i*x+h)*e+d*i-e*h)/(d*i-e*h))+b*n*g/(f*i- 
g*h)^2*ln(i*x+h)*ln(((i*x+h)*e+d*i-e*h)/(d*i-e*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)*(-1/(f*i-g*h)/(i*x+h)-g/(f*i-g*h)^2*ln(i*x+h)+g 
/(f*i-g*h)^2*ln(g*x+f))
 

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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