3.85 \(\int (d+e x) \log (d (a+b x+c x^2)^n) \, dx\)

Optimal. Leaf size=154 \[ -\frac {n \left (-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2\right ) \log \left (a+b x+c x^2\right )}{4 c^2 e}+\frac {n \sqrt {b^2-4 a c} (2 c d-b e) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{2 c^2}+\frac {(d+e x)^2 \log \left (d \left (a+b x+c x^2\right )^n\right )}{2 e}-\frac {1}{2} n x \left (4 d-\frac {b e}{c}\right )-\frac {1}{2} e n x^2 \]

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.19, antiderivative size = 154, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {2525, 800, 634, 618, 206, 628} \[ -\frac {n \left (-2 c e (a e+b d)+b^2 e^2+2 c^2 d^2\right ) \log \left (a+b x+c x^2\right )}{4 c^2 e}+\frac {n \sqrt {b^2-4 a c} (2 c d-b e) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{2 c^2}+\frac {(d+e x)^2 \log \left (d \left (a+b x+c x^2\right )^n\right )}{2 e}-\frac {1}{2} n x \left (4 d-\frac {b e}{c}\right )-\frac {1}{2} e n x^2 \]

Antiderivative was successfully verified.

[In]

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

[Out]

-((4*d - (b*e)/c)*n*x)/2 - (e*n*x^2)/2 + (Sqrt[b^2 - 4*a*c]*(2*c*d - b*e)*n*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a
*c]])/(2*c^2) - ((2*c^2*d^2 + b^2*e^2 - 2*c*e*(b*d + a*e))*n*Log[a + b*x + c*x^2])/(4*c^2*e) + ((d + e*x)^2*Lo
g[d*(a + b*x + c*x^2)^n])/(2*e)

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 618

