Integrand size = 67, antiderivative size = 44 \[ \int \left (a+b x+c x^2\right )^p \left (-b c f (3+2 p)+d \left (2 b^2-2 a c+b^2 p\right )-2 c^2 f (3+2 p) x-2 c^2 d (3+2 p) x^2\right ) \, dx=\frac {(b d (2+p)-c f (3+2 p)-2 c d (1+p) x) \left (a+b x+c x^2\right )^{1+p}}{1+p} \] Output:
(b*d*(2+p)-c*f*(3+2*p)-2*c*d*(p+1)*x)*(c*x^2+b*x+a)^(p+1)/(p+1)
Time = 1.03 (sec) , antiderivative size = 44, normalized size of antiderivative = 1.00 \[ \int \left (a+b x+c x^2\right )^p \left (-b c f (3+2 p)+d \left (2 b^2-2 a c+b^2 p\right )-2 c^2 f (3+2 p) x-2 c^2 d (3+2 p) x^2\right ) \, dx=\frac {(a+x (b+c x))^{1+p} (b d (2+p)-c (f (3+2 p)+2 d (1+p) x))}{1+p} \] Input:
Integrate[(a + b*x + c*x^2)^p*(-(b*c*f*(3 + 2*p)) + d*(2*b^2 - 2*a*c + b^2 *p) - 2*c^2*f*(3 + 2*p)*x - 2*c^2*d*(3 + 2*p)*x^2),x]
Output:
((a + x*(b + c*x))^(1 + p)*(b*d*(2 + p) - c*(f*(3 + 2*p) + 2*d*(1 + p)*x)) )/(1 + p)
Time = 0.29 (sec) , antiderivative size = 56, normalized size of antiderivative = 1.27, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.045, Rules used = {2192, 27, 1104}
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 \left (a+b x+c x^2\right )^p \left (d \left (-2 a c+b^2 p+2 b^2\right )-b c f (2 p+3)-2 c^2 d (2 p+3) x^2-2 c^2 f (2 p+3) x\right ) \, dx\) |
\(\Big \downarrow \) 2192 |
\(\displaystyle \frac {\int c (2 p+3) (b d (p+2)-c f (2 p+3)) (b+2 c x) \left (c x^2+b x+a\right )^pdx}{c (2 p+3)}-2 c d x \left (a+b x+c x^2\right )^{p+1}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle (b d (p+2)-c f (2 p+3)) \int (b+2 c x) \left (c x^2+b x+a\right )^pdx-2 c d x \left (a+b x+c x^2\right )^{p+1}\) |
\(\Big \downarrow \) 1104 |
\(\displaystyle \frac {\left (a+b x+c x^2\right )^{p+1} (b d (p+2)-c f (2 p+3))}{p+1}-2 c d x \left (a+b x+c x^2\right )^{p+1}\) |
Input:
Int[(a + b*x + c*x^2)^p*(-(b*c*f*(3 + 2*p)) + d*(2*b^2 - 2*a*c + b^2*p) - 2*c^2*f*(3 + 2*p)*x - 2*c^2*d*(3 + 2*p)*x^2),x]
Output:
((b*d*(2 + p) - c*f*(3 + 2*p))*(a + b*x + c*x^2)^(1 + p))/(1 + p) - 2*c*d* x*(a + b*x + c*x^2)^(1 + p)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((d_) + (e_.)*(x_))*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol ] :> Simp[d*((a + b*x + c*x^2)^(p + 1)/(b*(p + 1))), x] /; FreeQ[{a, b, c, d, e, p}, x] && EqQ[2*c*d - b*e, 0]
Int[(Pq_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> With[{q = Expon[Pq, x], e = Coeff[Pq, x, Expon[Pq, x]]}, Simp[e*x^(q - 1)*((a + b*x + c*x^2)^(p + 1)/(c*(q + 2*p + 1))), x] + Simp[1/(c*(q + 2*p + 1)) Int[(a + b*x + c*x^2)^p*ExpandToSum[c*(q + 2*p + 1)*Pq - a*e*(q - 1)*x^(q - 2) - b *e*(q + p)*x^(q - 1) - c*e*(q + 2*p + 1)*x^q, x], x], x]] /; FreeQ[{a, b, c , p}, x] && PolyQ[Pq, x] && NeQ[b^2 - 4*a*c, 0] && !LeQ[p, -1]
Time = 1.46 (sec) , antiderivative size = 50, normalized size of antiderivative = 1.14
method | result | size |
gosper | \(\frac {\left (c \,x^{2}+b x +a \right )^{p +1} \left (-2 c d x p +b d p -2 c d x -2 c f p +2 b d -3 c f \right )}{p +1}\) | \(50\) |
risch | \(\frac {\left (-2 c^{2} d p \,x^{3}-b c d p \,x^{2}-2 c^{2} d \,x^{3}-2 c^{2} f p \,x^{2}-2 a c d p x +b^{2} d p x -2 b c f p x -3 c^{2} f \,x^{2}+a b d p -2 a d x c -2 a c f p +2 b^{2} d x -3 b c f x +2 d a b -3 a c f \right ) \left (c \,x^{2}+b x +a \right )^{p}}{p +1}\) | \(128\) |
norman | \(\frac {a \left (b d p -2 c f p +2 b d -3 c f \right ) {\mathrm e}^{p \ln \left (c \,x^{2}+b x +a \right )}}{p +1}-2 c^{2} d \,x^{3} {\mathrm e}^{p \ln \left (c \,x^{2}+b x +a \right )}-\frac {\left (2 a c d p -b^{2} d p +2 b c f p +2 a c d -2 b^{2} d +3 b c f \right ) x \,{\mathrm e}^{p \ln \left (c \,x^{2}+b x +a \right )}}{p +1}-\frac {c \left (b d p +2 c f p +3 c f \right ) x^{2} {\mathrm e}^{p \ln \left (c \,x^{2}+b x +a \right )}}{p +1}\) | \(161\) |
orering | \(-\frac {\left (-2 c d x p +b d p -2 c d x -2 c f p +2 b d -3 c f \right ) \left (c \,x^{2}+b x +a \right ) \left (c \,x^{2}+b x +a \right )^{p} \left (-b c f \left (3+2 p \right )+d \left (b^{2} p -2 a c +2 b^{2}\right )-2 c^{2} f \left (3+2 p \right ) x -2 c^{2} d \left (3+2 p \right ) x^{2}\right )}{\left (p +1\right ) \left (4 c^{2} d \,x^{2} p +6 c^{2} d \,x^{2}+4 c^{2} f x p -b^{2} d p +2 b c f p +6 c^{2} f x +2 a c d -2 b^{2} d +3 b c f \right )}\) | \(179\) |
parallelrisch | \(-\frac {2 x^{3} \left (c \,x^{2}+b x +a \right )^{p} a \,c^{2} d p +2 x^{3} \left (c \,x^{2}+b x +a \right )^{p} a \,c^{2} d +x^{2} \left (c \,x^{2}+b x +a \right )^{p} a b c d p +2 x^{2} \left (c \,x^{2}+b x +a \right )^{p} a \,c^{2} f p +3 x^{2} \left (c \,x^{2}+b x +a \right )^{p} a \,c^{2} f +2 x \left (c \,x^{2}+b x +a \right )^{p} a^{2} c d p -x \left (c \,x^{2}+b x +a \right )^{p} a \,b^{2} d p +2 x \left (c \,x^{2}+b x +a \right )^{p} a b c f p +2 x \left (c \,x^{2}+b x +a \right )^{p} a^{2} c d -2 x \left (c \,x^{2}+b x +a \right )^{p} a \,b^{2} d +3 x \left (c \,x^{2}+b x +a \right )^{p} a b c f -\left (c \,x^{2}+b x +a \right )^{p} a^{2} b d p +2 \left (c \,x^{2}+b x +a \right )^{p} a^{2} c f p -2 \left (c \,x^{2}+b x +a \right )^{p} a^{2} b d +3 \left (c \,x^{2}+b x +a \right )^{p} a^{2} c f}{a \left (p +1\right )}\) | \(322\) |
Input:
int((c*x^2+b*x+a)^p*(-b*c*f*(3+2*p)+d*(b^2*p-2*a*c+2*b^2)-2*c^2*f*(3+2*p)* x-2*c^2*d*(3+2*p)*x^2),x,method=_RETURNVERBOSE)
Output:
1/(p+1)*(c*x^2+b*x+a)^(p+1)*(-2*c*d*p*x+b*d*p-2*c*d*x-2*c*f*p+2*b*d-3*c*f)
Leaf count of result is larger than twice the leaf count of optimal. 122 vs. \(2 (45) = 90\).
Time = 0.07 (sec) , antiderivative size = 122, normalized size of antiderivative = 2.77 \[ \int \left (a+b x+c x^2\right )^p \left (-b c f (3+2 p)+d \left (2 b^2-2 a c+b^2 p\right )-2 c^2 f (3+2 p) x-2 c^2 d (3+2 p) x^2\right ) \, dx=-\frac {{\left (2 \, {\left (c^{2} d p + c^{2} d\right )} x^{3} - 2 \, a b d + 3 \, a c f + {\left (3 \, c^{2} f + {\left (b c d + 2 \, c^{2} f\right )} p\right )} x^{2} - {\left (a b d - 2 \, a c f\right )} p + {\left (3 \, b c f - 2 \, {\left (b^{2} - a c\right )} d + {\left (2 \, b c f - {\left (b^{2} - 2 \, a c\right )} d\right )} p\right )} x\right )} {\left (c x^{2} + b x + a\right )}^{p}}{p + 1} \] Input:
integrate((c*x^2+b*x+a)^p*(-b*c*f*(3+2*p)+d*(b^2*p-2*a*c+2*b^2)-2*c^2*f*(3 +2*p)*x-2*c^2*d*(3+2*p)*x^2),x, algorithm="fricas")
Output:
-(2*(c^2*d*p + c^2*d)*x^3 - 2*a*b*d + 3*a*c*f + (3*c^2*f + (b*c*d + 2*c^2* f)*p)*x^2 - (a*b*d - 2*a*c*f)*p + (3*b*c*f - 2*(b^2 - a*c)*d + (2*b*c*f - (b^2 - 2*a*c)*d)*p)*x)*(c*x^2 + b*x + a)^p/(p + 1)
Leaf count of result is larger than twice the leaf count of optimal. 483 vs. \(2 (41) = 82\).
Time = 61.66 (sec) , antiderivative size = 483, normalized size of antiderivative = 10.98 \[ \int \left (a+b x+c x^2\right )^p \left (-b c f (3+2 p)+d \left (2 b^2-2 a c+b^2 p\right )-2 c^2 f (3+2 p) x-2 c^2 d (3+2 p) x^2\right ) \, dx=\begin {cases} \frac {a b d p \left (a + b x + c x^{2}\right )^{p}}{p + 1} + \frac {2 a b d \left (a + b x + c x^{2}\right )^{p}}{p + 1} - \frac {2 a c d p x \left (a + b x + c x^{2}\right )^{p}}{p + 1} - \frac {2 a c d x \left (a + b x + c x^{2}\right )^{p}}{p + 1} - \frac {2 a c f p \left (a + b x + c x^{2}\right )^{p}}{p + 1} - \frac {3 a c f \left (a + b x + c x^{2}\right )^{p}}{p + 1} + \frac {b^{2} d p x \left (a + b x + c x^{2}\right )^{p}}{p + 1} + \frac {2 b^{2} d x \left (a + b x + c x^{2}\right )^{p}}{p + 1} - \frac {b c d p x^{2} \left (a + b x + c x^{2}\right )^{p}}{p + 1} - \frac {2 b c f p x \left (a + b x + c x^{2}\right )^{p}}{p + 1} - \frac {3 b c f x \left (a + b x + c x^{2}\right )^{p}}{p + 1} - \frac {2 c^{2} d p x^{3} \left (a + b x + c x^{2}\right )^{p}}{p + 1} - \frac {2 c^{2} d x^{3} \left (a + b x + c x^{2}\right )^{p}}{p + 1} - \frac {2 c^{2} f p x^{2} \left (a + b x + c x^{2}\right )^{p}}{p + 1} - \frac {3 c^{2} f x^{2} \left (a + b x + c x^{2}\right )^{p}}{p + 1} & \text {for}\: p \neq -1 \\b d \log {\left (\frac {b}{2 c} + x - \frac {\sqrt {- 4 a c + b^{2}}}{2 c} \right )} + b d \log {\left (\frac {b}{2 c} + x + \frac {\sqrt {- 4 a c + b^{2}}}{2 c} \right )} - 2 c d x - c f \log {\left (\frac {b}{2 c} + x - \frac {\sqrt {- 4 a c + b^{2}}}{2 c} \right )} - c f \log {\left (\frac {b}{2 c} + x + \frac {\sqrt {- 4 a c + b^{2}}}{2 c} \right )} & \text {otherwise} \end {cases} \] Input:
integrate((c*x**2+b*x+a)**p*(-b*c*f*(3+2*p)+d*(b**2*p-2*a*c+2*b**2)-2*c**2 *f*(3+2*p)*x-2*c**2*d*(3+2*p)*x**2),x)
Output:
Piecewise((a*b*d*p*(a + b*x + c*x**2)**p/(p + 1) + 2*a*b*d*(a + b*x + c*x* *2)**p/(p + 1) - 2*a*c*d*p*x*(a + b*x + c*x**2)**p/(p + 1) - 2*a*c*d*x*(a + b*x + c*x**2)**p/(p + 1) - 2*a*c*f*p*(a + b*x + c*x**2)**p/(p + 1) - 3*a *c*f*(a + b*x + c*x**2)**p/(p + 1) + b**2*d*p*x*(a + b*x + c*x**2)**p/(p + 1) + 2*b**2*d*x*(a + b*x + c*x**2)**p/(p + 1) - b*c*d*p*x**2*(a + b*x + c *x**2)**p/(p + 1) - 2*b*c*f*p*x*(a + b*x + c*x**2)**p/(p + 1) - 3*b*c*f*x* (a + b*x + c*x**2)**p/(p + 1) - 2*c**2*d*p*x**3*(a + b*x + c*x**2)**p/(p + 1) - 2*c**2*d*x**3*(a + b*x + c*x**2)**p/(p + 1) - 2*c**2*f*p*x**2*(a + b *x + c*x**2)**p/(p + 1) - 3*c**2*f*x**2*(a + b*x + c*x**2)**p/(p + 1), Ne( p, -1)), (b*d*log(b/(2*c) + x - sqrt(-4*a*c + b**2)/(2*c)) + b*d*log(b/(2* c) + x + sqrt(-4*a*c + b**2)/(2*c)) - 2*c*d*x - c*f*log(b/(2*c) + x - sqrt (-4*a*c + b**2)/(2*c)) - c*f*log(b/(2*c) + x + sqrt(-4*a*c + b**2)/(2*c)), True))
Leaf count of result is larger than twice the leaf count of optimal. 99 vs. \(2 (45) = 90\).
Time = 0.07 (sec) , antiderivative size = 99, normalized size of antiderivative = 2.25 \[ \int \left (a+b x+c x^2\right )^p \left (-b c f (3+2 p)+d \left (2 b^2-2 a c+b^2 p\right )-2 c^2 f (3+2 p) x-2 c^2 d (3+2 p) x^2\right ) \, dx=-\frac {{\left (2 \, c^{2} d {\left (p + 1\right )} x^{3} + {\left (c^{2} f {\left (2 \, p + 3\right )} + b c d p\right )} x^{2} + {\left (c f {\left (2 \, p + 3\right )} - b d {\left (p + 2\right )}\right )} a + {\left (b c f {\left (2 \, p + 3\right )} - b^{2} d {\left (p + 2\right )} + 2 \, a c d {\left (p + 1\right )}\right )} x\right )} {\left (c x^{2} + b x + a\right )}^{p}}{p + 1} \] Input:
integrate((c*x^2+b*x+a)^p*(-b*c*f*(3+2*p)+d*(b^2*p-2*a*c+2*b^2)-2*c^2*f*(3 +2*p)*x-2*c^2*d*(3+2*p)*x^2),x, algorithm="maxima")
Output:
-(2*c^2*d*(p + 1)*x^3 + (c^2*f*(2*p + 3) + b*c*d*p)*x^2 + (c*f*(2*p + 3) - b*d*(p + 2))*a + (b*c*f*(2*p + 3) - b^2*d*(p + 2) + 2*a*c*d*(p + 1))*x)*( c*x^2 + b*x + a)^p/(p + 1)
Leaf count of result is larger than twice the leaf count of optimal. 297 vs. \(2 (45) = 90\).
Time = 0.13 (sec) , antiderivative size = 297, normalized size of antiderivative = 6.75 \[ \int \left (a+b x+c x^2\right )^p \left (-b c f (3+2 p)+d \left (2 b^2-2 a c+b^2 p\right )-2 c^2 f (3+2 p) x-2 c^2 d (3+2 p) x^2\right ) \, dx=-\frac {2 \, {\left (c x^{2} + b x + a\right )}^{p} c^{2} d p x^{3} + {\left (c x^{2} + b x + a\right )}^{p} b c d p x^{2} + 2 \, {\left (c x^{2} + b x + a\right )}^{p} c^{2} f p x^{2} + 2 \, {\left (c x^{2} + b x + a\right )}^{p} c^{2} d x^{3} - {\left (c x^{2} + b x + a\right )}^{p} b^{2} d p x + 2 \, {\left (c x^{2} + b x + a\right )}^{p} a c d p x + 2 \, {\left (c x^{2} + b x + a\right )}^{p} b c f p x + 3 \, {\left (c x^{2} + b x + a\right )}^{p} c^{2} f x^{2} - {\left (c x^{2} + b x + a\right )}^{p} a b d p + 2 \, {\left (c x^{2} + b x + a\right )}^{p} a c f p - 2 \, {\left (c x^{2} + b x + a\right )}^{p} b^{2} d x + 2 \, {\left (c x^{2} + b x + a\right )}^{p} a c d x + 3 \, {\left (c x^{2} + b x + a\right )}^{p} b c f x - 2 \, {\left (c x^{2} + b x + a\right )}^{p} a b d + 3 \, {\left (c x^{2} + b x + a\right )}^{p} a c f}{p + 1} \] Input:
integrate((c*x^2+b*x+a)^p*(-b*c*f*(3+2*p)+d*(b^2*p-2*a*c+2*b^2)-2*c^2*f*(3 +2*p)*x-2*c^2*d*(3+2*p)*x^2),x, algorithm="giac")
Output:
-(2*(c*x^2 + b*x + a)^p*c^2*d*p*x^3 + (c*x^2 + b*x + a)^p*b*c*d*p*x^2 + 2* (c*x^2 + b*x + a)^p*c^2*f*p*x^2 + 2*(c*x^2 + b*x + a)^p*c^2*d*x^3 - (c*x^2 + b*x + a)^p*b^2*d*p*x + 2*(c*x^2 + b*x + a)^p*a*c*d*p*x + 2*(c*x^2 + b*x + a)^p*b*c*f*p*x + 3*(c*x^2 + b*x + a)^p*c^2*f*x^2 - (c*x^2 + b*x + a)^p* a*b*d*p + 2*(c*x^2 + b*x + a)^p*a*c*f*p - 2*(c*x^2 + b*x + a)^p*b^2*d*x + 2*(c*x^2 + b*x + a)^p*a*c*d*x + 3*(c*x^2 + b*x + a)^p*b*c*f*x - 2*(c*x^2 + b*x + a)^p*a*b*d + 3*(c*x^2 + b*x + a)^p*a*c*f)/(p + 1)
Time = 17.32 (sec) , antiderivative size = 121, normalized size of antiderivative = 2.75 \[ \int \left (a+b x+c x^2\right )^p \left (-b c f (3+2 p)+d \left (2 b^2-2 a c+b^2 p\right )-2 c^2 f (3+2 p) x-2 c^2 d (3+2 p) x^2\right ) \, dx=-{\left (c\,x^2+b\,x+a\right )}^p\,\left (\frac {x^2\,\left (3\,c^2\,f+2\,c^2\,f\,p+b\,c\,d\,p\right )}{p+1}+2\,c^2\,d\,x^3-\frac {a\,\left (2\,b\,d-3\,c\,f+b\,d\,p-2\,c\,f\,p\right )}{p+1}+\frac {x\,\left (2\,a\,c\,d-2\,b^2\,d+3\,b\,c\,f-b^2\,d\,p+2\,a\,c\,d\,p+2\,b\,c\,f\,p\right )}{p+1}\right ) \] Input:
int(-(a + b*x + c*x^2)^p*(2*c^2*f*x*(2*p + 3) - d*(b^2*p - 2*a*c + 2*b^2) + 2*c^2*d*x^2*(2*p + 3) + b*c*f*(2*p + 3)),x)
Output:
-(a + b*x + c*x^2)^p*((x^2*(3*c^2*f + 2*c^2*f*p + b*c*d*p))/(p + 1) + 2*c^ 2*d*x^3 - (a*(2*b*d - 3*c*f + b*d*p - 2*c*f*p))/(p + 1) + (x*(2*a*c*d - 2* b^2*d + 3*b*c*f - b^2*d*p + 2*a*c*d*p + 2*b*c*f*p))/(p + 1))
Time = 0.17 (sec) , antiderivative size = 127, normalized size of antiderivative = 2.89 \[ \int \left (a+b x+c x^2\right )^p \left (-b c f (3+2 p)+d \left (2 b^2-2 a c+b^2 p\right )-2 c^2 f (3+2 p) x-2 c^2 d (3+2 p) x^2\right ) \, dx=\frac {\left (c \,x^{2}+b x +a \right )^{p} \left (-2 c^{2} d p \,x^{3}-b c d p \,x^{2}-2 c^{2} d \,x^{3}-2 c^{2} f p \,x^{2}-2 a c d p x +b^{2} d p x -2 b c f p x -3 c^{2} f \,x^{2}+a b d p -2 a c d x -2 a c f p +2 b^{2} d x -3 b c f x +2 a b d -3 a c f \right )}{p +1} \] Input:
int((c*x^2+b*x+a)^p*(-b*c*f*(3+2*p)+d*(b^2*p-2*a*c+2*b^2)-2*c^2*f*(3+2*p)* x-2*c^2*d*(3+2*p)*x^2),x)
Output:
((a + b*x + c*x**2)**p*(a*b*d*p + 2*a*b*d - 2*a*c*d*p*x - 2*a*c*d*x - 2*a* c*f*p - 3*a*c*f + b**2*d*p*x + 2*b**2*d*x - b*c*d*p*x**2 - 2*b*c*f*p*x - 3 *b*c*f*x - 2*c**2*d*p*x**3 - 2*c**2*d*x**3 - 2*c**2*f*p*x**2 - 3*c**2*f*x* *2))/(p + 1)