\(\int (d+e x^2)^q (A+B x^2+C x^4) \, dx\) [260]

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

Optimal result

Integrand size = 22, antiderivative size = 161 \[ \int \left (d+e x^2\right )^q \left (A+B x^2+C x^4\right ) \, dx=-\frac {(3 C d-B e (5+2 q)) x \left (d+e x^2\right )^{1+q}}{e^2 (3+2 q) (5+2 q)}+\frac {C x^3 \left (d+e x^2\right )^{1+q}}{e (5+2 q)}+\frac {\left (3 C d^2-e (5+2 q) (B d-A e (3+2 q))\right ) x \left (d+e x^2\right )^q \left (1+\frac {e x^2}{d}\right )^{-q} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-q,\frac {3}{2},-\frac {e x^2}{d}\right )}{e^2 (3+2 q) (5+2 q)} \] Output:

-(3*C*d-B*e*(5+2*q))*x*(e*x^2+d)^(1+q)/e^2/(3+2*q)/(5+2*q)+C*x^3*(e*x^2+d) 
^(1+q)/e/(5+2*q)+(3*C*d^2-e*(5+2*q)*(B*d-A*e*(3+2*q)))*x*(e*x^2+d)^q*hyper 
geom([1/2, -q],[3/2],-e*x^2/d)/e^2/(3+2*q)/(5+2*q)/((1+e*x^2/d)^q)
 

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 101, normalized size of antiderivative = 0.63 \[ \int \left (d+e x^2\right )^q \left (A+B x^2+C x^4\right ) \, dx=\frac {1}{15} x \left (d+e x^2\right )^q \left (1+\frac {e x^2}{d}\right )^{-q} \left (15 A \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-q,\frac {3}{2},-\frac {e x^2}{d}\right )+5 B x^2 \operatorname {Hypergeometric2F1}\left (\frac {3}{2},-q,\frac {5}{2},-\frac {e x^2}{d}\right )+3 C x^4 \operatorname {Hypergeometric2F1}\left (\frac {5}{2},-q,\frac {7}{2},-\frac {e x^2}{d}\right )\right ) \] Input:

Integrate[(d + e*x^2)^q*(A + B*x^2 + C*x^4),x]
 

Output:

(x*(d + e*x^2)^q*(15*A*Hypergeometric2F1[1/2, -q, 3/2, -((e*x^2)/d)] + 5*B 
*x^2*Hypergeometric2F1[3/2, -q, 5/2, -((e*x^2)/d)] + 3*C*x^4*Hypergeometri 
c2F1[5/2, -q, 7/2, -((e*x^2)/d)]))/(15*(1 + (e*x^2)/d)^q)
 

Rubi [A] (verified)

Time = 0.29 (sec) , antiderivative size = 159, normalized size of antiderivative = 0.99, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {1473, 299, 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 \left (A+B x^2+C x^4\right ) \left (d+e x^2\right )^q \, dx\)

\(\Big \downarrow \) 1473

\(\displaystyle \frac {\int \left (e x^2+d\right )^q \left (A e (2 q+5)-(3 C d-B e (2 q+5)) x^2\right )dx}{e (2 q+5)}+\frac {C x^3 \left (d+e x^2\right )^{q+1}}{e (2 q+5)}\)

\(\Big \downarrow \) 299

\(\displaystyle \frac {\frac {\left (3 C d^2-e (2 q+5) (B d-A e (2 q+3))\right ) \int \left (e x^2+d\right )^qdx}{e (2 q+3)}-\frac {x \left (d+e x^2\right )^{q+1} (3 C d-B e (2 q+5))}{e (2 q+3)}}{e (2 q+5)}+\frac {C x^3 \left (d+e x^2\right )^{q+1}}{e (2 q+5)}\)

\(\Big \downarrow \) 238

\(\displaystyle \frac {\frac {\left (d+e x^2\right )^q \left (\frac {e x^2}{d}+1\right )^{-q} \left (3 C d^2-e (2 q+5) (B d-A e (2 q+3))\right ) \int \left (\frac {e x^2}{d}+1\right )^qdx}{e (2 q+3)}-\frac {x \left (d+e x^2\right )^{q+1} (3 C d-B e (2 q+5))}{e (2 q+3)}}{e (2 q+5)}+\frac {C x^3 \left (d+e x^2\right )^{q+1}}{e (2 q+5)}\)

\(\Big \downarrow \) 237

