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

Optimal. Leaf size=782 \[ -\frac{n \text{PolyLog}\left (2,-\frac{c \left (-\sqrt{e^2-4 d f}+e+2 f x\right )}{f \left (b-\sqrt{b^2-4 a c}\right )-c \left (e-\sqrt{e^2-4 d f}\right )}\right )}{\sqrt{e^2-4 d f}}-\frac{n \text{PolyLog}\left (2,-\frac{c \left (-\sqrt{e^2-4 d f}+e+2 f x\right )}{f \left (\sqrt{b^2-4 a c}+b\right )-c \left (e-\sqrt{e^2-4 d f}\right )}\right )}{\sqrt{e^2-4 d f}}+\frac{n \text{PolyLog}\left (2,-\frac{c \left (\sqrt{e^2-4 d f}+e+2 f x\right )}{f \left (b-\sqrt{b^2-4 a c}\right )-c \left (\sqrt{e^2-4 d f}+e\right )}\right )}{\sqrt{e^2-4 d f}}+\frac{n \text{PolyLog}\left (2,-\frac{c \left (\sqrt{e^2-4 d f}+e+2 f x\right )}{f \left (\sqrt{b^2-4 a c}+b\right )-c \left (\sqrt{e^2-4 d f}+e\right )}\right )}{\sqrt{e^2-4 d f}}-\frac{n \log \left (-\sqrt{e^2-4 d f}+e+2 f x\right ) \log \left (-\frac{f \left (-\sqrt{b^2-4 a c}+b+2 c x\right )}{f \sqrt{b^2-4 a c}-b f-c \sqrt{e^2-4 d f}+c e}\right )}{\sqrt{e^2-4 d f}}-\frac{n \log \left (-\sqrt{e^2-4 d f}+e+2 f x\right ) \log \left (\frac{f \left (\sqrt{b^2-4 a c}+b+2 c x\right )}{f \left (\sqrt{b^2-4 a c}+b\right )-c \left (e-\sqrt{e^2-4 d f}\right )}\right )}{\sqrt{e^2-4 d f}}+\frac{n \log \left (\sqrt{e^2-4 d f}+e+2 f x\right ) \log \left (\frac{f \left (-\sqrt{b^2-4 a c}+b+2 c x\right )}{f \left (b-\sqrt{b^2-4 a c}\right )-c \left (\sqrt{e^2-4 d f}+e\right )}\right )}{\sqrt{e^2-4 d f}}+\frac{n \log \left (\sqrt{e^2-4 d f}+e+2 f x\right ) \log \left (\frac{f \left (\sqrt{b^2-4 a c}+b+2 c x\right )}{f \left (\sqrt{b^2-4 a c}+b\right )-c \left (\sqrt{e^2-4 d f}+e\right )}\right )}{\sqrt{e^2-4 d f}}+\frac{\log \left (-\sqrt{e^2-4 d f}+e+2 f x\right ) \log \left (g \left (a+b x+c x^2\right )^n\right )}{\sqrt{e^2-4 d f}}-\frac{\log \left (\sqrt{e^2-4 d f}+e+2 f x\right ) \log \left (g \left (a+b x+c x^2\right )^n\right )}{\sqrt{e^2-4 d f}} \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 1.51443, antiderivative size = 782, normalized size of antiderivative = 1., number of steps used = 20, number of rules used = 6, integrand size = 28, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {2528, 2524, 2418, 2394, 2393, 2391} \[ -\frac{n \text{PolyLog}\left (2,-\frac{c \left (-\sqrt{e^2-4 d f}+e+2 f x\right )}{f \left (b-\sqrt{b^2-4 a c}\right )-c \left (e-\sqrt{e^2-4 d f}\right )}\right )}{\sqrt{e^2-4 d f}}-\frac{n \text{PolyLog}\left (2,-\frac{c \left (-\sqrt{e^2-4 d f}+e+2 f x\right )}{f \left (\sqrt{b^2-4 a c}+b\right )-c \left (e-\sqrt{e^2-4 d f}\right )}\right )}{\sqrt{e^2-4 d f}}+\frac{n \text{PolyLog}\left (2,-\frac{c \left (\sqrt{e^2-4 d f}+e+2 f x\right )}{f \left (b-\sqrt{b^2-4 a c}\right )-c \left (\sqrt{e^2-4 d f}+e\right )}\right )}{\sqrt{e^2-4 d f}}+\frac{n \text{PolyLog}\left (2,-\frac{c \left (\sqrt{e^2-4 d f}+e+2 f x\right )}{f \left (\sqrt{b^2-4 a c}+b\right )-c \left (\sqrt{e^2-4 d f}+e\right )}\right )}{\sqrt{e^2-4 d f}}-\frac{n \log \left (-\sqrt{e^2-4 d f}+e+2 f x\right ) \log \left (-\frac{f \left (-\sqrt{b^2-4 a c}+b+2 c x\right )}{f \sqrt{b^2-4 a c}-b f-c \sqrt{e^2-4 d f}+c e}\right )}{\sqrt{e^2-4 d f}}-\frac{n \log \left (-\sqrt{e^2-4 d f}+e+2 f x\right ) \log \left (\frac{f \left (\sqrt{b^2-4 a c}+b+2 c x\right )}{f \left (\sqrt{b^2-4 a c}+b\right )-c \left (e-\sqrt{e^2-4 d f}\right )}\right )}{\sqrt{e^2-4 d f}}+\frac{n \log \left (\sqrt{e^2-4 d f}+e+2 f x\right ) \log \left (\frac{f \left (-\sqrt{b^2-4 a c}+b+2 c x\right )}{f \left (b-\sqrt{b^2-4 a c}\right )-c \left (\sqrt{e^2-4 d f}+e\right )}\right )}{\sqrt{e^2-4 d f}}+\frac{n \log \left (\sqrt{e^2-4 d f}+e+2 f x\right ) \log \left (\frac{f \left (\sqrt{b^2-4 a c}+b+2 c x\right )}{f \left (\sqrt{b^2-4 a c}+b\right )-c \left (\sqrt{e^2-4 d f}+e\right )}\right )}{\sqrt{e^2-4 d f}}+\frac{\log \left (-\sqrt{e^2-4 d f}+e+2 f x\right ) \log \left (g \left (a+b x+c x^2\right )^n\right )}{\sqrt{e^2-4 d f}}-\frac{\log \left (\sqrt{e^2-4 d f}+e+2 f x\right ) \log \left (g \left (a+b x+c x^2\right )^n\right )}{\sqrt{e^2-4 d f}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2528

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

Rule 2524

Int[((a_.) + Log[(c_.)*(RFx_)^(p_.)]*(b_.))^(n_.)/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[(Log[d + e*x]*(a + b
*Log[c*RFx^p])^n)/e, x] - Dist[(b*n*p)/e, Int[(Log[d + e*x]*(a + b*Log[c*RFx^p])^(n - 1)*D[RFx, x])/RFx, x], x
] /; FreeQ[{a, b, c, d, e, p}, x] && RationalFunctionQ[RFx, x] && IGtQ[n, 0]

Rule 2418

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*(RFx_), x_Symbol] :> 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] && RationalFunct
ionQ[RFx, x] && IntegerQ[p]

Rule 2394

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Simp[(Log[(e*(f +
g*x))/(e*f - d*g)]*(a + b*Log[c*(d + e*x)^n]))/g, x] - Dist[(b*e*n)/g, Int[Log[(e*(f + g*x))/(e*f - d*g)]/(d +
 e*x), x], x] /; FreeQ[{a, b, c, d, e, f, g, n}, x] && NeQ[e*f - d*g, 0]

Rule 2393

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))]*(b_.))/((f_.) + (g_.)*(x_)), x_Symbol] :> Dist[1/g, Subst[Int[(a +
 b*Log[1 + (c*e*x)/g])/x, x], x, f + g*x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] && EqQ[g
 + c*(e*f - d*g), 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rubi steps

\begin{align*} \int \frac{\log \left (g \left (a+b x+c x^2\right )^n\right )}{d+e x+f x^2} \, dx &=\int \left (\frac{2 f \log \left (g \left (a+b x+c x^2\right )^n\right )}{\sqrt{e^2-4 d f} \left (e-\sqrt{e^2-4 d f}+2 f x\right )}-\frac{2 f \log \left (g \left (a+b x+c x^2\right )^n\right )}{\sqrt{e^2-4 d f} \left (e+\sqrt{e^2-4 d f}+2 f x\right )}\right ) \, dx\\ &=\frac{(2 f) \int \frac{\log \left (g \left (a+b x+c x^2\right )^n\right )}{e-\sqrt{e^2-4 d f}+2 f x} \, dx}{\sqrt{e^2-4 d f}}-\frac{(2 f) \int \frac{\log \left (g \left (a+b x+c x^2\right )^n\right )}{e+\sqrt{e^2-4 d f}+2 f x} \, dx}{\sqrt{e^2-4 d f}}\\ &=\frac{\log \left (e-\sqrt{e^2-4 d f}+2 f x\right ) \log \left (g \left (a+b x+c x^2\right )^n\right )}{\sqrt{e^2-4 d f}}-\frac{\log \left (e+\sqrt{e^2-4 d f}+2 f x\right ) \log \left (g \left (a+b x+c x^2\right )^n\right )}{\sqrt{e^2-4 d f}}-\frac{n \int \frac{(b+2 c x) \log \left (e-\sqrt{e^2-4 d f}+2 f x\right )}{a+b x+c x^2} \, dx}{\sqrt{e^2-4 d f}}+\frac{n \int \frac{(b+2 c x) \log \left (e+\sqrt{e^2-4 d f}+2 f x\right )}{a+b x+c x^2} \, dx}{\sqrt{e^2-4 d f}}\\ &=\frac{\log \left (e-\sqrt{e^2-4 d f}+2 f x\right ) \log \left (g \left (a+b x+c x^2\right )^n\right )}{\sqrt{e^2-4 d f}}-\frac{\log \left (e+\sqrt{e^2-4 d f}+2 f x\right ) \log \left (g \left (a+b x+c x^2\right )^n\right )}{\sqrt{e^2-4 d f}}-\frac{n \int \left (\frac{2 c \log \left (e-\sqrt{e^2-4 d f}+2 f x\right )}{b-\sqrt{b^2-4 a c}+2 c x}+\frac{2 c \log \left (e-\sqrt{e^2-4 d f}+2 f x\right )}{b+\sqrt{b^2-4 a c}+2 c x}\right ) \, dx}{\sqrt{e^2-4 d f}}+\frac{n \int \left (\frac{2 c \log \left (e+\sqrt{e^2-4 d f}+2 f x\right )}{b-\sqrt{b^2-4 a c}+2 c x}+\frac{2 c \log \left (e+\sqrt{e^2-4 d f}+2 f x\right )}{b+\sqrt{b^2-4 a c}+2 c x}\right ) \, dx}{\sqrt{e^2-4 d f}}\\ &=\frac{\log \left (e-\sqrt{e^2-4 d f}+2 f x\right ) \log \left (g \left (a+b x+c x^2\right )^n\right )}{\sqrt{e^2-4 d f}}-\frac{\log \left (e+\sqrt{e^2-4 d f}+2 f x\right ) \log \left (g \left (a+b x+c x^2\right )^n\right )}{\sqrt{e^2-4 d f}}-\frac{(2 c n) \int \frac{\log \left (e-\sqrt{e^2-4 d f}+2 f x\right )}{b-\sqrt{b^2-4 a c}+2 c x} \, dx}{\sqrt{e^2-4 d f}}-\frac{(2 c n) \int \frac{\log \left (e-\sqrt{e^2-4 d f}+2 f x\right )}{b+\sqrt{b^2-4 a c}+2 c x} \, dx}{\sqrt{e^2-4 d f}}+\frac{(2 c n) \int \frac{\log \left (e+\sqrt{e^2-4 d f}+2 f x\right )}{b-\sqrt{b^2-4 a c}+2 c x} \, dx}{\sqrt{e^2-4 d f}}+\frac{(2 c n) \int \frac{\log \left (e+\sqrt{e^2-4 d f}+2 f x\right )}{b+\sqrt{b^2-4 a c}+2 c x} \, dx}{\sqrt{e^2-4 d f}}\\ &=-\frac{n \log \left (-\frac{f \left (b-\sqrt{b^2-4 a c}+2 c x\right )}{c e-b f+\sqrt{b^2-4 a c} f-c \sqrt{e^2-4 d f}}\right ) \log \left (e-\sqrt{e^2-4 d f}+2 f x\right )}{\sqrt{e^2-4 d f}}-\frac{n \log \left (\frac{f \left (b+\sqrt{b^2-4 a c}+2 c x\right )}{\left (b+\sqrt{b^2-4 a c}\right ) f-c \left (e-\sqrt{e^2-4 d f}\right )}\right ) \log \left (e-\sqrt{e^2-4 d f}+2 f x\right )}{\sqrt{e^2-4 d f}}+\frac{n \log \left (\frac{f \left (b-\sqrt{b^2-4 a c}+2 c x\right )}{\left (b-\sqrt{b^2-4 a c}\right ) f-c \left (e+\sqrt{e^2-4 d f}\right )}\right ) \log \left (e+\sqrt{e^2-4 d f}+2 f x\right )}{\sqrt{e^2-4 d f}}+\frac{n \log \left (\frac{f \left (b+\sqrt{b^2-4 a c}+2 c x\right )}{\left (b+\sqrt{b^2-4 a c}\right ) f-c \left (e+\sqrt{e^2-4 d f}\right )}\right ) \log \left (e+\sqrt{e^2-4 d f}+2 f x\right )}{\sqrt{e^2-4 d f}}+\frac{\log \left (e-\sqrt{e^2-4 d f}+2 f x\right ) \log \left (g \left (a+b x+c x^2\right )^n\right )}{\sqrt{e^2-4 d f}}-\frac{\log \left (e+\sqrt{e^2-4 d f}+2 f x\right ) \log \left (g \left (a+b x+c x^2\right )^n\right )}{\sqrt{e^2-4 d f}}+\frac{(2 f n) \int \frac{\log \left (\frac{2 f \left (b-\sqrt{b^2-4 a c}+2 c x\right )}{2 \left (b-\sqrt{b^2-4 a c}\right ) f-2 c \left (e-\sqrt{e^2-4 d f}\right )}\right )}{e-\sqrt{e^2-4 d f}+2 f x} \, dx}{\sqrt{e^2-4 d f}}-\frac{(2 f n) \int \frac{\log \left (\frac{2 f \left (b-\sqrt{b^2-4 a c}+2 c x\right )}{2 \left (b-\sqrt{b^2-4 a c}\right ) f-2 c \left (e+\sqrt{e^2-4 d f}\right )}\right )}{e+\sqrt{e^2-4 d f}+2 f x} \, dx}{\sqrt{e^2-4 d f}}+\frac{(2 f n) \int \frac{\log \left (\frac{2 f \left (b+\sqrt{b^2-4 a c}+2 c x\right )}{2 \left (b+\sqrt{b^2-4 a c}\right ) f-2 c \left (e-\sqrt{e^2-4 d f}\right )}\right )}{e-\sqrt{e^2-4 d f}+2 f x} \, dx}{\sqrt{e^2-4 d f}}-\frac{(2 f n) \int \frac{\log \left (\frac{2 f \left (b+\sqrt{b^2-4 a c}+2 c x\right )}{2 \left (b+\sqrt{b^2-4 a c}\right ) f-2 c \left (e+\sqrt{e^2-4 d f}\right )}\right )}{e+\sqrt{e^2-4 d f}+2 f x} \, dx}{\sqrt{e^2-4 d f}}\\ &=-\frac{n \log \left (-\frac{f \left (b-\sqrt{b^2-4 a c}+2 c x\right )}{c e-b f+\sqrt{b^2-4 a c} f-c \sqrt{e^2-4 d f}}\right ) \log \left (e-\sqrt{e^2-4 d f}+2 f x\right )}{\sqrt{e^2-4 d f}}-\frac{n \log \left (\frac{f \left (b+\sqrt{b^2-4 a c}+2 c x\right )}{\left (b+\sqrt{b^2-4 a c}\right ) f-c \left (e-\sqrt{e^2-4 d f}\right )}\right ) \log \left (e-\sqrt{e^2-4 d f}+2 f x\right )}{\sqrt{e^2-4 d f}}+\frac{n \log \left (\frac{f \left (b-\sqrt{b^2-4 a c}+2 c x\right )}{\left (b-\sqrt{b^2-4 a c}\right ) f-c \left (e+\sqrt{e^2-4 d f}\right )}\right ) \log \left (e+\sqrt{e^2-4 d f}+2 f x\right )}{\sqrt{e^2-4 d f}}+\frac{n \log \left (\frac{f \left (b+\sqrt{b^2-4 a c}+2 c x\right )}{\left (b+\sqrt{b^2-4 a c}\right ) f-c \left (e+\sqrt{e^2-4 d f}\right )}\right ) \log \left (e+\sqrt{e^2-4 d f}+2 f x\right )}{\sqrt{e^2-4 d f}}+\frac{\log \left (e-\sqrt{e^2-4 d f}+2 f x\right ) \log \left (g \left (a+b x+c x^2\right )^n\right )}{\sqrt{e^2-4 d f}}-\frac{\log \left (e+\sqrt{e^2-4 d f}+2 f x\right ) \log \left (g \left (a+b x+c x^2\right )^n\right )}{\sqrt{e^2-4 d f}}+\frac{n \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{2 c x}{2 \left (b-\sqrt{b^2-4 a c}\right ) f-2 c \left (e-\sqrt{e^2-4 d f}\right )}\right )}{x} \, dx,x,e-\sqrt{e^2-4 d f}+2 f x\right )}{\sqrt{e^2-4 d f}}+\frac{n \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{2 c x}{2 \left (b+\sqrt{b^2-4 a c}\right ) f-2 c \left (e-\sqrt{e^2-4 d f}\right )}\right )}{x} \, dx,x,e-\sqrt{e^2-4 d f}+2 f x\right )}{\sqrt{e^2-4 d f}}-\frac{n \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{2 c x}{2 \left (b-\sqrt{b^2-4 a c}\right ) f-2 c \left (e+\sqrt{e^2-4 d f}\right )}\right )}{x} \, dx,x,e+\sqrt{e^2-4 d f}+2 f x\right )}{\sqrt{e^2-4 d f}}-\frac{n \operatorname{Subst}\left (\int \frac{\log \left (1+\frac{2 c x}{2 \left (b+\sqrt{b^2-4 a c}\right ) f-2 c \left (e+\sqrt{e^2-4 d f}\right )}\right )}{x} \, dx,x,e+\sqrt{e^2-4 d f}+2 f x\right )}{\sqrt{e^2-4 d f}}\\ &=-\frac{n \log \left (-\frac{f \left (b-\sqrt{b^2-4 a c}+2 c x\right )}{c e-b f+\sqrt{b^2-4 a c} f-c \sqrt{e^2-4 d f}}\right ) \log \left (e-\sqrt{e^2-4 d f}+2 f x\right )}{\sqrt{e^2-4 d f}}-\frac{n \log \left (\frac{f \left (b+\sqrt{b^2-4 a c}+2 c x\right )}{\left (b+\sqrt{b^2-4 a c}\right ) f-c \left (e-\sqrt{e^2-4 d f}\right )}\right ) \log \left (e-\sqrt{e^2-4 d f}+2 f x\right )}{\sqrt{e^2-4 d f}}+\frac{n \log \left (\frac{f \left (b-\sqrt{b^2-4 a c}+2 c x\right )}{\left (b-\sqrt{b^2-4 a c}\right ) f-c \left (e+\sqrt{e^2-4 d f}\right )}\right ) \log \left (e+\sqrt{e^2-4 d f}+2 f x\right )}{\sqrt{e^2-4 d f}}+\frac{n \log \left (\frac{f \left (b+\sqrt{b^2-4 a c}+2 c x\right )}{\left (b+\sqrt{b^2-4 a c}\right ) f-c \left (e+\sqrt{e^2-4 d f}\right )}\right ) \log \left (e+\sqrt{e^2-4 d f}+2 f x\right )}{\sqrt{e^2-4 d f}}+\frac{\log \left (e-\sqrt{e^2-4 d f}+2 f x\right ) \log \left (g \left (a+b x+c x^2\right )^n\right )}{\sqrt{e^2-4 d f}}-\frac{\log \left (e+\sqrt{e^2-4 d f}+2 f x\right ) \log \left (g \left (a+b x+c x^2\right )^n\right )}{\sqrt{e^2-4 d f}}-\frac{n \text{Li}_2\left (-\frac{c \left (e-\sqrt{e^2-4 d f}+2 f x\right )}{\left (b-\sqrt{b^2-4 a c}\right ) f-c \left (e-\sqrt{e^2-4 d f}\right )}\right )}{\sqrt{e^2-4 d f}}-\frac{n \text{Li}_2\left (-\frac{c \left (e-\sqrt{e^2-4 d f}+2 f x\right )}{\left (b+\sqrt{b^2-4 a c}\right ) f-c \left (e-\sqrt{e^2-4 d f}\right )}\right )}{\sqrt{e^2-4 d f}}+\frac{n \text{Li}_2\left (-\frac{c \left (e+\sqrt{e^2-4 d f}+2 f x\right )}{\left (b-\sqrt{b^2-4 a c}\right ) f-c \left (e+\sqrt{e^2-4 d f}\right )}\right )}{\sqrt{e^2-4 d f}}+\frac{n \text{Li}_2\left (-\frac{c \left (e+\sqrt{e^2-4 d f}+2 f x\right )}{\left (b+\sqrt{b^2-4 a c}\right ) f-c \left (e+\sqrt{e^2-4 d f}\right )}\right )}{\sqrt{e^2-4 d f}}\\ \end{align*}

