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

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

Optimal result

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.84 (sec) , antiderivative size = 243, 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.087, 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 {\log \left (c (a+b x)^n\right )}{d+e x+f x^2} \, dx\)

\(\Big \downarrow \) 2865

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

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 = 2.44 (sec) , antiderivative size = 616, normalized size of antiderivative = 2.53

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

Input:

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

Output:

-2*b/(4*b^2*d*f-b^2*e^2)^(1/2)*arctan((2*(b*x+a)*f-2*f*a+b*e)/(4*b^2*d*f-b 
^2*e^2)^(1/2))*ln(b*x+a)*n+2*b/(4*b^2*d*f-b^2*e^2)^(1/2)*arctan((2*(b*x+a) 
*f-2*f*a+b*e)/(4*b^2*d*f-b^2*e^2)^(1/2))*ln((b*x+a)^n)+b*n*ln(b*x+a)/(-4*b 
^2*d*f+b^2*e^2)^(1/2)*ln((-2*(b*x+a)*f+2*f*a-b*e+(-4*b^2*d*f+b^2*e^2)^(1/2 
))/(2*f*a-b*e+(-4*b^2*d*f+b^2*e^2)^(1/2)))-b*n*ln(b*x+a)/(-4*b^2*d*f+b^2*e 
^2)^(1/2)*ln((2*(b*x+a)*f-2*f*a+b*e+(-4*b^2*d*f+b^2*e^2)^(1/2))/(-2*f*a+b* 
e+(-4*b^2*d*f+b^2*e^2)^(1/2)))+b*n/(-4*b^2*d*f+b^2*e^2)^(1/2)*dilog((-2*(b 
*x+a)*f+2*f*a-b*e+(-4*b^2*d*f+b^2*e^2)^(1/2))/(2*f*a-b*e+(-4*b^2*d*f+b^2*e 
^2)^(1/2)))-b*n/(-4*b^2*d*f+b^2*e^2)^(1/2)*dilog((2*(b*x+a)*f-2*f*a+b*e+(- 
4*b^2*d*f+b^2*e^2)^(1/2))/(-2*f*a+b*e+(-4*b^2*d*f+b^2*e^2)^(1/2)))+2*(1/2* 
I*Pi*csgn(I*(b*x+a)^n)*csgn(I*c*(b*x+a)^n)^2-1/2*I*Pi*csgn(I*(b*x+a)^n)*cs 
gn(I*c*(b*x+a)^n)*csgn(I*c)-1/2*I*Pi*csgn(I*c*(b*x+a)^n)^3+1/2*I*Pi*csgn(I 
*c*(b*x+a)^n)^2*csgn(I*c)+ln(c))/(4*d*f-e^2)^(1/2)*arctan((2*f*x+e)/(4*d*f 
-e^2)^(1/2))
 

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F(-2)]

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

integrate(log(c*(b*x+a)^n)/(f*x^2+e*x+d),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*d*f-e^2>0)', see `assume?` for 
 more deta
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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