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 {Li}_2\left (-\frac {c \left (e+2 f x-\sqrt {e^2-4 d f}\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+2 f x-\sqrt {e^2-4 d f}\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+2 f x+\sqrt {e^2-4 d f}\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+2 f x+\sqrt {e^2-4 d f}\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 \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]

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

________________________________________________________________________________________

Rubi [A]  time = 1.51, antiderivative size = 782, normalized size of antiderivative = 1.00, 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 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]

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 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 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 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 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]

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.85, size = 663, normalized size = 0.85 \[ \frac {-n \text {Li}_2\left (\frac {c \left (-e-2 f x+\sqrt {e^2-4 d f}\right )}{\left (b-\sqrt {b^2-4 a c}\right ) f+c \left (\sqrt {e^2-4 d f}-e\right )}\right )-n \text {Li}_2\left (\frac {c \left (-e-2 f x+\sqrt {e^2-4 d f}\right )}{\left (b+\sqrt {b^2-4 a c}\right ) f+c \left (\sqrt {e^2-4 d f}-e\right )}\right )+n \text {Li}_2\left (\frac {c \left (e+2 f x+\sqrt {e^2-4 d f}\right )}{\left (\sqrt {b^2-4 a c}-b\right ) f+c \left (e+\sqrt {e^2-4 d f}\right )}\right )+n \text {Li}_2\left (\frac {c \left (e+2 f x+\sqrt {e^2-4 d f}\right )}{c \left (e+\sqrt {e^2-4 d f}\right )-\left (b+\sqrt {b^2-4 a c}\right ) f}\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]

________________________________________________________________________________________

fricas [F]  time = 0.93, size = 0, normalized size = 0.00 \[ {\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 ) \]

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)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\log \left ({\left (c x^{2} + b x + a\right )}^{n} g\right )}{f x^{2} + e x + d}\,{d x} \]

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)

________________________________________________________________________________________

maple [C]  time = 1.17, size = 764, normalized size = 0.98 \[ \text {result too large to display} \]

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*(-n*ln(c*x^2+b*x+a)+ln((c*x^2+b*x+a)^n))/(4*d*f-e^2)^(1/2)*arctan((2*f*x+e)/(4*d*f-e^2)^(1/2))+n*sum((ln(-_a
lpha+x)*ln(c*x^2+b*x+a)-ln(-_alpha+x)*ln((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,index=1))-ln(-_alpha+x)
*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
*_alpha*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*_al
pha*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,index=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)/Root
Of(_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*(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*(c*x^2+b*x+a)^n)*csgn(I*g*(c*x^2+
b*x+a)^n)*csgn(I*g)-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+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)^2*csgn(I*g)+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.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: ValueError} \]

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 >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(4*d*f-e^2>0)', see `assume?` f
or more details)Is 4*d*f-e^2 positive or negative?

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.00 \[ \int \frac {\ln \left (g\,{\left (c\,x^2+b\,x+a\right )}^n\right )}{f\,x^2+e\,x+d} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

sympy [F(-1)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]

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

________________________________________________________________________________________