\(\int \frac {(1+2 x^2) (4-7 x^2+x^4)}{\sqrt {2+5 x^2+3 x^4}} \, dx\) [206]

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

Optimal result

Integrand size = 34, antiderivative size = 183 \[ \int \frac {\left (1+2 x^2\right ) \left (4-7 x^2+x^4\right )}{\sqrt {2+5 x^2+3 x^4}} \, dx=\frac {2377 x \left (2+3 x^2\right )}{405 \sqrt {2+5 x^2+3 x^4}}-\frac {47}{27} x \sqrt {2+5 x^2+3 x^4}+\frac {2}{15} x^3 \sqrt {2+5 x^2+3 x^4}-\frac {2377 \sqrt {2} \left (1+x^2\right ) \sqrt {\frac {2+3 x^2}{1+x^2}} E\left (\arctan (x)\left |-\frac {1}{2}\right .\right )}{405 \sqrt {2+5 x^2+3 x^4}}+\frac {101 \sqrt {2} \left (1+x^2\right ) \sqrt {\frac {2+3 x^2}{1+x^2}} \operatorname {EllipticF}\left (\arctan (x),-\frac {1}{2}\right )}{27 \sqrt {2+5 x^2+3 x^4}} \] Output:

2377/405*x*(3*x^2+2)/(3*x^4+5*x^2+2)^(1/2)-47/27*x*(3*x^4+5*x^2+2)^(1/2)+2 
/15*x^3*(3*x^4+5*x^2+2)^(1/2)-2377/405*2^(1/2)*(x^2+1)*((3*x^2+2)/(x^2+1)) 
^(1/2)*EllipticE(x/(x^2+1)^(1/2),1/2*I*2^(1/2))/(3*x^4+5*x^2+2)^(1/2)+101/ 
27*2^(1/2)*(x^2+1)*((3*x^2+2)/(x^2+1))^(1/2)*InverseJacobiAM(arctan(x),1/2 
*I*2^(1/2))/(3*x^4+5*x^2+2)^(1/2)
 

Mathematica [C] (verified)

Result contains complex when optimal does not.

Time = 10.12 (sec) , antiderivative size = 135, normalized size of antiderivative = 0.74 \[ \int \frac {\left (1+2 x^2\right ) \left (4-7 x^2+x^4\right )}{\sqrt {2+5 x^2+3 x^4}} \, dx=\frac {3 x \left (-470-1139 x^2-615 x^4+54 x^6\right )-2377 i \sqrt {3} \sqrt {1+x^2} \sqrt {2+3 x^2} E\left (i \text {arcsinh}\left (\sqrt {\frac {3}{2}} x\right )|\frac {2}{3}\right )+1367 i \sqrt {3} \sqrt {1+x^2} \sqrt {2+3 x^2} \operatorname {EllipticF}\left (i \text {arcsinh}\left (\sqrt {\frac {3}{2}} x\right ),\frac {2}{3}\right )}{405 \sqrt {2+5 x^2+3 x^4}} \] Input:

Integrate[((1 + 2*x^2)*(4 - 7*x^2 + x^4))/Sqrt[2 + 5*x^2 + 3*x^4],x]
 

Output:

(3*x*(-470 - 1139*x^2 - 615*x^4 + 54*x^6) - (2377*I)*Sqrt[3]*Sqrt[1 + x^2] 
*Sqrt[2 + 3*x^2]*EllipticE[I*ArcSinh[Sqrt[3/2]*x], 2/3] + (1367*I)*Sqrt[3] 
*Sqrt[1 + x^2]*Sqrt[2 + 3*x^2]*EllipticF[I*ArcSinh[Sqrt[3/2]*x], 2/3])/(40 
5*Sqrt[2 + 5*x^2 + 3*x^4])
 

Rubi [A] (verified)

Time = 0.41 (sec) , antiderivative size = 194, normalized size of antiderivative = 1.06, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.147, Rules used = {2207, 2207, 1503, 1413, 1456}

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 {\left (2 x^2+1\right ) \left (x^4-7 x^2+4\right )}{\sqrt {3 x^4+5 x^2+2}} \, dx\)

