Integrand size = 23, antiderivative size = 119 \[ \int x^2 (c+d x) \left (c^2-d^2 x^2\right )^p \, dx=-\frac {c^2 \left (c^2-d^2 x^2\right )^{1+p}}{2 d^3 (1+p)}+\frac {\left (c^2-d^2 x^2\right )^{2+p}}{2 d^3 (2+p)}+\frac {1}{3} c x^3 \left (c^2-d^2 x^2\right )^p \left (1-\frac {d^2 x^2}{c^2}\right )^{-p} \operatorname {Hypergeometric2F1}\left (\frac {3}{2},-p,\frac {5}{2},\frac {d^2 x^2}{c^2}\right ) \] Output:
-1/2*c^2*(-d^2*x^2+c^2)^(p+1)/d^3/(p+1)+1/2*(-d^2*x^2+c^2)^(2+p)/d^3/(2+p) +1/3*c*x^3*(-d^2*x^2+c^2)^p*hypergeom([3/2, -p],[5/2],d^2*x^2/c^2)/((1-d^2 *x^2/c^2)^p)
Time = 0.21 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.87 \[ \int x^2 (c+d x) \left (c^2-d^2 x^2\right )^p \, dx=\frac {1}{6} \left (c^2-d^2 x^2\right )^p \left (-\frac {3 \left (c^2-d^2 x^2\right ) \left (c^2+d^2 (1+p) x^2\right )}{d^3 (1+p) (2+p)}+2 c x^3 \left (1-\frac {d^2 x^2}{c^2}\right )^{-p} \operatorname {Hypergeometric2F1}\left (\frac {3}{2},-p,\frac {5}{2},\frac {d^2 x^2}{c^2}\right )\right ) \] Input:
Integrate[x^2*(c + d*x)*(c^2 - d^2*x^2)^p,x]
Output:
((c^2 - d^2*x^2)^p*((-3*(c^2 - d^2*x^2)*(c^2 + d^2*(1 + p)*x^2))/(d^3*(1 + p)*(2 + p)) + (2*c*x^3*Hypergeometric2F1[3/2, -p, 5/2, (d^2*x^2)/c^2])/(1 - (d^2*x^2)/c^2)^p))/6
Time = 0.43 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.01, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {542, 243, 53, 279, 278, 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^2 (c+d x) \left (c^2-d^2 x^2\right )^p \, dx\) |
\(\Big \downarrow \) 542 |
\(\displaystyle c \int x^2 \left (c^2-d^2 x^2\right )^pdx+d \int x^3 \left (c^2-d^2 x^2\right )^pdx\) |
\(\Big \downarrow \) 243 |
\(\displaystyle c \int x^2 \left (c^2-d^2 x^2\right )^pdx+\frac {1}{2} d \int x^2 \left (c^2-d^2 x^2\right )^pdx^2\) |
\(\Big \downarrow \) 53 |
\(\displaystyle c \int x^2 \left (c^2-d^2 x^2\right )^pdx+\frac {1}{2} d \int \left (\frac {c^2 \left (c^2-d^2 x^2\right )^p}{d^2}-\frac {\left (c^2-d^2 x^2\right )^{p+1}}{d^2}\right )dx^2\) |
\(\Big \downarrow \) 279 |
\(\displaystyle c \left (c^2-d^2 x^2\right )^p \left (1-\frac {d^2 x^2}{c^2}\right )^{-p} \int x^2 \left (1-\frac {d^2 x^2}{c^2}\right )^pdx+\frac {1}{2} d \int \left (\frac {c^2 \left (c^2-d^2 x^2\right )^p}{d^2}-\frac {\left (c^2-d^2 x^2\right )^{p+1}}{d^2}\right )dx^2\) |
\(\Big \downarrow \) 278 |
\(\displaystyle \frac {1}{2} d \int \left (\frac {c^2 \left (c^2-d^2 x^2\right )^p}{d^2}-\frac {\left (c^2-d^2 x^2\right )^{p+1}}{d^2}\right )dx^2+\frac {1}{3} c x^3 \left (c^2-d^2 x^2\right )^p \left (1-\frac {d^2 x^2}{c^2}\right )^{-p} \operatorname {Hypergeometric2F1}\left (\frac {3}{2},-p,\frac {5}{2},\frac {d^2 x^2}{c^2}\right )\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{3} c x^3 \left (c^2-d^2 x^2\right )^p \left (1-\frac {d^2 x^2}{c^2}\right )^{-p} \operatorname {Hypergeometric2F1}\left (\frac {3}{2},-p,\frac {5}{2},\frac {d^2 x^2}{c^2}\right )+\frac {1}{2} d \left (\frac {\left (c^2-d^2 x^2\right )^{p+2}}{d^4 (p+2)}-\frac {c^2 \left (c^2-d^2 x^2\right )^{p+1}}{d^4 (p+1)}\right )\) |
Input:
Int[x^2*(c + d*x)*(c^2 - d^2*x^2)^p,x]
Output:
(d*(-((c^2*(c^2 - d^2*x^2)^(1 + p))/(d^4*(1 + p))) + (c^2 - d^2*x^2)^(2 + p)/(d^4*(2 + p))))/2 + (c*x^3*(c^2 - d^2*x^2)^p*Hypergeometric2F1[3/2, -p, 5/2, (d^2*x^2)/c^2])/(3*(1 - (d^2*x^2)/c^2)^p)
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int [ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0] && LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[1/2 Subst[In t[x^((m - 1)/2)*(a + b*x)^p, x], x, x^2], x] /; FreeQ[{a, b, m, p}, x] && I ntegerQ[(m - 1)/2]
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[a^p*(( c*x)^(m + 1)/(c*(m + 1)))*Hypergeometric2F1[-p, (m + 1)/2, (m + 1)/2 + 1, ( -b)*(x^2/a)], x] /; FreeQ[{a, b, c, m, p}, x] && !IGtQ[p, 0] && (ILtQ[p, 0 ] || GtQ[a, 0])
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[a^IntP art[p]*((a + b*x^2)^FracPart[p]/(1 + b*(x^2/a))^FracPart[p]) Int[(c*x)^m* (1 + b*(x^2/a))^p, x], x] /; FreeQ[{a, b, c, m, p}, x] && !IGtQ[p, 0] && !(ILtQ[p, 0] || GtQ[a, 0])
Int[(x_)^(m_.)*((c_) + (d_.)*(x_))*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c Int[x^m*(a + b*x^2)^p, x], x] + Simp[d Int[x^(m + 1)*(a + b*x^2 )^p, x], x] /; FreeQ[{a, b, c, d, p}, x] && IntegerQ[m] && !IntegerQ[2*p]
\[\int x^{2} \left (d x +c \right ) \left (-d^{2} x^{2}+c^{2}\right )^{p}d x\]
Input:
int(x^2*(d*x+c)*(-d^2*x^2+c^2)^p,x)
Output:
int(x^2*(d*x+c)*(-d^2*x^2+c^2)^p,x)
\[ \int x^2 (c+d x) \left (c^2-d^2 x^2\right )^p \, dx=\int { {\left (d x + c\right )} {\left (-d^{2} x^{2} + c^{2}\right )}^{p} x^{2} \,d x } \] Input:
integrate(x^2*(d*x+c)*(-d^2*x^2+c^2)^p,x, algorithm="fricas")
Output:
integral((d*x^3 + c*x^2)*(-d^2*x^2 + c^2)^p, x)
Leaf count of result is larger than twice the leaf count of optimal. 347 vs. \(2 (95) = 190\).
Time = 1.68 (sec) , antiderivative size = 382, normalized size of antiderivative = 3.21 \[ \int x^2 (c+d x) \left (c^2-d^2 x^2\right )^p \, dx=\frac {c c^{2 p} x^{3} {{}_{2}F_{1}\left (\begin {matrix} \frac {3}{2}, - p \\ \frac {5}{2} \end {matrix}\middle | {\frac {d^{2} x^{2} e^{2 i \pi }}{c^{2}}} \right )}}{3} + d \left (\begin {cases} \frac {x^{4} \left (c^{2}\right )^{p}}{4} & \text {for}\: d = 0 \\- \frac {c^{2} \log {\left (- \frac {c}{d} + x \right )}}{- 2 c^{2} d^{4} + 2 d^{6} x^{2}} - \frac {c^{2} \log {\left (\frac {c}{d} + x \right )}}{- 2 c^{2} d^{4} + 2 d^{6} x^{2}} - \frac {c^{2}}{- 2 c^{2} d^{4} + 2 d^{6} x^{2}} + \frac {d^{2} x^{2} \log {\left (- \frac {c}{d} + x \right )}}{- 2 c^{2} d^{4} + 2 d^{6} x^{2}} + \frac {d^{2} x^{2} \log {\left (\frac {c}{d} + x \right )}}{- 2 c^{2} d^{4} + 2 d^{6} x^{2}} & \text {for}\: p = -2 \\- \frac {c^{2} \log {\left (- \frac {c}{d} + x \right )}}{2 d^{4}} - \frac {c^{2} \log {\left (\frac {c}{d} + x \right )}}{2 d^{4}} - \frac {x^{2}}{2 d^{2}} & \text {for}\: p = -1 \\- \frac {c^{4} \left (c^{2} - d^{2} x^{2}\right )^{p}}{2 d^{4} p^{2} + 6 d^{4} p + 4 d^{4}} - \frac {c^{2} d^{2} p x^{2} \left (c^{2} - d^{2} x^{2}\right )^{p}}{2 d^{4} p^{2} + 6 d^{4} p + 4 d^{4}} + \frac {d^{4} p x^{4} \left (c^{2} - d^{2} x^{2}\right )^{p}}{2 d^{4} p^{2} + 6 d^{4} p + 4 d^{4}} + \frac {d^{4} x^{4} \left (c^{2} - d^{2} x^{2}\right )^{p}}{2 d^{4} p^{2} + 6 d^{4} p + 4 d^{4}} & \text {otherwise} \end {cases}\right ) \] Input:
integrate(x**2*(d*x+c)*(-d**2*x**2+c**2)**p,x)
Output:
c*c**(2*p)*x**3*hyper((3/2, -p), (5/2,), d**2*x**2*exp_polar(2*I*pi)/c**2) /3 + d*Piecewise((x**4*(c**2)**p/4, Eq(d, 0)), (-c**2*log(-c/d + x)/(-2*c* *2*d**4 + 2*d**6*x**2) - c**2*log(c/d + x)/(-2*c**2*d**4 + 2*d**6*x**2) - c**2/(-2*c**2*d**4 + 2*d**6*x**2) + d**2*x**2*log(-c/d + x)/(-2*c**2*d**4 + 2*d**6*x**2) + d**2*x**2*log(c/d + x)/(-2*c**2*d**4 + 2*d**6*x**2), Eq(p , -2)), (-c**2*log(-c/d + x)/(2*d**4) - c**2*log(c/d + x)/(2*d**4) - x**2/ (2*d**2), Eq(p, -1)), (-c**4*(c**2 - d**2*x**2)**p/(2*d**4*p**2 + 6*d**4*p + 4*d**4) - c**2*d**2*p*x**2*(c**2 - d**2*x**2)**p/(2*d**4*p**2 + 6*d**4* p + 4*d**4) + d**4*p*x**4*(c**2 - d**2*x**2)**p/(2*d**4*p**2 + 6*d**4*p + 4*d**4) + d**4*x**4*(c**2 - d**2*x**2)**p/(2*d**4*p**2 + 6*d**4*p + 4*d**4 ), True))
\[ \int x^2 (c+d x) \left (c^2-d^2 x^2\right )^p \, dx=\int { {\left (d x + c\right )} {\left (-d^{2} x^{2} + c^{2}\right )}^{p} x^{2} \,d x } \] Input:
integrate(x^2*(d*x+c)*(-d^2*x^2+c^2)^p,x, algorithm="maxima")
Output:
integrate((d*x + c)*(-d^2*x^2 + c^2)^p*x^2, x)
\[ \int x^2 (c+d x) \left (c^2-d^2 x^2\right )^p \, dx=\int { {\left (d x + c\right )} {\left (-d^{2} x^{2} + c^{2}\right )}^{p} x^{2} \,d x } \] Input:
integrate(x^2*(d*x+c)*(-d^2*x^2+c^2)^p,x, algorithm="giac")
Output:
integrate((d*x + c)*(-d^2*x^2 + c^2)^p*x^2, x)
Timed out. \[ \int x^2 (c+d x) \left (c^2-d^2 x^2\right )^p \, dx=\int x^2\,{\left (c^2-d^2\,x^2\right )}^p\,\left (c+d\,x\right ) \,d x \] Input:
int(x^2*(c^2 - d^2*x^2)^p*(c + d*x),x)
Output:
int(x^2*(c^2 - d^2*x^2)^p*(c + d*x), x)
\[ \int x^2 (c+d x) \left (c^2-d^2 x^2\right )^p \, dx=\frac {-4 \left (-d^{2} x^{2}+c^{2}\right )^{p} c^{4} p^{2}-8 \left (-d^{2} x^{2}+c^{2}\right )^{p} c^{4} p -3 \left (-d^{2} x^{2}+c^{2}\right )^{p} c^{4}-4 \left (-d^{2} x^{2}+c^{2}\right )^{p} c^{3} d \,p^{3} x -12 \left (-d^{2} x^{2}+c^{2}\right )^{p} c^{3} d \,p^{2} x -8 \left (-d^{2} x^{2}+c^{2}\right )^{p} c^{3} d p x -4 \left (-d^{2} x^{2}+c^{2}\right )^{p} c^{2} d^{2} p^{3} x^{2}-8 \left (-d^{2} x^{2}+c^{2}\right )^{p} c^{2} d^{2} p^{2} x^{2}-3 \left (-d^{2} x^{2}+c^{2}\right )^{p} c^{2} d^{2} p \,x^{2}+4 \left (-d^{2} x^{2}+c^{2}\right )^{p} c \,d^{3} p^{3} x^{3}+14 \left (-d^{2} x^{2}+c^{2}\right )^{p} c \,d^{3} p^{2} x^{3}+14 \left (-d^{2} x^{2}+c^{2}\right )^{p} c \,d^{3} p \,x^{3}+4 \left (-d^{2} x^{2}+c^{2}\right )^{p} c \,d^{3} x^{3}+4 \left (-d^{2} x^{2}+c^{2}\right )^{p} d^{4} p^{3} x^{4}+12 \left (-d^{2} x^{2}+c^{2}\right )^{p} d^{4} p^{2} x^{4}+11 \left (-d^{2} x^{2}+c^{2}\right )^{p} d^{4} p \,x^{4}+3 \left (-d^{2} x^{2}+c^{2}\right )^{p} d^{4} x^{4}+16 \left (\int \frac {\left (-d^{2} x^{2}+c^{2}\right )^{p}}{-4 d^{2} p^{2} x^{2}-8 d^{2} p \,x^{2}+4 c^{2} p^{2}-3 d^{2} x^{2}+8 c^{2} p +3 c^{2}}d x \right ) c^{5} d \,p^{5}+80 \left (\int \frac {\left (-d^{2} x^{2}+c^{2}\right )^{p}}{-4 d^{2} p^{2} x^{2}-8 d^{2} p \,x^{2}+4 c^{2} p^{2}-3 d^{2} x^{2}+8 c^{2} p +3 c^{2}}d x \right ) c^{5} d \,p^{4}+140 \left (\int \frac {\left (-d^{2} x^{2}+c^{2}\right )^{p}}{-4 d^{2} p^{2} x^{2}-8 d^{2} p \,x^{2}+4 c^{2} p^{2}-3 d^{2} x^{2}+8 c^{2} p +3 c^{2}}d x \right ) c^{5} d \,p^{3}+100 \left (\int \frac {\left (-d^{2} x^{2}+c^{2}\right )^{p}}{-4 d^{2} p^{2} x^{2}-8 d^{2} p \,x^{2}+4 c^{2} p^{2}-3 d^{2} x^{2}+8 c^{2} p +3 c^{2}}d x \right ) c^{5} d \,p^{2}+24 \left (\int \frac {\left (-d^{2} x^{2}+c^{2}\right )^{p}}{-4 d^{2} p^{2} x^{2}-8 d^{2} p \,x^{2}+4 c^{2} p^{2}-3 d^{2} x^{2}+8 c^{2} p +3 c^{2}}d x \right ) c^{5} d p}{2 d^{3} \left (4 p^{4}+20 p^{3}+35 p^{2}+25 p +6\right )} \] Input:
int(x^2*(d*x+c)*(-d^2*x^2+c^2)^p,x)
Output:
( - 4*(c**2 - d**2*x**2)**p*c**4*p**2 - 8*(c**2 - d**2*x**2)**p*c**4*p - 3 *(c**2 - d**2*x**2)**p*c**4 - 4*(c**2 - d**2*x**2)**p*c**3*d*p**3*x - 12*( c**2 - d**2*x**2)**p*c**3*d*p**2*x - 8*(c**2 - d**2*x**2)**p*c**3*d*p*x - 4*(c**2 - d**2*x**2)**p*c**2*d**2*p**3*x**2 - 8*(c**2 - d**2*x**2)**p*c**2 *d**2*p**2*x**2 - 3*(c**2 - d**2*x**2)**p*c**2*d**2*p*x**2 + 4*(c**2 - d** 2*x**2)**p*c*d**3*p**3*x**3 + 14*(c**2 - d**2*x**2)**p*c*d**3*p**2*x**3 + 14*(c**2 - d**2*x**2)**p*c*d**3*p*x**3 + 4*(c**2 - d**2*x**2)**p*c*d**3*x* *3 + 4*(c**2 - d**2*x**2)**p*d**4*p**3*x**4 + 12*(c**2 - d**2*x**2)**p*d** 4*p**2*x**4 + 11*(c**2 - d**2*x**2)**p*d**4*p*x**4 + 3*(c**2 - d**2*x**2)* *p*d**4*x**4 + 16*int((c**2 - d**2*x**2)**p/(4*c**2*p**2 + 8*c**2*p + 3*c* *2 - 4*d**2*p**2*x**2 - 8*d**2*p*x**2 - 3*d**2*x**2),x)*c**5*d*p**5 + 80*i nt((c**2 - d**2*x**2)**p/(4*c**2*p**2 + 8*c**2*p + 3*c**2 - 4*d**2*p**2*x* *2 - 8*d**2*p*x**2 - 3*d**2*x**2),x)*c**5*d*p**4 + 140*int((c**2 - d**2*x* *2)**p/(4*c**2*p**2 + 8*c**2*p + 3*c**2 - 4*d**2*p**2*x**2 - 8*d**2*p*x**2 - 3*d**2*x**2),x)*c**5*d*p**3 + 100*int((c**2 - d**2*x**2)**p/(4*c**2*p** 2 + 8*c**2*p + 3*c**2 - 4*d**2*p**2*x**2 - 8*d**2*p*x**2 - 3*d**2*x**2),x) *c**5*d*p**2 + 24*int((c**2 - d**2*x**2)**p/(4*c**2*p**2 + 8*c**2*p + 3*c* *2 - 4*d**2*p**2*x**2 - 8*d**2*p*x**2 - 3*d**2*x**2),x)*c**5*d*p)/(2*d**3* (4*p**4 + 20*p**3 + 35*p**2 + 25*p + 6))