Int[((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Dist[-2, Subst[Int[1/Simp[b^2 - 4*a*c - x^2, x], x]
, x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c, 0]

Rule 628

Int[((d_) + (e_.)*(x_))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[(d*Log[RemoveContent[a + b*x +
c*x^2, x]])/b, x] /; FreeQ[{a, b, c, d, e}, x] && EqQ[2*c*d - b*e, 0]

Rule 634

Int[((d_.) + (e_.)*(x_))/((a_) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Dist[(2*c*d - b*e)/(2*c), Int[1/(a +
 b*x + c*x^2), x], x] + Dist[e/(2*c), Int[(b + 2*c*x)/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e}, x] &
& NeQ[2*c*d - b*e, 0] && NeQ[b^2 - 4*a*c, 0] &&  !NiceSqrtQ[b^2 - 4*a*c]

Rule 800

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Int[Exp
andIntegrand[((d + e*x)^m*(f + g*x))/(a + b*x + c*x^2), x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[b^2 -
 4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IntegerQ[m]

Rule 2525

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

Rubi steps

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

________________________________________________________________________________________

Mathematica [A]  time = 0.21, size = 123, normalized size = 0.80 \[ \frac {n \left (2 a c e+b^2 (-e)+2 b c d\right ) \log (a+x (b+c x))-2 n \sqrt {b^2-4 a c} (b e-2 c d) \tanh ^{-1}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )+2 c x \left (c (2 d+e x) \log \left (d (a+x (b+c x))^n\right )+b e n-c n (4 d+e x)\right )}{4 c^2} \]

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

fricas [A]  time = 0.45, size = 336, normalized size = 2.18 \[ \left [-\frac {2 \, c^{2} e n x^{2} + \sqrt {b^{2} - 4 \, a c} {\left (2 \, c d - b e\right )} n \log \left (\frac {2 \, c^{2} x^{2} + 2 \, b c x + b^{2} - 2 \, a c - \sqrt {b^{2} - 4 \, a c} {\left (2 \, c x + b\right )}}{c x^{2} + b x + a}\right ) + 2 \, {\left (4 \, c^{2} d - b c e\right )} n x - {\left (2 \, c^{2} e n x^{2} + 4 \, c^{2} d n x + {\left (2 \, b c d - {\left (b^{2} - 2 \, a c\right )} e\right )} n\right )} \log \left (c x^{2} + b x + a\right ) - 2 \, {\left (c^{2} e x^{2} + 2 \, c^{2} d x\right )} \log \relax (d)}{4 \, c^{2}}, -\frac {2 \, c^{2} e n x^{2} - 2 \, \sqrt {-b^{2} + 4 \, a c} {\left (2 \, c d - b e\right )} n \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) + 2 \, {\left (4 \, c^{2} d - b c e\right )} n x - {\left (2 \, c^{2} e n x^{2} + 4 \, c^{2} d n x + {\left (2 \, b c d - {\left (b^{2} - 2 \, a c\right )} e\right )} n\right )} \log \left (c x^{2} + b x + a\right ) - 2 \, {\left (c^{2} e x^{2} + 2 \, c^{2} d x\right )} \log \relax (d)}{4 \, c^{2}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

[-1/4*(2*c^2*e*n*x^2 + sqrt(b^2 - 4*a*c)*(2*c*d - b*e)*n*log((2*c^2*x^2 + 2*b*c*x + b^2 - 2*a*c - sqrt(b^2 - 4
*a*c)*(2*c*x + b))/(c*x^2 + b*x + a)) + 2*(4*c^2*d - b*c*e)*n*x - (2*c^2*e*n*x^2 + 4*c^2*d*n*x + (2*b*c*d - (b
^2 - 2*a*c)*e)*n)*log(c*x^2 + b*x + a) - 2*(c^2*e*x^2 + 2*c^2*d*x)*log(d))/c^2, -1/4*(2*c^2*e*n*x^2 - 2*sqrt(-
b^2 + 4*a*c)*(2*c*d - b*e)*n*arctan(-sqrt(-b^2 + 4*a*c)*(2*c*x + b)/(b^2 - 4*a*c)) + 2*(4*c^2*d - b*c*e)*n*x -
 (2*c^2*e*n*x^2 + 4*c^2*d*n*x + (2*b*c*d - (b^2 - 2*a*c)*e)*n)*log(c*x^2 + b*x + a) - 2*(c^2*e*x^2 + 2*c^2*d*x
)*log(d))/c^2]

________________________________________________________________________________________

giac [A]  time = 0.20, size = 188, normalized size = 1.22 \[ \frac {c n x^{2} e \log \left (c x^{2} + b x + a\right ) - c n x^{2} e + 2 \, c d n x \log \left (c x^{2} + b x + a\right ) + c x^{2} e \log \relax (d) - 4 \, c d n x + b n x e + 2 \, c d x \log \relax (d)}{2 \, c} + \frac {{\left (2 \, b c d n - b^{2} n e + 2 \, a c n e\right )} \log \left (c x^{2} + b x + a\right )}{4 \, c^{2}} - \frac {{\left (2 \, b^{2} c d n - 8 \, a c^{2} d n - b^{3} n e + 4 \, a b c n e\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{2 \, \sqrt {-b^{2} + 4 \, a c} c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*(c*n*x^2*e*log(c*x^2 + b*x + a) - c*n*x^2*e + 2*c*d*n*x*log(c*x^2 + b*x + a) + c*x^2*e*log(d) - 4*c*d*n*x
+ b*n*x*e + 2*c*d*x*log(d))/c + 1/4*(2*b*c*d*n - b^2*n*e + 2*a*c*n*e)*log(c*x^2 + b*x + a)/c^2 - 1/2*(2*b^2*c*
d*n - 8*a*c^2*d*n - b^3*n*e + 4*a*b*c*n*e)*arctan((2*c*x + b)/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4*a*c)*c^2)

________________________________________________________________________________________

maple [C]  time = 0.70, size = 1706, normalized size = 11.08 \[ \text {result too large to display} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(1/2*e*x^2+d*x)*ln((c*x^2+b*x+a)^n)-1/4*I*Pi*e*x^2*csgn(I*d*(c*x^2+b*x+a)^n)^3-1/2*I*Pi*d*x*csgn(I*d)*csgn(I*(
c*x^2+b*x+a)^n)*csgn(I*d*(c*x^2+b*x+a)^n)+1/2*I*Pi*d*x*csgn(I*d)*csgn(I*d*(c*x^2+b*x+a)^n)^2+1/4*I*csgn(I*d*(c
*x^2+b*x+a)^n)^2*csgn(I*d)*x^2*e*Pi-1/4*I*Pi*e*x^2*csgn(I*d)*csgn(I*(c*x^2+b*x+a)^n)*csgn(I*d*(c*x^2+b*x+a)^n)
+1/4*I*csgn(I*d*(c*x^2+b*x+a)^n)^2*csgn(I*(c*x^2+b*x+a)^n)*x^2*e*Pi-1/2*I*Pi*d*x*csgn(I*d*(c*x^2+b*x+a)^n)^3+1
/2*I*Pi*d*x*csgn(I*(c*x^2+b*x+a)^n)*csgn(I*d*(c*x^2+b*x+a)^n)^2+1/2*ln(d)*e*x^2-1/2*e*n*x^2+ln(d)*d*x+1/2/c*n*
ln(-4*a*b*c*e+8*a*c^2*d+b^3*e-2*b^2*c*d-2*(-4*a*b^2*c*e^2+16*a*b*c^2*d*e-16*a*c^3*d^2+b^4*e^2-4*b^3*c*d*e+4*b^
2*c^2*d^2)^(1/2)*c*x-(-4*a*b^2*c*e^2+16*a*b*c^2*d*e-16*a*c^3*d^2+b^4*e^2-4*b^3*c*d*e+4*b^2*c^2*d^2)^(1/2)*b)*a
*e-1/4/c^2*n*ln(-4*a*b*c*e+8*a*c^2*d+b^3*e-2*b^2*c*d-2*(-4*a*b^2*c*e^2+16*a*b*c^2*d*e-16*a*c^3*d^2+b^4*e^2-4*b
^3*c*d*e+4*b^2*c^2*d^2)^(1/2)*c*x-(-4*a*b^2*c*e^2+16*a*b*c^2*d*e-16*a*c^3*d^2+b^4*e^2-4*b^3*c*d*e+4*b^2*c^2*d^
2)^(1/2)*b)*b^2*e+1/2/c*n*ln(-4*a*b*c*e+8*a*c^2*d+b^3*e-2*b^2*c*d-2*(-4*a*b^2*c*e^2+16*a*b*c^2*d*e-16*a*c^3*d^
2+b^4*e^2-4*b^3*c*d*e+4*b^2*c^2*d^2)^(1/2)*c*x-(-4*a*b^2*c*e^2+16*a*b*c^2*d*e-16*a*c^3*d^2+b^4*e^2-4*b^3*c*d*e
+4*b^2*c^2*d^2)^(1/2)*b)*b*d+1/2/c*n*ln(-4*a*b*c*e+8*a*c^2*d+b^3*e-2*b^2*c*d+2*(-4*a*b^2*c*e^2+16*a*b*c^2*d*e-
16*a*c^3*d^2+b^4*e^2-4*b^3*c*d*e+4*b^2*c^2*d^2)^(1/2)*c*x+(-4*a*b^2*c*e^2+16*a*b*c^2*d*e-16*a*c^3*d^2+b^4*e^2-
4*b^3*c*d*e+4*b^2*c^2*d^2)^(1/2)*b)*a*e-1/4/c^2*n*ln(-4*a*b*c*e+8*a*c^2*d+b^3*e-2*b^2*c*d+2*(-4*a*b^2*c*e^2+16
*a*b*c^2*d*e-16*a*c^3*d^2+b^4*e^2-4*b^3*c*d*e+4*b^2*c^2*d^2)^(1/2)*c*x+(-4*a*b^2*c*e^2+16*a*b*c^2*d*e-16*a*c^3
*d^2+b^4*e^2-4*b^3*c*d*e+4*b^2*c^2*d^2)^(1/2)*b)*b^2*e+1/2/c*n*ln(-4*a*b*c*e+8*a*c^2*d+b^3*e-2*b^2*c*d+2*(-4*a
*b^2*c*e^2+16*a*b*c^2*d*e-16*a*c^3*d^2+b^4*e^2-4*b^3*c*d*e+4*b^2*c^2*d^2)^(1/2)*c*x+(-4*a*b^2*c*e^2+16*a*b*c^2
*d*e-16*a*c^3*d^2+b^4*e^2-4*b^3*c*d*e+4*b^2*c^2*d^2)^(1/2)*b)*b*d+1/2/c*b*e*n*x-2*d*n*x+1/4/c^2*n*ln(-4*a*b*c*
e+8*a*c^2*d+b^3*e-2*b^2*c*d-2*(-4*a*b^2*c*e^2+16*a*b*c^2*d*e-16*a*c^3*d^2+b^4*e^2-4*b^3*c*d*e+4*b^2*c^2*d^2)^(
1/2)*c*x-(-4*a*b^2*c*e^2+16*a*b*c^2*d*e-16*a*c^3*d^2+b^4*e^2-4*b^3*c*d*e+4*b^2*c^2*d^2)^(1/2)*b)*(-4*a*b^2*c*e
^2+16*a*b*c^2*d*e-16*a*c^3*d^2+b^4*e^2-4*b^3*c*d*e+4*b^2*c^2*d^2)^(1/2)-1/4/c^2*n*ln(-4*a*b*c*e+8*a*c^2*d+b^3*
e-2*b^2*c*d+2*(-4*a*b^2*c*e^2+16*a*b*c^2*d*e-16*a*c^3*d^2+b^4*e^2-4*b^3*c*d*e+4*b^2*c^2*d^2)^(1/2)*c*x+(-4*a*b
^2*c*e^2+16*a*b*c^2*d*e-16*a*c^3*d^2+b^4*e^2-4*b^3*c*d*e+4*b^2*c^2*d^2)^(1/2)*b)*(-4*a*b^2*c*e^2+16*a*b*c^2*d*
e-16*a*c^3*d^2+b^4*e^2-4*b^3*c*d*e+4*b^2*c^2*d^2)^(1/2)

________________________________________________________________________________________

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((e*x+d)*log(d*(c*x^2+b*x+a)^n),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*a*c-b^2>0)', see `assume?` f
or more details)Is 4*a*c-b^2 positive or negative?

________________________________________________________________________________________

mupad [B]  time = 0.59, size = 242, normalized size = 1.57 \[ \ln \left (d\,{\left (c\,x^2+b\,x+a\right )}^n\right )\,\left (\frac {e\,x^2}{2}+d\,x\right )-x\,\left (\frac {n\,\left (b\,e+4\,c\,d\right )}{2\,c}-\frac {b\,e\,n}{c}\right )-\frac {e\,n\,x^2}{2}+\frac {\ln \left (4\,a\,c+b\,\sqrt {b^2-4\,a\,c}-b^2+2\,c\,x\,\sqrt {b^2-4\,a\,c}\right )\,\left (c\,\left (\frac {a\,e\,n}{2}+\frac {b\,d\,n}{2}-\frac {d\,n\,\sqrt {b^2-4\,a\,c}}{2}\right )-\frac {b^2\,e\,n}{4}+\frac {b\,e\,n\,\sqrt {b^2-4\,a\,c}}{4}\right )}{c^2}-\frac {\ln \left (b\,\sqrt {b^2-4\,a\,c}-4\,a\,c+b^2+2\,c\,x\,\sqrt {b^2-4\,a\,c}\right )\,\left (\frac {b^2\,e\,n}{4}-c\,\left (\frac {a\,e\,n}{2}+\frac {b\,d\,n}{2}+\frac {d\,n\,\sqrt {b^2-4\,a\,c}}{2}\right )+\frac {b\,e\,n\,\sqrt {b^2-4\,a\,c}}{4}\right )}{c^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

log(d*(a + b*x + c*x^2)^n)*(d*x + (e*x^2)/2) - x*((n*(b*e + 4*c*d))/(2*c) - (b*e*n)/c) - (e*n*x^2)/2 + (log(4*
a*c + b*(b^2 - 4*a*c)^(1/2) - b^2 + 2*c*x*(b^2 - 4*a*c)^(1/2))*(c*((a*e*n)/2 + (b*d*n)/2 - (d*n*(b^2 - 4*a*c)^
(1/2))/2) - (b^2*e*n)/4 + (b*e*n*(b^2 - 4*a*c)^(1/2))/4))/c^2 - (log(b*(b^2 - 4*a*c)^(1/2) - 4*a*c + b^2 + 2*c
*x*(b^2 - 4*a*c)^(1/2))*((b^2*e*n)/4 - c*((a*e*n)/2 + (b*d*n)/2 + (d*n*(b^2 - 4*a*c)^(1/2))/2) + (b*e*n*(b^2 -
 4*a*c)^(1/2))/4))/c^2

________________________________________________________________________________________

sympy [A]  time = 158.89, size = 394, normalized size = 2.56 \[ \begin {cases} \frac {a e n \log {\left (a + b x + c x^{2} \right )}}{2 c} - \frac {b^{2} e n \log {\left (a + b x + c x^{2} \right )}}{4 c^{2}} + \frac {b d n \log {\left (a + b x + c x^{2} \right )}}{2 c} + \frac {b e n x}{2 c} + \frac {b e n \sqrt {- 4 a c + b^{2}} \log {\left (a + b x + c x^{2} \right )}}{4 c^{2}} - \frac {b e n \sqrt {- 4 a c + b^{2}} \log {\left (\frac {b}{2 c} + x + \frac {\sqrt {- 4 a c + b^{2}}}{2 c} \right )}}{2 c^{2}} + d n x \log {\left (a + b x + c x^{2} \right )} - 2 d n x + d x \log {\relax (d )} + \frac {e n x^{2} \log {\left (a + b x + c x^{2} \right )}}{2} - \frac {e n x^{2}}{2} + \frac {e x^{2} \log {\relax (d )}}{2} - \frac {d n \sqrt {- 4 a c + b^{2}} \log {\left (a + b x + c x^{2} \right )}}{2 c} + \frac {d n \sqrt {- 4 a c + b^{2}} \log {\left (\frac {b}{2 c} + x + \frac {\sqrt {- 4 a c + b^{2}}}{2 c} \right )}}{c} & \text {for}\: c \neq 0 \\- \frac {a^{2} e n \log {\left (a + b x \right )}}{2 b^{2}} + \frac {a d n \log {\left (a + b x \right )}}{b} + \frac {a e n x}{2 b} + d n x \log {\left (a + b x \right )} - d n x + d x \log {\relax (d )} + \frac {e n x^{2} \log {\left (a + b x \right )}}{2} - \frac {e n x^{2}}{4} + \frac {e x^{2} \log {\relax (d )}}{2} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((a*e*n*log(a + b*x + c*x**2)/(2*c) - b**2*e*n*log(a + b*x + c*x**2)/(4*c**2) + b*d*n*log(a + b*x + c
*x**2)/(2*c) + b*e*n*x/(2*c) + b*e*n*sqrt(-4*a*c + b**2)*log(a + b*x + c*x**2)/(4*c**2) - b*e*n*sqrt(-4*a*c +
b**2)*log(b/(2*c) + x + sqrt(-4*a*c + b**2)/(2*c))/(2*c**2) + d*n*x*log(a + b*x + c*x**2) - 2*d*n*x + d*x*log(
d) + e*n*x**2*log(a + b*x + c*x**2)/2 - e*n*x**2/2 + e*x**2*log(d)/2 - d*n*sqrt(-4*a*c + b**2)*log(a + b*x + c
*x**2)/(2*c) + d*n*sqrt(-4*a*c + b**2)*log(b/(2*c) + x + sqrt(-4*a*c + b**2)/(2*c))/c, Ne(c, 0)), (-a**2*e*n*l
og(a + b*x)/(2*b**2) + a*d*n*log(a + b*x)/b + a*e*n*x/(2*b) + d*n*x*log(a + b*x) - d*n*x + d*x*log(d) + e*n*x*
*2*log(a + b*x)/2 - e*n*x**2/4 + e*x**2*log(d)/2, True))

________________________________________________________________________________________