\(\Big \downarrow \) 2207

\(\displaystyle \frac {1}{15} \int \frac {-235 x^4+3 x^2+60}{\sqrt {3 x^4+5 x^2+2}}dx+\frac {2}{15} \sqrt {3 x^4+5 x^2+2} x^3\)

\(\Big \downarrow \) 2207

\(\displaystyle \frac {1}{15} \left (\frac {1}{9} \int \frac {2377 x^2+1010}{\sqrt {3 x^4+5 x^2+2}}dx-\frac {235}{9} x \sqrt {3 x^4+5 x^2+2}\right )+\frac {2}{15} \sqrt {3 x^4+5 x^2+2} x^3\)

\(\Big \downarrow \) 1503

\(\displaystyle \frac {1}{15} \left (\frac {1}{9} \left (1010 \int \frac {1}{\sqrt {3 x^4+5 x^2+2}}dx+2377 \int \frac {x^2}{\sqrt {3 x^4+5 x^2+2}}dx\right )-\frac {235}{9} x \sqrt {3 x^4+5 x^2+2}\right )+\frac {2}{15} \sqrt {3 x^4+5 x^2+2} x^3\)

\(\Big \downarrow \) 1413

\(\displaystyle \frac {1}{15} \left (\frac {1}{9} \left (2377 \int \frac {x^2}{\sqrt {3 x^4+5 x^2+2}}dx+\frac {505 \sqrt {2} \left (x^2+1\right ) \sqrt {\frac {3 x^2+2}{x^2+1}} \operatorname {EllipticF}\left (\arctan (x),-\frac {1}{2}\right )}{\sqrt {3 x^4+5 x^2+2}}\right )-\frac {235}{9} x \sqrt {3 x^4+5 x^2+2}\right )+\frac {2}{15} \sqrt {3 x^4+5 x^2+2} x^3\)

\(\Big \downarrow \) 1456

\(\displaystyle \frac {1}{15} \left (\frac {1}{9} \left (\frac {505 \sqrt {2} \left (x^2+1\right ) \sqrt {\frac {3 x^2+2}{x^2+1}} \operatorname {EllipticF}\left (\arctan (x),-\frac {1}{2}\right )}{\sqrt {3 x^4+5 x^2+2}}+2377 \left (\frac {x \left (3 x^2+2\right )}{3 \sqrt {3 x^4+5 x^2+2}}-\frac {\sqrt {2} \left (x^2+1\right ) \sqrt {\frac {3 x^2+2}{x^2+1}} E\left (\arctan (x)\left |-\frac {1}{2}\right .\right )}{3 \sqrt {3 x^4+5 x^2+2}}\right )\right )-\frac {235}{9} x \sqrt {3 x^4+5 x^2+2}\right )+\frac {2}{15} \sqrt {3 x^4+5 x^2+2} x^3\)

Input:

Int[((1 + 2*x^2)*(4 - 7*x^2 + x^4))/Sqrt[2 + 5*x^2 + 3*x^4],x]
 

Output:

(2*x^3*Sqrt[2 + 5*x^2 + 3*x^4])/15 + ((-235*x*Sqrt[2 + 5*x^2 + 3*x^4])/9 + 
 (2377*((x*(2 + 3*x^2))/(3*Sqrt[2 + 5*x^2 + 3*x^4]) - (Sqrt[2]*(1 + x^2)*S 
qrt[(2 + 3*x^2)/(1 + x^2)]*EllipticE[ArcTan[x], -1/2])/(3*Sqrt[2 + 5*x^2 + 
 3*x^4])) + (505*Sqrt[2]*(1 + x^2)*Sqrt[(2 + 3*x^2)/(1 + x^2)]*EllipticF[A 
rcTan[x], -1/2])/Sqrt[2 + 5*x^2 + 3*x^4])/9)/15
 

Defintions of rubi rules used