\(\displaystyle \frac {\frac {x \left (d+e x^2\right )^q \left (\frac {e x^2}{d}+1\right )^{-q} \operatorname {Hypergeometric2F1}\left (\frac {1}{2},-q,\frac {3}{2},-\frac {e x^2}{d}\right ) \left (3 C d^2-e (2 q+5) (B d-A e (2 q+3))\right )}{e (2 q+3)}-\frac {x \left (d+e x^2\right )^{q+1} (3 C d-B e (2 q+5))}{e (2 q+3)}}{e (2 q+5)}+\frac {C x^3 \left (d+e x^2\right )^{q+1}}{e (2 q+5)}\)

Input:

Int[(d + e*x^2)^q*(A + B*x^2 + C*x^4),x]
 

Output:

(C*x^3*(d + e*x^2)^(1 + q))/(e*(5 + 2*q)) + (-(((3*C*d - B*e*(5 + 2*q))*x* 
(d + e*x^2)^(1 + q))/(e*(3 + 2*q))) + ((3*C*d^2 - e*(5 + 2*q)*(B*d - A*e*( 
3 + 2*q)))*x*(d + e*x^2)^q*Hypergeometric2F1[1/2, -q, 3/2, -((e*x^2)/d)])/ 
(e*(3 + 2*q)*(1 + (e*x^2)/d)^q))/(e*(5 + 2*q))
 

Defintions of rubi rules used

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

rule 1473
Int[((d_) + (e_.)*(x_)^2)^(q_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_.), 
x_Symbol] :> Simp[c^p*x^(4*p - 1)*((d + e*x^2)^(q + 1)/(e*(4*p + 2*q + 1))) 
, x] + Simp[1/(e*(4*p + 2*q + 1))   Int[(d + e*x^2)^q*ExpandToSum[e*(4*p + 
2*q + 1)*(a + b*x^2 + c*x^4)^p - d*c^p*(4*p - 1)*x^(4*p - 2) - e*c^p*(4*p + 
 2*q + 1)*x^(4*p), x], x], x] /; FreeQ[{a, b, c, d, e, q}, x] && NeQ[b^2 - 
4*a*c, 0] && NeQ[c*d^2 - b*d*e + a*e^2, 0] && IGtQ[p, 0] &&  !LtQ[q, -1]
 
Maple [F]

\[\int \left (e \,x^{2}+d \right )^{q} \left (C \,x^{4}+B \,x^{2}+A \right )d x\]

Input:

int((e*x^2+d)^q*(C*x^4+B*x^2+A),x)
 

Output:

int((e*x^2+d)^q*(C*x^4+B*x^2+A),x)
 

Fricas [F]

\[ \int \left (d+e x^2\right )^q \left (A+B x^2+C x^4\right ) \, dx=\int { {\left (C x^{4} + B x^{2} + A\right )} {\left (e x^{2} + d\right )}^{q} \,d x } \] Input:

integrate((e*x^2+d)^q*(C*x^4+B*x^2+A),x, algorithm="fricas")
 

Output:

integral((C*x^4 + B*x^2 + A)*(e*x^2 + d)^q, x)
 

