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

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [F]
Fricas [F]
Sympy [F(-1)]
Maxima [F(-2)]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 1.54 (sec) , antiderivative size = 450, normalized size of antiderivative = 1.12, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.097, Rules used = {2976, 2804, 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 {\log \left (e \left (\frac {a+b x}{c+d x}\right )^n\right )}{f+g x+h x^2} \, dx\)

\(\Big \downarrow \) 2976

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

\(\Big \downarrow \) 2804

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

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

rule 2804
Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> With[{ 
u = ExpandIntegrand[(a + b*Log[c*x^n])^p, RFx, x]}, Int[u, x] /; SumQ[u]] / 
; FreeQ[{a, b, c, n}, x] && RationalFunctionQ[RFx, x] && IGtQ[p, 0]
 

rule 2976
Int[((A_.) + Log[(e_.)*(((a_.) + (b_.)*(x_))/((c_.) + (d_.)*(x_)))^(n_.)]*( 
B_.))^(p_.)*(P2x_)^(m_.), x_Symbol] :> With[{f = Coeff[P2x, x, 0], g = Coef 
f[P2x, x, 1], h = Coeff[P2x, x, 2]}, Simp[(b*c - a*d)   Subst[Int[(b^2*f - 
a*b*g + a^2*h - (2*b*d*f - b*c*g - a*d*g + 2*a*c*h)*x + (d^2*f - c*d*g + c^ 
2*h)*x^2)^m*((A + B*Log[e*x^n])^p/(b - d*x)^(2*(m + 1))), x], x, (a + b*x)/ 
(c + d*x)], x]] /; FreeQ[{a, b, c, d, e, A, B, n}, x] && PolyQ[P2x, x, 2] & 
& NeQ[b*c - a*d, 0] && IntegerQ[m] && IGtQ[p, 0]
 
Maple [F]

\[\int \frac {\ln \left (e \left (\frac {b x +a}{d x +c}\right )^{n}\right )}{h \,x^{2}+g x +f}d x\]

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F(-1)]

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

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

Output:

Timed out
 

Maxima [F(-2)]

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

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

Output:

Exception raised: ValueError >> Computation failed since Maxima requested 
additional constraints; using the 'assume' command before evaluation *may* 
 help (example of legal syntax is 'assume(4*f*h-g^2>0)', see `assume?` for 
 more deta
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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