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

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

Optimal result

Integrand size = 34, antiderivative size = 35 \[ \int \left (a+c x^2\right )^p \left (a d+b c (3+2 p) x+c d (3+2 p) x^2\right ) \, dx=\frac {(b (3+2 p)+2 d (1+p) x) \left (a+c x^2\right )^{1+p}}{2 (1+p)} \] Output:

(b*(3+2*p)+2*d*(p+1)*x)*(c*x^2+a)^(p+1)/(2*p+2)
 

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.

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

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

Output:

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

Rubi [A] (verified)

Time = 0.21 (sec) , antiderivative size = 41, normalized size of antiderivative = 1.17, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.088, Rules used = {2346, 27, 241}

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

\(\Big \downarrow \) 2346

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 241

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

Input:

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

Output:

(b*(3 + 2*p)*(a + c*x^2)^(1 + p))/(2*(1 + p)) + d*x*(a + c*x^2)^(1 + p)
 

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 241
Int[(x_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(a + b*x^2)^(p + 1)/ 
(2*b*(p + 1)), x] /; FreeQ[{a, b, p}, x] && NeQ[p, -1]
 

rule 2346
Int[(Pq_)*((a_) + (b_.)*(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^2)^(p + 1)/(b*( 
q + 2*p + 1))), x] + Simp[1/(b*(q + 2*p + 1))   Int[(a + b*x^2)^p*ExpandToS 
um[b*(q + 2*p + 1)*Pq - a*e*(q - 1)*x^(q - 2) - b*e*(q + 2*p + 1)*x^q, x], 
x], x]] /; FreeQ[{a, b, p}, x] && PolyQ[Pq, x] &&  !LeQ[p, -1]
 
Maple [A] (verified)

Time = 0.87 (sec) , antiderivative size = 36, normalized size of antiderivative = 1.03

method result size
gosper \(\frac {\left (c \,x^{2}+a \right )^{p +1} \left (2 d p x +2 b p +2 d x +3 b \right )}{2+2 p}\) \(36\)
risch \(\frac {\left (2 c d p \,x^{3}+2 b c p \,x^{2}+2 c d \,x^{3}+2 a d p x +3 b c \,x^{2}+2 a b p +2 a d x +3 a b \right ) \left (c \,x^{2}+a \right )^{p}}{2+2 p}\) \(68\)
norman \(a d x \,{\mathrm e}^{p \ln \left (c \,x^{2}+a \right )}+c d \,x^{3} {\mathrm e}^{p \ln \left (c \,x^{2}+a \right )}+\frac {a b \left (3+2 p \right ) {\mathrm e}^{p \ln \left (c \,x^{2}+a \right )}}{2+2 p}+\frac {b c \left (3+2 p \right ) x^{2} {\mathrm e}^{p \ln \left (c \,x^{2}+a \right )}}{2+2 p}\) \(87\)
orering \(\frac {\left (2 d p x +2 b p +2 d x +3 b \right ) \left (c \,x^{2}+a \right ) \left (c \,x^{2}+a \right )^{p} \left (a d +b c \left (3+2 p \right ) x +c d \left (3+2 p \right ) x^{2}\right )}{2 \left (p +1\right ) \left (2 c d \,x^{2} p +2 c b x p +3 c d \,x^{2}+3 c b x +a d \right )}\) \(97\)
parallelrisch \(\frac {2 x^{3} \left (c \,x^{2}+a \right )^{p} c^{2} d p +2 x^{3} \left (c \,x^{2}+a \right )^{p} c^{2} d +2 x^{2} \left (c \,x^{2}+a \right )^{p} b \,c^{2} p +3 x^{2} \left (c \,x^{2}+a \right )^{p} b \,c^{2}+2 x \left (c \,x^{2}+a \right )^{p} a c d p +2 x \left (c \,x^{2}+a \right )^{p} a c d +2 \left (c \,x^{2}+a \right )^{p} a b c p +3 \left (c \,x^{2}+a \right )^{p} a b c}{2 c \left (p +1\right )}\) \(146\)