rule 1413
Int[1/Sqrt[(a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4], x_Symbol] :> With[{q = Rt[b 
^2 - 4*a*c, 2]}, Simp[(2*a + (b - q)*x^2)*(Sqrt[(2*a + (b + q)*x^2)/(2*a + 
(b - q)*x^2)]/(2*a*Rt[(b - q)/(2*a), 2]*Sqrt[a + b*x^2 + c*x^4]))*EllipticF 
[ArcTan[Rt[(b - q)/(2*a), 2]*x], -2*(q/(b - q))], x] /; PosQ[(b - q)/a]] /; 
 FreeQ[{a, b, c}, x] && GtQ[b^2 - 4*a*c, 0]
 

rule 1456
Int[(x_)^2/Sqrt[(a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4], x_Symbol] :> With[{q = 
 Rt[b^2 - 4*a*c, 2]}, Simp[x*((b - q + 2*c*x^2)/(2*c*Sqrt[a + b*x^2 + c*x^4 
])), x] - Simp[Rt[(b - q)/(2*a), 2]*(2*a + (b - q)*x^2)*(Sqrt[(2*a + (b + q 
)*x^2)/(2*a + (b - q)*x^2)]/(2*c*Sqrt[a + b*x^2 + c*x^4]))*EllipticE[ArcTan 
[Rt[(b - q)/(2*a), 2]*x], -2*(q/(b - q))], x] /; PosQ[(b - q)/a]] /; FreeQ[ 
{a, b, c}, x] && GtQ[b^2 - 4*a*c, 0]
 

rule 1503
Int[((d_) + (e_.)*(x_)^2)/Sqrt[(a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4], x_Symbo 
l] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[d   Int[1/Sqrt[a + b*x^2 + c*x^4] 
, x], x] + Simp[e   Int[x^2/Sqrt[a + b*x^2 + c*x^4], x], x] /; PosQ[(b + q) 
/a] || PosQ[(b - q)/a]] /; FreeQ[{a, b, c, d, e}, x] && GtQ[b^2 - 4*a*c, 0]
 

rule 2207
Int[(Px_)*((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> With[{n = 
 Expon[Px, x^2], e = Coeff[Px, x^2, Expon[Px, x^2]]}, Simp[e*x^(2*n - 3)*(( 
a + b*x^2 + c*x^4)^(p + 1)/(c*(2*n + 4*p + 1))), x] + Simp[1/(c*(2*n + 4*p 
+ 1))   Int[(a + b*x^2 + c*x^4)^p*ExpandToSum[c*(2*n + 4*p + 1)*Px - a*e*(2 
*n - 3)*x^(2*n - 4) - b*e*(2*n + 2*p - 1)*x^(2*n - 2) - c*e*(2*n + 4*p + 1) 
*x^(2*n), x], x], x]] /; FreeQ[{a, b, c, p}, x] && PolyQ[Px, x^2] && Expon[ 
Px, x^2] > 1 && NeQ[b^2 - 4*a*c, 0] &&  !LtQ[p, -1]
 
Maple [A] (verified)

Time = 6.83 (sec) , antiderivative size = 125, normalized size of antiderivative = 0.68

method result size
risch \(\frac {x \left (18 x^{2}-235\right ) \sqrt {3 x^{4}+5 x^{2}+2}}{135}-\frac {101 i \sqrt {x^{2}+1}\, \sqrt {6 x^{2}+4}\, \operatorname {EllipticF}\left (i x , \frac {\sqrt {6}}{2}\right )}{27 \sqrt {3 x^{4}+5 x^{2}+2}}+\frac {2377 i \sqrt {x^{2}+1}\, \sqrt {6 x^{2}+4}\, \left (\operatorname {EllipticF}\left (i x , \frac {\sqrt {6}}{2}\right )-\operatorname {EllipticE}\left (i x , \frac {\sqrt {6}}{2}\right )\right )}{405 \sqrt {3 x^{4}+5 x^{2}+2}}\) \(125\)
default \(\frac {2377 i \sqrt {x^{2}+1}\, \sqrt {6 x^{2}+4}\, \left (\operatorname {EllipticF}\left (i x , \frac {\sqrt {6}}{2}\right )-\operatorname {EllipticE}\left (i x , \frac {\sqrt {6}}{2}\right )\right )}{405 \sqrt {3 x^{4}+5 x^{2}+2}}-\frac {101 i \sqrt {x^{2}+1}\, \sqrt {6 x^{2}+4}\, \operatorname {EllipticF}\left (i x , \frac {\sqrt {6}}{2}\right )}{27 \sqrt {3 x^{4}+5 x^{2}+2}}-\frac {47 x \sqrt {3 x^{4}+5 x^{2}+2}}{27}+\frac {2 x^{3} \sqrt {3 x^{4}+5 x^{2}+2}}{15}\) \(137\)
elliptic \(\frac {2377 i \sqrt {x^{2}+1}\, \sqrt {6 x^{2}+4}\, \left (\operatorname {EllipticF}\left (i x , \frac {\sqrt {6}}{2}\right )-\operatorname {EllipticE}\left (i x , \frac {\sqrt {6}}{2}\right )\right )}{405 \sqrt {3 x^{4}+5 x^{2}+2}}-\frac {101 i \sqrt {x^{2}+1}\, \sqrt {6 x^{2}+4}\, \operatorname {EllipticF}\left (i x , \frac {\sqrt {6}}{2}\right )}{27 \sqrt {3 x^{4}+5 x^{2}+2}}-\frac {47 x \sqrt {3 x^{4}+5 x^{2}+2}}{27}+\frac {2 x^{3} \sqrt {3 x^{4}+5 x^{2}+2}}{15}\) \(137\)

Input:

int((2*x^2+1)*(x^4-7*x^2+4)/(3*x^4+5*x^2+2)^(1/2),x,method=_RETURNVERBOSE)
 

Output:

1/135*x*(18*x^2-235)*(3*x^4+5*x^2+2)^(1/2)-101/27*I*(x^2+1)^(1/2)*(6*x^2+4 
)^(1/2)/(3*x^4+5*x^2+2)^(1/2)*EllipticF(I*x,1/2*6^(1/2))+2377/405*I*(x^2+1 
)^(1/2)*(6*x^2+4)^(1/2)/(3*x^4+5*x^2+2)^(1/2)*(EllipticF(I*x,1/2*6^(1/2))- 
EllipticE(I*x,1/2*6^(1/2)))
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.39 \[ \int \frac {\left (1+2 x^2\right ) \left (4-7 x^2+x^4\right )}{\sqrt {2+5 x^2+3 x^4}} \, dx=-\frac {4754 \, \sqrt {3} \sqrt {-\frac {2}{3}} x E(\arcsin \left (\frac {\sqrt {-\frac {2}{3}}}{x}\right )\,|\,\frac {3}{2}) - 9299 \, \sqrt {3} \sqrt {-\frac {2}{3}} x F(\arcsin \left (\frac {\sqrt {-\frac {2}{3}}}{x}\right )\,|\,\frac {3}{2}) - 3 \, {\left (54 \, x^{4} - 705 \, x^{2} + 2377\right )} \sqrt {3 \, x^{4} + 5 \, x^{2} + 2}}{1215 \, x} \] Input:

integrate((2*x^2+1)*(x^4-7*x^2+4)/(3*x^4+5*x^2+2)^(1/2),x, algorithm="fric 
as")
 

Output:

-1/1215*(4754*sqrt(3)*sqrt(-2/3)*x*elliptic_e(arcsin(sqrt(-2/3)/x), 3/2) - 
 9299*sqrt(3)*sqrt(-2/3)*x*elliptic_f(arcsin(sqrt(-2/3)/x), 3/2) - 3*(54*x 
^4 - 705*x^2 + 2377)*sqrt(3*x^4 + 5*x^2 + 2))/x
 

Sympy [F]

\[ \int \frac {\left (1+2 x^2\right ) \left (4-7 x^2+x^4\right )}{\sqrt {2+5 x^2+3 x^4}} \, dx=\int \frac {\left (2 x^{2} + 1\right ) \left (x^{4} - 7 x^{2} + 4\right )}{\sqrt {\left (x^{2} + 1\right ) \left (3 x^{2} + 2\right )}}\, dx \] Input:

integrate((2*x**2+1)*(x**4-7*x**2+4)/(3*x**4+5*x**2+2)**(1/2),x)
 

Output:

Integral((2*x**2 + 1)*(x**4 - 7*x**2 + 4)/sqrt((x**2 + 1)*(3*x**2 + 2)), x 
)
 

Maxima [F]

\[ \int \frac {\left (1+2 x^2\right ) \left (4-7 x^2+x^4\right )}{\sqrt {2+5 x^2+3 x^4}} \, dx=\int { \frac {{\left (x^{4} - 7 \, x^{2} + 4\right )} {\left (2 \, x^{2} + 1\right )}}{\sqrt {3 \, x^{4} + 5 \, x^{2} + 2}} \,d x } \] Input:

integrate((2*x^2+1)*(x^4-7*x^2+4)/(3*x^4+5*x^2+2)^(1/2),x, algorithm="maxi 
ma")
 

Output:

integrate((x^4 - 7*x^2 + 4)*(2*x^2 + 1)/sqrt(3*x^4 + 5*x^2 + 2), x)
 

Giac [F]

\[ \int \frac {\left (1+2 x^2\right ) \left (4-7 x^2+x^4\right )}{\sqrt {2+5 x^2+3 x^4}} \, dx=\int { \frac {{\left (x^{4} - 7 \, x^{2} + 4\right )} {\left (2 \, x^{2} + 1\right )}}{\sqrt {3 \, x^{4} + 5 \, x^{2} + 2}} \,d x } \] Input:

integrate((2*x^2+1)*(x^4-7*x^2+4)/(3*x^4+5*x^2+2)^(1/2),x, algorithm="giac 
")
 

Output:

integrate((x^4 - 7*x^2 + 4)*(2*x^2 + 1)/sqrt(3*x^4 + 5*x^2 + 2), x)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {\left (1+2 x^2\right ) \left (4-7 x^2+x^4\right )}{\sqrt {2+5 x^2+3 x^4}} \, dx=\int \frac {\left (2\,x^2+1\right )\,\left (x^4-7\,x^2+4\right )}{\sqrt {3\,x^4+5\,x^2+2}} \,d x \] Input:

int(((2*x^2 + 1)*(x^4 - 7*x^2 + 4))/(5*x^2 + 3*x^4 + 2)^(1/2),x)
 

Output:

int(((2*x^2 + 1)*(x^4 - 7*x^2 + 4))/(5*x^2 + 3*x^4 + 2)^(1/2), x)
 

Reduce [F]

\[ \int \frac {\left (1+2 x^2\right ) \left (4-7 x^2+x^4\right )}{\sqrt {2+5 x^2+3 x^4}} \, dx=\frac {2 \sqrt {3 x^{4}+5 x^{2}+2}\, x^{3}}{15}-\frac {47 \sqrt {3 x^{4}+5 x^{2}+2}\, x}{27}+\frac {202 \left (\int \frac {\sqrt {3 x^{4}+5 x^{2}+2}}{3 x^{4}+5 x^{2}+2}d x \right )}{27}+\frac {2377 \left (\int \frac {\sqrt {3 x^{4}+5 x^{2}+2}\, x^{2}}{3 x^{4}+5 x^{2}+2}d x \right )}{135} \] Input:

int((2*x^2+1)*(x^4-7*x^2+4)/(3*x^4+5*x^2+2)^(1/2),x)
                                                                                    
                                                                                    
 

Output:

(18*sqrt(3*x**4 + 5*x**2 + 2)*x**3 - 235*sqrt(3*x**4 + 5*x**2 + 2)*x + 101 
0*int(sqrt(3*x**4 + 5*x**2 + 2)/(3*x**4 + 5*x**2 + 2),x) + 2377*int((sqrt( 
3*x**4 + 5*x**2 + 2)*x**2)/(3*x**4 + 5*x**2 + 2),x))/135