\(\int (c+d x)^2 (a+b x^2)^p \, dx\) [15]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [F]
Fricas [F]
Sympy [A] (verification not implemented)
Maxima [F]
Giac [F]
Mupad [F(-1)]
Reduce [F]

Optimal result

Integrand size = 17, antiderivative size = 107 \[ \int (c+d x)^2 \left (a+b x^2\right )^p \, dx=\frac {d (c (3+2 p)+d (1+p) x) \left (a+b x^2\right )^{1+p}}{b \left (3+5 p+2 p^2\right )}+\left (c^2-\frac {a d^2}{3 b+2 b p}\right ) x \left (a+b x^2\right )^p \left (1+\frac {b x^2}{a}\right )^{-p} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-p,\frac {3}{2},-\frac {b x^2}{a}\right ) \] Output:

d*(c*(3+2*p)+d*(p+1)*x)*(b*x^2+a)^(p+1)/b/(2*p^2+5*p+3)+(c^2-a*d^2/(2*b*p+ 
3*b))*x*(b*x^2+a)^p*hypergeom([1/2, -p],[3/2],-b*x^2/a)/((1+b*x^2/a)^p)
 

Mathematica [A] (verified)

Time = 0.10 (sec) , antiderivative size = 133, normalized size of antiderivative = 1.24 \[ \int (c+d x)^2 \left (a+b x^2\right )^p \, dx=\frac {\left (a+b x^2\right )^p \left (1+\frac {b x^2}{a}\right )^{-p} \left (3 b c^2 (1+p) x \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-p,\frac {3}{2},-\frac {b x^2}{a}\right )+d \left (3 c \left (b x^2 \left (1+\frac {b x^2}{a}\right )^p+a \left (-1+\left (1+\frac {b x^2}{a}\right )^p\right )\right )+b d (1+p) x^3 \operatorname {Hypergeometric2F1}\left (\frac {3}{2},-p,\frac {5}{2},-\frac {b x^2}{a}\right )\right )\right )}{3 b (1+p)} \] Input:

Integrate[(c + d*x)^2*(a + b*x^2)^p,x]
 

Output:

((a + b*x^2)^p*(3*b*c^2*(1 + p)*x*Hypergeometric2F1[1/2, -p, 3/2, -((b*x^2 
)/a)] + d*(3*c*(b*x^2*(1 + (b*x^2)/a)^p + a*(-1 + (1 + (b*x^2)/a)^p)) + b* 
d*(1 + p)*x^3*Hypergeometric2F1[3/2, -p, 5/2, -((b*x^2)/a)])))/(3*b*(1 + p 
)*(1 + (b*x^2)/a)^p)
 

Rubi [A] (verified)

Time = 0.41 (sec) , antiderivative size = 126, normalized size of antiderivative = 1.18, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.294, Rules used = {497, 25, 455, 238, 237}

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 (c+d x)^2 \left (a+b x^2\right )^p \, dx\)

\(\Big \downarrow \) 497

\(\displaystyle \frac {\int -\left (\left (-b (2 p+3) c^2-2 b d (p+2) x c+a d^2\right ) \left (b x^2+a\right )^p\right )dx}{b (2 p+3)}+\frac {d (c+d x) \left (a+b x^2\right )^{p+1}}{b (2 p+3)}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {d (c+d x) \left (a+b x^2\right )^{p+1}}{b (2 p+3)}-\frac {\int \left (-b (2 p+3) c^2-2 b d (p+2) x c+a d^2\right ) \left (b x^2+a\right )^pdx}{b (2 p+3)}\)

\(\Big \downarrow \) 455

\(\displaystyle \frac {d (c+d x) \left (a+b x^2\right )^{p+1}}{b (2 p+3)}-\frac {\left (a d^2-b c^2 (2 p+3)\right ) \int \left (b x^2+a\right )^pdx-\frac {c d (p+2) \left (a+b x^2\right )^{p+1}}{p+1}}{b (2 p+3)}\)

\(\Big \downarrow \) 238

\(\displaystyle \frac {d (c+d x) \left (a+b x^2\right )^{p+1}}{b (2 p+3)}-\frac {\left (a+b x^2\right )^p \left (\frac {b x^2}{a}+1\right )^{-p} \left (a d^2-b c^2 (2 p+3)\right ) \int \left (\frac {b x^2}{a}+1\right )^pdx-\frac {c d (p+2) \left (a+b x^2\right )^{p+1}}{p+1}}{b (2 p+3)}\)

\(\Big \downarrow \) 237