Input:

int((c*x^2+a)^p*(a*d+b*c*(3+2*p)*x+c*d*(3+2*p)*x^2),x,method=_RETURNVERBOS 
E)
 

Output:

1/2/(p+1)*(c*x^2+a)^(p+1)*(2*d*p*x+2*b*p+2*d*x+3*b)
 

Fricas [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 64, normalized size of antiderivative = 1.83 \[ \int \left (a+c x^2\right )^p \left (a d+b c (3+2 p) x+c d (3+2 p) x^2\right ) \, dx=\frac {{\left (2 \, {\left (c d p + c d\right )} x^{3} + 2 \, a b p + {\left (2 \, b c p + 3 \, b c\right )} x^{2} + 3 \, a b + 2 \, {\left (a d p + a d\right )} x\right )} {\left (c x^{2} + a\right )}^{p}}{2 \, {\left (p + 1\right )}} \] Input:

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

Output:

1/2*(2*(c*d*p + c*d)*x^3 + 2*a*b*p + (2*b*c*p + 3*b*c)*x^2 + 3*a*b + 2*(a* 
d*p + a*d)*x)*(c*x^2 + a)^p/(p + 1)
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 207 vs. \(2 (29) = 58\).

Time = 3.38 (sec) , antiderivative size = 207, normalized size of antiderivative = 5.91 \[ \int \left (a+c x^2\right )^p \left (a d+b c (3+2 p) x+c d (3+2 p) x^2\right ) \, dx=\begin {cases} \frac {2 a b p \left (a + c x^{2}\right )^{p}}{2 p + 2} + \frac {3 a b \left (a + c x^{2}\right )^{p}}{2 p + 2} + \frac {2 a d p x \left (a + c x^{2}\right )^{p}}{2 p + 2} + \frac {2 a d x \left (a + c x^{2}\right )^{p}}{2 p + 2} + \frac {2 b c p x^{2} \left (a + c x^{2}\right )^{p}}{2 p + 2} + \frac {3 b c x^{2} \left (a + c x^{2}\right )^{p}}{2 p + 2} + \frac {2 c d p x^{3} \left (a + c x^{2}\right )^{p}}{2 p + 2} + \frac {2 c d x^{3} \left (a + c x^{2}\right )^{p}}{2 p + 2} & \text {for}\: p \neq -1 \\\frac {b \log {\left (x - \sqrt {- \frac {a}{c}} \right )}}{2} + \frac {b \log {\left (x + \sqrt {- \frac {a}{c}} \right )}}{2} + d x & \text {otherwise} \end {cases} \] Input:

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

Output:

Piecewise((2*a*b*p*(a + c*x**2)**p/(2*p + 2) + 3*a*b*(a + c*x**2)**p/(2*p 
+ 2) + 2*a*d*p*x*(a + c*x**2)**p/(2*p + 2) + 2*a*d*x*(a + c*x**2)**p/(2*p 
+ 2) + 2*b*c*p*x**2*(a + c*x**2)**p/(2*p + 2) + 3*b*c*x**2*(a + c*x**2)**p 
/(2*p + 2) + 2*c*d*p*x**3*(a + c*x**2)**p/(2*p + 2) + 2*c*d*x**3*(a + c*x* 
*2)**p/(2*p + 2), Ne(p, -1)), (b*log(x - sqrt(-a/c))/2 + b*log(x + sqrt(-a 
/c))/2 + d*x, True))
 

Maxima [A] (verification not implemented)

Time = 0.07 (sec) , antiderivative size = 54, normalized size of antiderivative = 1.54 \[ \int \left (a+c x^2\right )^p \left (a d+b c (3+2 p) x+c d (3+2 p) x^2\right ) \, dx=\frac {{\left (2 \, c d {\left (p + 1\right )} x^{3} + b c {\left (2 \, p + 3\right )} x^{2} + 2 \, a d {\left (p + 1\right )} x + a b {\left (2 \, p + 3\right )}\right )} {\left (c x^{2} + a\right )}^{p}}{2 \, {\left (p + 1\right )}} \] Input:

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

Output:

1/2*(2*c*d*(p + 1)*x^3 + b*c*(2*p + 3)*x^2 + 2*a*d*(p + 1)*x + a*b*(2*p + 
3))*(c*x^2 + a)^p/(p + 1)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 130 vs. \(2 (33) = 66\).

Time = 0.12 (sec) , antiderivative size = 130, normalized size of antiderivative = 3.71 \[ \int \left (a+c x^2\right )^p \left (a d+b c (3+2 p) x+c d (3+2 p) x^2\right ) \, dx=\frac {2 \, {\left (c x^{2} + a\right )}^{p} c d p x^{3} + 2 \, {\left (c x^{2} + a\right )}^{p} b c p x^{2} + 2 \, {\left (c x^{2} + a\right )}^{p} c d x^{3} + 2 \, {\left (c x^{2} + a\right )}^{p} a d p x + 3 \, {\left (c x^{2} + a\right )}^{p} b c x^{2} + 2 \, {\left (c x^{2} + a\right )}^{p} a b p + 2 \, {\left (c x^{2} + a\right )}^{p} a d x + 3 \, {\left (c x^{2} + a\right )}^{p} a b}{2 \, {\left (p + 1\right )}} \] Input:

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

Output:

1/2*(2*(c*x^2 + a)^p*c*d*p*x^3 + 2*(c*x^2 + a)^p*b*c*p*x^2 + 2*(c*x^2 + a) 
^p*c*d*x^3 + 2*(c*x^2 + a)^p*a*d*p*x + 3*(c*x^2 + a)^p*b*c*x^2 + 2*(c*x^2 
+ a)^p*a*b*p + 2*(c*x^2 + a)^p*a*d*x + 3*(c*x^2 + a)^p*a*b)/(p + 1)
 

Mupad [B] (verification not implemented)

Time = 15.37 (sec) , antiderivative size = 76, normalized size of antiderivative = 2.17 \[ \int \left (a+c x^2\right )^p \left (a d+b c (3+2 p) x+c d (3+2 p) x^2\right ) \, dx={\left (c\,x^2+a\right )}^p\,\left (\frac {a\,b\,\left (2\,p+3\right )}{2\,p+2}+\frac {2\,c\,d\,x^3\,\left (p+1\right )}{2\,p+2}+\frac {b\,c\,x^2\,\left (2\,p+3\right )}{2\,p+2}+\frac {2\,a\,d\,x\,\left (p+1\right )}{2\,p+2}\right ) \] Input:

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

Output:

(a + c*x^2)^p*((a*b*(2*p + 3))/(2*p + 2) + (2*c*d*x^3*(p + 1))/(2*p + 2) + 
 (b*c*x^2*(2*p + 3))/(2*p + 2) + (2*a*d*x*(p + 1))/(2*p + 2))
 

Reduce [B] (verification not implemented)

Time = 0.20 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.94 \[ \int \left (a+c x^2\right )^p \left (a d+b c (3+2 p) x+c d (3+2 p) x^2\right ) \, dx=\frac {\left (c \,x^{2}+a \right )^{p} \left (2 c d p \,x^{3}+2 b c p \,x^{2}+2 c d \,x^{3}+2 a d p x +3 b c \,x^{2}+2 a b p +2 a d x +3 a b \right )}{2 p +2} \] Input:

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

Output:

((a + c*x**2)**p*(2*a*b*p + 3*a*b + 2*a*d*p*x + 2*a*d*x + 2*b*c*p*x**2 + 3 
*b*c*x**2 + 2*c*d*p*x**3 + 2*c*d*x**3))/(2*(p + 1))