Sympy [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 10.78 (sec) , antiderivative size = 82, normalized size of antiderivative = 0.51 \[ \int \left (d+e x^2\right )^q \left (A+B x^2+C x^4\right ) \, dx=A d^{q} x {{}_{2}F_{1}\left (\begin {matrix} \frac {1}{2}, - q \\ \frac {3}{2} \end {matrix}\middle | {\frac {e x^{2} e^{i \pi }}{d}} \right )} + \frac {B d^{q} x^{3} {{}_{2}F_{1}\left (\begin {matrix} \frac {3}{2}, - q \\ \frac {5}{2} \end {matrix}\middle | {\frac {e x^{2} e^{i \pi }}{d}} \right )}}{3} + \frac {C d^{q} x^{5} {{}_{2}F_{1}\left (\begin {matrix} \frac {5}{2}, - q \\ \frac {7}{2} \end {matrix}\middle | {\frac {e x^{2} e^{i \pi }}{d}} \right )}}{5} \] Input:

integrate((e*x**2+d)**q*(C*x**4+B*x**2+A),x)
 

Output:

A*d**q*x*hyper((1/2, -q), (3/2,), e*x**2*exp_polar(I*pi)/d) + B*d**q*x**3* 
hyper((3/2, -q), (5/2,), e*x**2*exp_polar(I*pi)/d)/3 + C*d**q*x**5*hyper(( 
5/2, -q), (7/2,), e*x**2*exp_polar(I*pi)/d)/5
 

Maxima [F]

\[ \int \left (d+e x^2\right )^q \left (A+B x^2+C x^4\right ) \, dx=\int { {\left (C x^{4} + B x^{2} + A\right )} {\left (e x^{2} + d\right )}^{q} \,d x } \] Input:

integrate((e*x^2+d)^q*(C*x^4+B*x^2+A),x, algorithm="maxima")
 

Output:

integrate((C*x^4 + B*x^2 + A)*(e*x^2 + d)^q, x)
 

Giac [F]

\[ \int \left (d+e x^2\right )^q \left (A+B x^2+C x^4\right ) \, dx=\int { {\left (C x^{4} + B x^{2} + A\right )} {\left (e x^{2} + d\right )}^{q} \,d x } \] Input:

integrate((e*x^2+d)^q*(C*x^4+B*x^2+A),x, algorithm="giac")
 

Output:

integrate((C*x^4 + B*x^2 + A)*(e*x^2 + d)^q, x)
                                                                                    
                                                                                    
 

Mupad [F(-1)]

Timed out. \[ \int \left (d+e x^2\right )^q \left (A+B x^2+C x^4\right ) \, dx=\int {\left (e\,x^2+d\right )}^q\,\left (C\,x^4+B\,x^2+A\right ) \,d x \] Input:

int((d + e*x^2)^q*(A + B*x^2 + C*x^4),x)
 

Output:

int((d + e*x^2)^q*(A + B*x^2 + C*x^4), x)
 

Reduce [F]

\[ \int \left (d+e x^2\right )^q \left (A+B x^2+C x^4\right ) \, dx =\text {Too large to display} \] Input:

int((e*x^2+d)^q*(C*x^4+B*x^2+A),x)
 

Output:

(4*(d + e*x**2)**q*a*e**2*q**2*x + 16*(d + e*x**2)**q*a*e**2*q*x + 15*(d + 
 e*x**2)**q*a*e**2*x + 4*(d + e*x**2)**q*b*d*e*q**2*x + 10*(d + e*x**2)**q 
*b*d*e*q*x + 4*(d + e*x**2)**q*b*e**2*q**2*x**3 + 12*(d + e*x**2)**q*b*e** 
2*q*x**3 + 5*(d + e*x**2)**q*b*e**2*x**3 - 6*(d + e*x**2)**q*c*d**2*q*x + 
4*(d + e*x**2)**q*c*d*e*q**2*x**3 + 2*(d + e*x**2)**q*c*d*e*q*x**3 + 4*(d 
+ e*x**2)**q*c*e**2*q**2*x**5 + 8*(d + e*x**2)**q*c*e**2*q*x**5 + 3*(d + e 
*x**2)**q*c*e**2*x**5 + 64*int((d + e*x**2)**q/(8*d*q**3 + 36*d*q**2 + 46* 
d*q + 15*d + 8*e*q**3*x**2 + 36*e*q**2*x**2 + 46*e*q*x**2 + 15*e*x**2),x)* 
a*d*e**2*q**6 + 544*int((d + e*x**2)**q/(8*d*q**3 + 36*d*q**2 + 46*d*q + 1 
5*d + 8*e*q**3*x**2 + 36*e*q**2*x**2 + 46*e*q*x**2 + 15*e*x**2),x)*a*d*e** 
2*q**5 + 1760*int((d + e*x**2)**q/(8*d*q**3 + 36*d*q**2 + 46*d*q + 15*d + 
8*e*q**3*x**2 + 36*e*q**2*x**2 + 46*e*q*x**2 + 15*e*x**2),x)*a*d*e**2*q**4 
 + 2672*int((d + e*x**2)**q/(8*d*q**3 + 36*d*q**2 + 46*d*q + 15*d + 8*e*q* 
*3*x**2 + 36*e*q**2*x**2 + 46*e*q*x**2 + 15*e*x**2),x)*a*d*e**2*q**3 + 186 
0*int((d + e*x**2)**q/(8*d*q**3 + 36*d*q**2 + 46*d*q + 15*d + 8*e*q**3*x** 
2 + 36*e*q**2*x**2 + 46*e*q*x**2 + 15*e*x**2),x)*a*d*e**2*q**2 + 450*int(( 
d + e*x**2)**q/(8*d*q**3 + 36*d*q**2 + 46*d*q + 15*d + 8*e*q**3*x**2 + 36* 
e*q**2*x**2 + 46*e*q*x**2 + 15*e*x**2),x)*a*d*e**2*q - 32*int((d + e*x**2) 
**q/(8*d*q**3 + 36*d*q**2 + 46*d*q + 15*d + 8*e*q**3*x**2 + 36*e*q**2*x**2 
 + 46*e*q*x**2 + 15*e*x**2),x)*b*d**2*e*q**5 - 224*int((d + e*x**2)**q/...