\(\int \frac {(c+d x)^2 (a+b x^2)^p}{x} \, dx\) [16]

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 = 20, antiderivative size = 118 \[ \int \frac {(c+d x)^2 \left (a+b x^2\right )^p}{x} \, dx=\frac {d^2 \left (a+b x^2\right )^{1+p}}{2 b (1+p)}+2 c d 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 )-\frac {c^2 \left (a+b x^2\right )^{1+p} \operatorname {Hypergeometric2F1}\left (1,1+p,2+p,1+\frac {b x^2}{a}\right )}{2 a (1+p)} \] Output:

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

Mathematica [A] (verified)

Time = 0.07 (sec) , antiderivative size = 101, normalized size of antiderivative = 0.86 \[ \int \frac {(c+d x)^2 \left (a+b x^2\right )^p}{x} \, dx=\frac {1}{2} \left (a+b x^2\right )^p \left (4 c d x \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 )+\frac {\left (a+b x^2\right ) \left (a d^2-b c^2 \operatorname {Hypergeometric2F1}\left (1,1+p,2+p,1+\frac {b x^2}{a}\right )\right )}{a b (1+p)}\right ) \] Input:

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

Output:

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

Rubi [A] (verified)

Time = 0.41 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.350, Rules used = {543, 27, 238, 237, 354, 90, 75}

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

\(\Big \downarrow \) 543

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 238

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

\(\Big \downarrow \) 237

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

\(\Big \downarrow \) 354

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

\(\Big \downarrow \) 90

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

\(\Big \downarrow \) 75

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

Input:

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

Output:

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

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 75
Int[((b_.)*(x_))^(m_)*((c_) + (d_.)*(x_))^(n_), x_Symbol] :> Simp[((c + d*x 
)^(n + 1)/(d*(n + 1)*(-d/(b*c))^m))*Hypergeometric2F1[-m, n + 1, n + 2, 1 + 
 d*(x/c)], x] /; FreeQ[{b, c, d, m, n}, x] &&  !IntegerQ[n] && (IntegerQ[m] 
 || GtQ[-d/(b*c), 0])
 

rule 90
Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p 
_.), x_] :> Simp[b*(c + d*x)^(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + p + 2))), 
 x] + Simp[(a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)))/(d*f*(n + p 
+ 2))   Int[(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n, 
p}, x] && NeQ[n + p + 2, 0]
 

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 354
Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(q_.), x_S 
ymbol] :> Simp[1/2   Subst[Int[x^((m - 1)/2)*(a + b*x)^p*(c + d*x)^q, x], x 
, x^2], x] /; FreeQ[{a, b, c, d, p, q}, x] && NeQ[b*c - a*d, 0] && IntegerQ 
[(m - 1)/2]
 