Mathematica [A]  time = 0.812922, size = 663, normalized size = 0.85 \[ \frac{-n \text{PolyLog}\left (2,\frac{c \left (\sqrt{e^2-4 d f}-e-2 f x\right )}{f \left (b-\sqrt{b^2-4 a c}\right )+c \left (\sqrt{e^2-4 d f}-e\right )}\right )-n \text{PolyLog}\left (2,\frac{c \left (\sqrt{e^2-4 d f}-e-2 f x\right )}{f \left (\sqrt{b^2-4 a c}+b\right )+c \left (\sqrt{e^2-4 d f}-e\right )}\right )+n \text{PolyLog}\left (2,\frac{c \left (\sqrt{e^2-4 d f}+e+2 f x\right )}{f \left (\sqrt{b^2-4 a c}-b\right )+c \left (\sqrt{e^2-4 d f}+e\right )}\right )+n \text{PolyLog}\left (2,\frac{c \left (\sqrt{e^2-4 d f}+e+2 f x\right )}{c \left (\sqrt{e^2-4 d f}+e\right )-f \left (\sqrt{b^2-4 a c}+b\right )}\right )-n \log \left (-\sqrt{e^2-4 d f}+e+2 f x\right ) \log \left (\frac{f \left (-\sqrt{b^2-4 a c}+b+2 c x\right )}{-f \sqrt{b^2-4 a c}+b f+c \sqrt{e^2-4 d f}+c (-e)}\right )-n \log \left (-\sqrt{e^2-4 d f}+e+2 f x\right ) \log \left (\frac{f \left (\sqrt{b^2-4 a c}+b+2 c x\right )}{f \left (\sqrt{b^2-4 a c}+b\right )+c \left (\sqrt{e^2-4 d f}-e\right )}\right )+n \log \left (\sqrt{e^2-4 d f}+e+2 f x\right ) \log \left (\frac{f \left (\sqrt{b^2-4 a c}-b-2 c x\right )}{f \left (\sqrt{b^2-4 a c}-b\right )+c \left (\sqrt{e^2-4 d f}+e\right )}\right )+n \log \left (\sqrt{e^2-4 d f}+e+2 f x\right ) \log \left (\frac{f \left (\sqrt{b^2-4 a c}+b+2 c x\right )}{f \left (\sqrt{b^2-4 a c}+b\right )-c \left (\sqrt{e^2-4 d f}+e\right )}\right )+\log \left (-\sqrt{e^2-4 d f}+e+2 f x\right ) \log \left (g (a+x (b+c x))^n\right )-\log \left (\sqrt{e^2-4 d f}+e+2 f x\right ) \log \left (g (a+x (b+c x))^n\right )}{\sqrt{e^2-4 d f}} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Maple [C]  time = 0.11, size = 764, normalized size = 1. \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

2*(ln((c*x^2+b*x+a)^n)-n*ln(c*x^2+b*x+a))/(4*d*f-e^2)^(1/2)*arctan((2*f*x+e)/(4*d*f-e^2)^(1/2))+n*sum((ln(x-_a
lpha)*ln(c*x^2+b*x+a)-ln(x-_alpha)*ln((RootOf(_Z^2*c*f+(2*_alpha*c*f+b*f)*_Z+b*_alpha*f-_alpha*c*e+a*f-c*d,ind
ex=1)-x+_alpha)/RootOf(_Z^2*c*f+(2*_alpha*c*f+b*f)*_Z+b*_alpha*f-_alpha*c*e+a*f-c*d,index=1))-ln(x-_alpha)*ln(
(RootOf(_Z^2*c*f+(2*_alpha*c*f+b*f)*_Z+b*_alpha*f-_alpha*c*e+a*f-c*d,index=2)-x+_alpha)/RootOf(_Z^2*c*f+(2*_al
pha*c*f+b*f)*_Z+b*_alpha*f-_alpha*c*e+a*f-c*d,index=2))-dilog((RootOf(_Z^2*c*f+(2*_alpha*c*f+b*f)*_Z+b*_alpha*
f-_alpha*c*e+a*f-c*d,index=1)-x+_alpha)/RootOf(_Z^2*c*f+(2*_alpha*c*f+b*f)*_Z+b*_alpha*f-_alpha*c*e+a*f-c*d,in
dex=1))-dilog((RootOf(_Z^2*c*f+(2*_alpha*c*f+b*f)*_Z+b*_alpha*f-_alpha*c*e+a*f-c*d,index=2)-x+_alpha)/RootOf(_
Z^2*c*f+(2*_alpha*c*f+b*f)*_Z+b*_alpha*f-_alpha*c*e+a*f-c*d,index=2)))/(2*_alpha*f+e),_alpha=RootOf(_Z^2*f+_Z*
e+d))-I/(4*d*f-e^2)^(1/2)*arctan((2*f*x+e)/(4*d*f-e^2)^(1/2))*Pi*csgn(I*(c*x^2+b*x+a)^n)*csgn(I*g)*csgn(I*g*(c
*x^2+b*x+a)^n)+I/(4*d*f-e^2)^(1/2)*arctan((2*f*x+e)/(4*d*f-e^2)^(1/2))*Pi*csgn(I*(c*x^2+b*x+a)^n)*csgn(I*g*(c*
x^2+b*x+a)^n)^2+I/(4*d*f-e^2)^(1/2)*arctan((2*f*x+e)/(4*d*f-e^2)^(1/2))*Pi*csgn(I*g)*csgn(I*g*(c*x^2+b*x+a)^n)
^2-I/(4*d*f-e^2)^(1/2)*arctan((2*f*x+e)/(4*d*f-e^2)^(1/2))*Pi*csgn(I*g*(c*x^2+b*x+a)^n)^3+2/(4*d*f-e^2)^(1/2)*
arctan((2*f*x+e)/(4*d*f-e^2)^(1/2))*ln(g)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{\log \left ({\left (c x^{2} + b x + a\right )}^{n} g\right )}{f x^{2} + e x + d}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\log \left ({\left (c x^{2} + b x + a\right )}^{n} g\right )}{f x^{2} + e x + d}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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