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

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

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

Mathematica [A] (verified)

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

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

Output:

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

Rubi [A] (verified)

Time = 0.73 (sec) , antiderivative size = 239, 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.083, Rules used = {2856, 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^2} \, dx\)

\(\Big \downarrow \) 2856

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

\(\Big \downarrow \) 2009

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

Input:

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

Output:

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

Defintions of rubi rules used

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

rule 2856
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_) + (g_. 
)*(x_)^(r_))^(q_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*Log[c*(d + e*x) 
^n])^p, (f + g*x^r)^q, x], x] /; FreeQ[{a, b, c, d, e, f, g, n, r}, x] && I 
GtQ[p, 0] && IntegerQ[q] && (GtQ[q, 0] || (IntegerQ[r] && NeQ[r, 1]))
 
Maple [C] (warning: unable to verify)

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

Time = 1.53 (sec) , antiderivative size = 405, normalized size of antiderivative = 1.69

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

b*integrate((log((e*x + d)^n) + log(c))/(g*x^2 + f), x) + a*arctan(g*x/sqr 
t(f*g))/sqrt(f*g)
 

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

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