\(\displaystyle \frac {d (c+d x) \left (a+b x^2\right )^{p+1}}{b (2 p+3)}-\frac {x \left (a+b x^2\right )^p \left (\frac {b x^2}{a}+1\right )^{-p} \left (a d^2-b c^2 (2 p+3)\right ) \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-p,\frac {3}{2},-\frac {b x^2}{a}\right )-\frac {c d (p+2) \left (a+b x^2\right )^{p+1}}{p+1}}{b (2 p+3)}\)

Input:

Int[(c + d*x)^2*(a + b*x^2)^p,x]
 

Output:

(d*(c + d*x)*(a + b*x^2)^(1 + p))/(b*(3 + 2*p)) - (-((c*d*(2 + p)*(a + b*x 
^2)^(1 + p))/(1 + p)) + ((a*d^2 - b*c^2*(3 + 2*p))*x*(a + b*x^2)^p*Hyperge 
ometric2F1[1/2, -p, 3/2, -((b*x^2)/a)])/(1 + (b*x^2)/a)^p)/(b*(3 + 2*p))
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 237
Int[((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[- 
p, 1/2, 1/2 + 1, (-b)*(x^2/a)], x] /; FreeQ[{a, b, p}, x] &&  !IntegerQ[2*p 
] && GtQ[a, 0]
 

rule 238
Int[((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[a^IntPart[p]*((a + b*x^2) 
^FracPart[p]/(1 + b*(x^2/a))^FracPart[p])   Int[(1 + b*(x^2/a))^p, x], x] / 
; FreeQ[{a, b, p}, x] &&  !IntegerQ[2*p] &&  !GtQ[a, 0]
 

rule 455
Int[((c_) + (d_.)*(x_))*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[d*(( 
a + b*x^2)^(p + 1)/(2*b*(p + 1))), x] + Simp[c   Int[(a + b*x^2)^p, x], x] 
/; FreeQ[{a, b, c, d, p}, x] &&  !LeQ[p, -1]
 

rule 497
Int[((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[ 
d*(c + d*x)^(n - 1)*((a + b*x^2)^(p + 1)/(b*(n + 2*p + 1))), x] + Simp[1/(b 
*(n + 2*p + 1))   Int[(c + d*x)^(n - 2)*(a + b*x^2)^p*Simp[b*c^2*(n + 2*p + 
 1) - a*d^2*(n - 1) + 2*b*c*d*(n + p)*x, x], x], x] /; FreeQ[{a, b, c, d, n 
, p}, x] && If[RationalQ[n], GtQ[n, 1], SumSimplerQ[n, -2]] && NeQ[n + 2*p 
+ 1, 0] && IntQuadraticQ[a, 0, b, c, d, n, p, x]
 
Maple [F]

\[\int \left (d x +c \right )^{2} \left (b \,x^{2}+a \right )^{p}d x\]

Input:

int((d*x+c)^2*(b*x^2+a)^p,x)
 

Output:

int((d*x+c)^2*(b*x^2+a)^p,x)
 

Fricas [F]

\[ \int (c+d x)^2 \left (a+b x^2\right )^p \, dx=\int { {\left (d x + c\right )}^{2} {\left (b x^{2} + a\right )}^{p} \,d x } \] Input:

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

Output:

integral((d^2*x^2 + 2*c*d*x + c^2)*(b*x^2 + a)^p, x)
 

Sympy [A] (verification not implemented)

Time = 4.52 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.91 \[ \int (c+d x)^2 \left (a+b x^2\right )^p \, dx=a^{p} c^{2} x {{}_{2}F_{1}\left (\begin {matrix} \frac {1}{2}, - p \\ \frac {3}{2} \end {matrix}\middle | {\frac {b x^{2} e^{i \pi }}{a}} \right )} + \frac {a^{p} d^{2} x^{3} {{}_{2}F_{1}\left (\begin {matrix} \frac {3}{2}, - p \\ \frac {5}{2} \end {matrix}\middle | {\frac {b x^{2} e^{i \pi }}{a}} \right )}}{3} + 2 c d \left (\begin {cases} \frac {a^{p} x^{2}}{2} & \text {for}\: b = 0 \\\frac {\begin {cases} \frac {\left (a + b x^{2}\right )^{p + 1}}{p + 1} & \text {for}\: p \neq -1 \\\log {\left (a + b x^{2} \right )} & \text {otherwise} \end {cases}}{2 b} & \text {otherwise} \end {cases}\right ) \] Input:

integrate((d*x+c)**2*(b*x**2+a)**p,x)
 

Output:

a**p*c**2*x*hyper((1/2, -p), (3/2,), b*x**2*exp_polar(I*pi)/a) + a**p*d**2 
*x**3*hyper((3/2, -p), (5/2,), b*x**2*exp_polar(I*pi)/a)/3 + 2*c*d*Piecewi 
se((a**p*x**2/2, Eq(b, 0)), (Piecewise(((a + b*x**2)**(p + 1)/(p + 1), Ne( 
p, -1)), (log(a + b*x**2), True))/(2*b), True))
 

Maxima [F]

\[ \int (c+d x)^2 \left (a+b x^2\right )^p \, dx=\int { {\left (d x + c\right )}^{2} {\left (b x^{2} + a\right )}^{p} \,d x } \] Input:

integrate((d*x+c)^2*(b*x^2+a)^p,x, algorithm="maxima")
 

Output:

integrate((d*x + c)^2*(b*x^2 + a)^p, x)
 

Giac [F]

\[ \int (c+d x)^2 \left (a+b x^2\right )^p \, dx=\int { {\left (d x + c\right )}^{2} {\left (b x^{2} + a\right )}^{p} \,d x } \] Input:

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

Output:

integrate((d*x + c)^2*(b*x^2 + a)^p, x)
 

Mupad [F(-1)]

Timed out. \[ \int (c+d x)^2 \left (a+b x^2\right )^p \, dx=\int {\left (b\,x^2+a\right )}^p\,{\left (c+d\,x\right )}^2 \,d x \] Input:

int((a + b*x^2)^p*(c + d*x)^2,x)
 

Output:

int((a + b*x^2)^p*(c + d*x)^2, x)
 

Reduce [F]

\[ \int (c+d x)^2 \left (a+b x^2\right )^p \, dx =\text {Too large to display} \] Input:

int((d*x+c)^2*(b*x^2+a)^p,x)
 

Output:

(4*(a + b*x**2)**p*a*c*d*p**2 + 8*(a + b*x**2)**p*a*c*d*p + 3*(a + b*x**2) 
**p*a*c*d + 2*(a + b*x**2)**p*a*d**2*p**2*x + 2*(a + b*x**2)**p*a*d**2*p*x 
 + 2*(a + b*x**2)**p*b*c**2*p**2*x + 5*(a + b*x**2)**p*b*c**2*p*x + 3*(a + 
 b*x**2)**p*b*c**2*x + 4*(a + b*x**2)**p*b*c*d*p**2*x**2 + 8*(a + b*x**2)* 
*p*b*c*d*p*x**2 + 3*(a + b*x**2)**p*b*c*d*x**2 + 2*(a + b*x**2)**p*b*d**2* 
p**2*x**3 + 3*(a + b*x**2)**p*b*d**2*p*x**3 + (a + b*x**2)**p*b*d**2*x**3 
- 8*int((a + b*x**2)**p/(4*a*p**2 + 8*a*p + 3*a + 4*b*p**2*x**2 + 8*b*p*x* 
*2 + 3*b*x**2),x)*a**2*d**2*p**4 - 24*int((a + b*x**2)**p/(4*a*p**2 + 8*a* 
p + 3*a + 4*b*p**2*x**2 + 8*b*p*x**2 + 3*b*x**2),x)*a**2*d**2*p**3 - 22*in 
t((a + b*x**2)**p/(4*a*p**2 + 8*a*p + 3*a + 4*b*p**2*x**2 + 8*b*p*x**2 + 3 
*b*x**2),x)*a**2*d**2*p**2 - 6*int((a + b*x**2)**p/(4*a*p**2 + 8*a*p + 3*a 
 + 4*b*p**2*x**2 + 8*b*p*x**2 + 3*b*x**2),x)*a**2*d**2*p + 16*int((a + b*x 
**2)**p/(4*a*p**2 + 8*a*p + 3*a + 4*b*p**2*x**2 + 8*b*p*x**2 + 3*b*x**2),x 
)*a*b*c**2*p**5 + 72*int((a + b*x**2)**p/(4*a*p**2 + 8*a*p + 3*a + 4*b*p** 
2*x**2 + 8*b*p*x**2 + 3*b*x**2),x)*a*b*c**2*p**4 + 116*int((a + b*x**2)**p 
/(4*a*p**2 + 8*a*p + 3*a + 4*b*p**2*x**2 + 8*b*p*x**2 + 3*b*x**2),x)*a*b*c 
**2*p**3 + 78*int((a + b*x**2)**p/(4*a*p**2 + 8*a*p + 3*a + 4*b*p**2*x**2 
+ 8*b*p*x**2 + 3*b*x**2),x)*a*b*c**2*p**2 + 18*int((a + b*x**2)**p/(4*a*p* 
*2 + 8*a*p + 3*a + 4*b*p**2*x**2 + 8*b*p*x**2 + 3*b*x**2),x)*a*b*c**2*p)/( 
b*(4*p**3 + 12*p**2 + 11*p + 3))