Integrand size = 17, antiderivative size = 109 \[ \int x \log \left (d \left (a+b x+c x^2\right )^n\right ) \, dx=\frac {b n x}{2 c}-\frac {n x^2}{2}-\frac {b \sqrt {b^2-4 a c} n \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{2 c^2}-\frac {\left (b^2-2 a c\right ) n \log \left (a+b x+c x^2\right )}{4 c^2}+\frac {1}{2} x^2 \log \left (d \left (a+b x+c x^2\right )^n\right ) \] Output:
1/2*b*n*x/c-1/2*n*x^2-1/2*b*(-4*a*c+b^2)^(1/2)*n*arctanh((2*c*x+b)/(-4*a*c +b^2)^(1/2))/c^2-1/4*(-2*a*c+b^2)*n*ln(c*x^2+b*x+a)/c^2+1/2*x^2*ln(d*(c*x^ 2+b*x+a)^n)
Time = 0.09 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.86 \[ \int x \log \left (d \left (a+b x+c x^2\right )^n\right ) \, dx=-\frac {2 b \sqrt {b^2-4 a c} n \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )+\left (b^2-2 a c\right ) n \log (a+x (b+c x))-2 c x \left (n (b-c x)+c x \log \left (d (a+x (b+c x))^n\right )\right )}{4 c^2} \] Input:
Integrate[x*Log[d*(a + b*x + c*x^2)^n],x]
Output:
-1/4*(2*b*Sqrt[b^2 - 4*a*c]*n*ArcTanh[(b + 2*c*x)/Sqrt[b^2 - 4*a*c]] + (b^ 2 - 2*a*c)*n*Log[a + x*(b + c*x)] - 2*c*x*(n*(b - c*x) + c*x*Log[d*(a + x* (b + c*x))^n]))/c^2
Time = 0.34 (sec) , antiderivative size = 102, normalized size of antiderivative = 0.94, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {3005, 1200, 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 x \log \left (d \left (a+b x+c x^2\right )^n\right ) \, dx\) |
\(\Big \downarrow \) 3005 |
\(\displaystyle \frac {1}{2} x^2 \log \left (d \left (a+b x+c x^2\right )^n\right )-\frac {1}{2} n \int \frac {x^2 (b+2 c x)}{c x^2+b x+a}dx\) |
\(\Big \downarrow \) 1200 |
\(\displaystyle \frac {1}{2} x^2 \log \left (d \left (a+b x+c x^2\right )^n\right )-\frac {1}{2} n \int \left (-\frac {b}{c}+2 x+\frac {a b+\left (b^2-2 a c\right ) x}{c \left (c x^2+b x+a\right )}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{2} x^2 \log \left (d \left (a+b x+c x^2\right )^n\right )-\frac {1}{2} n \left (\frac {b \sqrt {b^2-4 a c} \text {arctanh}\left (\frac {b+2 c x}{\sqrt {b^2-4 a c}}\right )}{c^2}+\frac {\left (b^2-2 a c\right ) \log \left (a+b x+c x^2\right )}{2 c^2}-\frac {b x}{c}+x^2\right )\) |
Input:
Int[x*Log[d*(a + b*x + c*x^2)^n],x]
Output:
-1/2*(n*(-((b*x)/c) + x^2 + (b*Sqrt[b^2 - 4*a*c]*ArcTanh[(b + 2*c*x)/Sqrt[ b^2 - 4*a*c]])/c^2 + ((b^2 - 2*a*c)*Log[a + b*x + c*x^2])/(2*c^2))) + (x^2 *Log[d*(a + b*x + c*x^2)^n])/2
Int[(((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.))/((a_.) + (b_.)* (x_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*((f + g* x)^n/(a + b*x + c*x^2)), x], x] /; FreeQ[{a, b, c, d, e, f, g, m}, x] && In tegersQ[n]
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] - Simp[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] && RationalFunctionQ[RFx, x] && IGtQ[n, 0] && (EqQ[n, 1] || IntegerQ[m]) && NeQ[m, -1]
Time = 0.31 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.12
method | result | size |
parts | \(\frac {x^{2} \ln \left (d \left (c \,x^{2}+b x +a \right )^{n}\right )}{2}-\frac {n \left (-\frac {-c \,x^{2}+b x}{c}+\frac {\frac {\left (-2 a c +b^{2}\right ) \ln \left (c \,x^{2}+b x +a \right )}{2 c}+\frac {2 \left (a b -\frac {\left (-2 a c +b^{2}\right ) b}{2 c}\right ) \arctan \left (\frac {2 x c +b}{\sqrt {4 a c -b^{2}}}\right )}{\sqrt {4 a c -b^{2}}}}{c}\right )}{2}\) | \(122\) |
risch | \(\frac {x^{2} \ln \left (\left (c \,x^{2}+b x +a \right )^{n}\right )}{2}-\frac {i \pi \,x^{2} \operatorname {csgn}\left (i d \right ) \operatorname {csgn}\left (i \left (c \,x^{2}+b x +a \right )^{n}\right ) \operatorname {csgn}\left (i d \left (c \,x^{2}+b x +a \right )^{n}\right )}{4}+\frac {i {\operatorname {csgn}\left (i d \left (c \,x^{2}+b x +a \right )^{n}\right )}^{2} \operatorname {csgn}\left (i d \right ) x^{2} \pi }{4}+\frac {i {\operatorname {csgn}\left (i d \left (c \,x^{2}+b x +a \right )^{n}\right )}^{2} \operatorname {csgn}\left (i \left (c \,x^{2}+b x +a \right )^{n}\right ) x^{2} \pi }{4}-\frac {i \pi \,x^{2} {\operatorname {csgn}\left (i d \left (c \,x^{2}+b x +a \right )^{n}\right )}^{3}}{4}+\frac {\ln \left (d \right ) x^{2}}{2}-\frac {n \,x^{2}}{2}+\frac {n \ln \left (-2 \sqrt {-4 a \,b^{2} c +b^{4}}\, c x -4 a b c +b^{3}-\sqrt {-4 a \,b^{2} c +b^{4}}\, b \right ) a}{2 c}-\frac {n \ln \left (-2 \sqrt {-4 a \,b^{2} c +b^{4}}\, c x -4 a b c +b^{3}-\sqrt {-4 a \,b^{2} c +b^{4}}\, b \right ) b^{2}}{4 c^{2}}+\frac {n \ln \left (2 \sqrt {-4 a \,b^{2} c +b^{4}}\, c x -4 a b c +b^{3}+\sqrt {-4 a \,b^{2} c +b^{4}}\, b \right ) a}{2 c}-\frac {n \ln \left (2 \sqrt {-4 a \,b^{2} c +b^{4}}\, c x -4 a b c +b^{3}+\sqrt {-4 a \,b^{2} c +b^{4}}\, b \right ) b^{2}}{4 c^{2}}+\frac {b n x}{2 c}+\frac {n \ln \left (-2 \sqrt {-4 a \,b^{2} c +b^{4}}\, c x -4 a b c +b^{3}-\sqrt {-4 a \,b^{2} c +b^{4}}\, b \right ) \sqrt {-4 a \,b^{2} c +b^{4}}}{4 c^{2}}-\frac {n \ln \left (2 \sqrt {-4 a \,b^{2} c +b^{4}}\, c x -4 a b c +b^{3}+\sqrt {-4 a \,b^{2} c +b^{4}}\, b \right ) \sqrt {-4 a \,b^{2} c +b^{4}}}{4 c^{2}}\) | \(510\) |
Input:
int(x*ln(d*(c*x^2+b*x+a)^n),x,method=_RETURNVERBOSE)
Output:
1/2*x^2*ln(d*(c*x^2+b*x+a)^n)-1/2*n*(-1/c*(-c*x^2+b*x)+1/c*(1/2*(-2*a*c+b^ 2)/c*ln(c*x^2+b*x+a)+2*(a*b-1/2*(-2*a*c+b^2)*b/c)/(4*a*c-b^2)^(1/2)*arctan ((2*c*x+b)/(4*a*c-b^2)^(1/2))))
Time = 0.08 (sec) , antiderivative size = 245, normalized size of antiderivative = 2.25 \[ \int x \log \left (d \left (a+b x+c x^2\right )^n\right ) \, dx=\left [-\frac {2 \, c^{2} n x^{2} - 2 \, c^{2} x^{2} \log \left (d\right ) - 2 \, b c n x - \sqrt {b^{2} - 4 \, a c} b 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 ) - {\left (2 \, c^{2} n x^{2} - {\left (b^{2} - 2 \, a c\right )} n\right )} \log \left (c x^{2} + b x + a\right )}{4 \, c^{2}}, -\frac {2 \, c^{2} n x^{2} - 2 \, c^{2} x^{2} \log \left (d\right ) - 2 \, b c n x + 2 \, \sqrt {-b^{2} + 4 \, a c} b n \arctan \left (-\frac {\sqrt {-b^{2} + 4 \, a c} {\left (2 \, c x + b\right )}}{b^{2} - 4 \, a c}\right ) - {\left (2 \, c^{2} n x^{2} - {\left (b^{2} - 2 \, a c\right )} n\right )} \log \left (c x^{2} + b x + a\right )}{4 \, c^{2}}\right ] \] Input:
integrate(x*log(d*(c*x^2+b*x+a)^n),x, algorithm="fricas")
Output:
[-1/4*(2*c^2*n*x^2 - 2*c^2*x^2*log(d) - 2*b*c*n*x - sqrt(b^2 - 4*a*c)*b*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*c^2*n*x^2 - (b^2 - 2*a*c)*n)*log(c*x^2 + b*x + a))/c ^2, -1/4*(2*c^2*n*x^2 - 2*c^2*x^2*log(d) - 2*b*c*n*x + 2*sqrt(-b^2 + 4*a*c )*b*n*arctan(-sqrt(-b^2 + 4*a*c)*(2*c*x + b)/(b^2 - 4*a*c)) - (2*c^2*n*x^2 - (b^2 - 2*a*c)*n)*log(c*x^2 + b*x + a))/c^2]
Leaf count of result is larger than twice the leaf count of optimal. 359 vs. \(2 (102) = 204\).
Time = 95.06 (sec) , antiderivative size = 359, normalized size of antiderivative = 3.29 \[ \int x \log \left (d \left (a+b x+c x^2\right )^n\right ) \, dx=\begin {cases} - \frac {a^{2} \log {\left (d \left (a + b x\right )^{n} \right )}}{2 b^{2}} + \frac {a n x}{2 b} - \frac {n x^{2}}{4} + \frac {x^{2} \log {\left (d \left (a + b x\right )^{n} \right )}}{2} & \text {for}\: c = 0 \\- \frac {b^{2} \log {\left (d \left (\frac {b^{2}}{4 c} + b x + c x^{2}\right )^{n} \right )}}{8 c^{2}} + \frac {b n x}{2 c} - \frac {n x^{2}}{2} + \frac {x^{2} \log {\left (d \left (\frac {b^{2}}{4 c} + b x + c x^{2}\right )^{n} \right )}}{2} & \text {for}\: a = \frac {b^{2}}{4 c} \\\frac {2 a b n \log {\left (\frac {b}{2 c} + x + \frac {\sqrt {- 4 a c + b^{2}}}{2 c} \right )}}{c \sqrt {- 4 a c + b^{2}}} - \frac {a b \log {\left (d \left (a + b x + c x^{2}\right )^{n} \right )}}{c \sqrt {- 4 a c + b^{2}}} + \frac {a \log {\left (d \left (a + b x + c x^{2}\right )^{n} \right )}}{2 c} - \frac {b^{3} n \log {\left (\frac {b}{2 c} + x + \frac {\sqrt {- 4 a c + b^{2}}}{2 c} \right )}}{2 c^{2} \sqrt {- 4 a c + b^{2}}} + \frac {b^{3} \log {\left (d \left (a + b x + c x^{2}\right )^{n} \right )}}{4 c^{2} \sqrt {- 4 a c + b^{2}}} - \frac {b^{2} \log {\left (d \left (a + b x + c x^{2}\right )^{n} \right )}}{4 c^{2}} + \frac {b n x}{2 c} - \frac {n x^{2}}{2} + \frac {x^{2} \log {\left (d \left (a + b x + c x^{2}\right )^{n} \right )}}{2} & \text {otherwise} \end {cases} \] Input:
integrate(x*ln(d*(c*x**2+b*x+a)**n),x)
Output:
Piecewise((-a**2*log(d*(a + b*x)**n)/(2*b**2) + a*n*x/(2*b) - n*x**2/4 + x **2*log(d*(a + b*x)**n)/2, Eq(c, 0)), (-b**2*log(d*(b**2/(4*c) + b*x + c*x **2)**n)/(8*c**2) + b*n*x/(2*c) - n*x**2/2 + x**2*log(d*(b**2/(4*c) + b*x + c*x**2)**n)/2, Eq(a, b**2/(4*c))), (2*a*b*n*log(b/(2*c) + x + sqrt(-4*a* c + b**2)/(2*c))/(c*sqrt(-4*a*c + b**2)) - a*b*log(d*(a + b*x + c*x**2)**n )/(c*sqrt(-4*a*c + b**2)) + a*log(d*(a + b*x + c*x**2)**n)/(2*c) - b**3*n* log(b/(2*c) + x + sqrt(-4*a*c + b**2)/(2*c))/(2*c**2*sqrt(-4*a*c + b**2)) + b**3*log(d*(a + b*x + c*x**2)**n)/(4*c**2*sqrt(-4*a*c + b**2)) - b**2*lo g(d*(a + b*x + c*x**2)**n)/(4*c**2) + b*n*x/(2*c) - n*x**2/2 + x**2*log(d* (a + b*x + c*x**2)**n)/2, True))
Exception generated. \[ \int x \log \left (d \left (a+b x+c x^2\right )^n\right ) \, dx=\text {Exception raised: ValueError} \] Input:
integrate(x*log(d*(c*x^2+b*x+a)^n),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*a*c-b^2>0)', see `assume?` for more deta
Time = 0.14 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.04 \[ \int x \log \left (d \left (a+b x+c x^2\right )^n\right ) \, dx=\frac {1}{2} \, n x^{2} \log \left (c x^{2} + b x + a\right ) - \frac {1}{2} \, {\left (n - \log \left (d\right )\right )} x^{2} + \frac {b n x}{2 \, c} - \frac {{\left (b^{2} n - 2 \, a c n\right )} \log \left (c x^{2} + b x + a\right )}{4 \, c^{2}} + \frac {{\left (b^{3} n - 4 \, a b c n\right )} \arctan \left (\frac {2 \, c x + b}{\sqrt {-b^{2} + 4 \, a c}}\right )}{2 \, \sqrt {-b^{2} + 4 \, a c} c^{2}} \] Input:
integrate(x*log(d*(c*x^2+b*x+a)^n),x, algorithm="giac")
Output:
1/2*n*x^2*log(c*x^2 + b*x + a) - 1/2*(n - log(d))*x^2 + 1/2*b*n*x/c - 1/4* (b^2*n - 2*a*c*n)*log(c*x^2 + b*x + a)/c^2 + 1/2*(b^3*n - 4*a*b*c*n)*arcta n((2*c*x + b)/sqrt(-b^2 + 4*a*c))/(sqrt(-b^2 + 4*a*c)*c^2)
Time = 25.94 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.52 \[ \int x \log \left (d \left (a+b x+c x^2\right )^n\right ) \, dx=\frac {x^2\,\ln \left (d\,{\left (c\,x^2+b\,x+a\right )}^n\right )}{2}-\frac {n\,x^2}{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 (b^2\,n-2\,a\,c\,n+b\,n\,\sqrt {b^2-4\,a\,c}\right )}{4\,c^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 (2\,a\,c\,n-b^2\,n+b\,n\,\sqrt {b^2-4\,a\,c}\right )}{4\,c^2}+\frac {b\,n\,x}{2\,c} \] Input:
int(x*log(d*(a + b*x + c*x^2)^n),x)
Output:
(x^2*log(d*(a + b*x + c*x^2)^n))/2 - (n*x^2)/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*n - 2*a*c*n + b*n*(b^2 - 4*a*c)^(1/2)))/(4*c^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))*(2*a*c*n - b^2*n + b*n*(b^2 - 4*a*c)^(1/2)))/(4*c^2) + (b*n*x)/(2*c)
Time = 0.15 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.09 \[ \int x \log \left (d \left (a+b x+c x^2\right )^n\right ) \, dx=\frac {-2 \sqrt {4 a c -b^{2}}\, \mathit {atan} \left (\frac {2 c x +b}{\sqrt {4 a c -b^{2}}}\right ) b n +2 \,\mathrm {log}\left (\left (c \,x^{2}+b x +a \right )^{n} d \right ) a c -\mathrm {log}\left (\left (c \,x^{2}+b x +a \right )^{n} d \right ) b^{2}+2 \,\mathrm {log}\left (\left (c \,x^{2}+b x +a \right )^{n} d \right ) c^{2} x^{2}+2 b c n x -2 c^{2} n \,x^{2}}{4 c^{2}} \] Input:
int(x*log(d*(c*x^2+b*x+a)^n),x)
Output:
( - 2*sqrt(4*a*c - b**2)*atan((b + 2*c*x)/sqrt(4*a*c - b**2))*b*n + 2*log( (a + b*x + c*x**2)**n*d)*a*c - log((a + b*x + c*x**2)**n*d)*b**2 + 2*log(( a + b*x + c*x**2)**n*d)*c**2*x**2 + 2*b*c*n*x - 2*c**2*n*x**2)/(4*c**2)