rule 543
Int[(x_)^(m_.)*((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbo 
l] :> Module[{k}, Int[x^m*Sum[Binomial[n, 2*k]*c^(n - 2*k)*d^(2*k)*x^(2*k), 
 {k, 0, n/2}]*(a + b*x^2)^p, x] + Int[x^(m + 1)*Sum[Binomial[n, 2*k + 1]*c^ 
(n - 2*k - 1)*d^(2*k + 1)*x^(2*k), {k, 0, (n - 1)/2}]*(a + b*x^2)^p, x]] /; 
 FreeQ[{a, b, c, d, p}, x] && IGtQ[n, 1] && IntegerQ[m] &&  !IntegerQ[2*p] 
&&  !(EqQ[m, 1] && EqQ[b*c^2 + a*d^2, 0])
 
Maple [F]

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

Input:

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

Output:

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

Fricas [F]

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

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

Output:

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

Sympy [A] (verification not implemented)

Time = 4.14 (sec) , antiderivative size = 109, normalized size of antiderivative = 0.92 \[ \int \frac {(c+d x)^2 \left (a+b x^2\right )^p}{x} \, dx=2 a^{p} c d 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 {b^{p} c^{2} x^{2 p} \Gamma \left (- p\right ) {{}_{2}F_{1}\left (\begin {matrix} - p, - p \\ 1 - p \end {matrix}\middle | {\frac {a e^{i \pi }}{b x^{2}}} \right )}}{2 \Gamma \left (1 - p\right )} + d^{2} \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,x)
 

Output:

2*a**p*c*d*x*hyper((1/2, -p), (3/2,), b*x**2*exp_polar(I*pi)/a) - b**p*c** 
2*x**(2*p)*gamma(-p)*hyper((-p, -p), (1 - p,), a*exp_polar(I*pi)/(b*x**2)) 
/(2*gamma(1 - p)) + d**2*Piecewise((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), T 
rue))
 

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

\[ \int \frac {(c+d x)^2 \left (a+b x^2\right )^p}{x} \, dx=\frac {2 \left (b \,x^{2}+a \right )^{p} a \,d^{2} p^{2}+\left (b \,x^{2}+a \right )^{p} a \,d^{2} p +2 \left (b \,x^{2}+a \right )^{p} b \,c^{2} p^{2}+3 \left (b \,x^{2}+a \right )^{p} b \,c^{2} p +\left (b \,x^{2}+a \right )^{p} b \,c^{2}+4 \left (b \,x^{2}+a \right )^{p} b c d \,p^{2} x +4 \left (b \,x^{2}+a \right )^{p} b c d p x +2 \left (b \,x^{2}+a \right )^{p} b \,d^{2} p^{2} x^{2}+\left (b \,x^{2}+a \right )^{p} b \,d^{2} p \,x^{2}+8 \left (\int \frac {\left (b \,x^{2}+a \right )^{p}}{2 b p \,x^{3}+b \,x^{3}+2 a p x +a x}d x \right ) a b \,c^{2} p^{4}+16 \left (\int \frac {\left (b \,x^{2}+a \right )^{p}}{2 b p \,x^{3}+b \,x^{3}+2 a p x +a x}d x \right ) a b \,c^{2} p^{3}+10 \left (\int \frac {\left (b \,x^{2}+a \right )^{p}}{2 b p \,x^{3}+b \,x^{3}+2 a p x +a x}d x \right ) a b \,c^{2} p^{2}+2 \left (\int \frac {\left (b \,x^{2}+a \right )^{p}}{2 b p \,x^{3}+b \,x^{3}+2 a p x +a x}d x \right ) a b \,c^{2} p +16 \left (\int \frac {\left (b \,x^{2}+a \right )^{p}}{2 b p \,x^{2}+b \,x^{2}+2 a p +a}d x \right ) a b c d \,p^{4}+24 \left (\int \frac {\left (b \,x^{2}+a \right )^{p}}{2 b p \,x^{2}+b \,x^{2}+2 a p +a}d x \right ) a b c d \,p^{3}+8 \left (\int \frac {\left (b \,x^{2}+a \right )^{p}}{2 b p \,x^{2}+b \,x^{2}+2 a p +a}d x \right ) a b c d \,p^{2}}{2 b p \left (2 p^{2}+3 p +1\right )} \] Input:

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

Output:

(2*(a + b*x**2)**p*a*d**2*p**2 + (a + b*x**2)**p*a*d**2*p + 2*(a + b*x**2) 
**p*b*c**2*p**2 + 3*(a + b*x**2)**p*b*c**2*p + (a + b*x**2)**p*b*c**2 + 4* 
(a + b*x**2)**p*b*c*d*p**2*x + 4*(a + b*x**2)**p*b*c*d*p*x + 2*(a + b*x**2 
)**p*b*d**2*p**2*x**2 + (a + b*x**2)**p*b*d**2*p*x**2 + 8*int((a + b*x**2) 
**p/(2*a*p*x + a*x + 2*b*p*x**3 + b*x**3),x)*a*b*c**2*p**4 + 16*int((a + b 
*x**2)**p/(2*a*p*x + a*x + 2*b*p*x**3 + b*x**3),x)*a*b*c**2*p**3 + 10*int( 
(a + b*x**2)**p/(2*a*p*x + a*x + 2*b*p*x**3 + b*x**3),x)*a*b*c**2*p**2 + 2 
*int((a + b*x**2)**p/(2*a*p*x + a*x + 2*b*p*x**3 + b*x**3),x)*a*b*c**2*p + 
 16*int((a + b*x**2)**p/(2*a*p + a + 2*b*p*x**2 + b*x**2),x)*a*b*c*d*p**4 
+ 24*int((a + b*x**2)**p/(2*a*p + a + 2*b*p*x**2 + b*x**2),x)*a*b*c*d*p**3 
 + 8*int((a + b*x**2)**p/(2*a*p + a + 2*b*p*x**2 + b*x**2),x)*a*b*c*d*p**2 
)/(2*b*p*(2*p**2 + 3*p + 1))