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

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 = 27, antiderivative size = 160 \[ \int \frac {4-7 x^2+x^4}{\sqrt {2+5 x^2+3 x^4}} \, dx=-\frac {73 x \left (2+3 x^2\right )}{27 \sqrt {2+5 x^2+3 x^4}}+\frac {1}{9} x \sqrt {2+5 x^2+3 x^4}+\frac {73 \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 )}{27 \sqrt {2+5 x^2+3 x^4}}+\frac {17 \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 )}{9 \sqrt {2+5 x^2+3 x^4}} \] Output:

-73/27*x*(3*x^2+2)/(3*x^4+5*x^2+2)^(1/2)+1/9*x*(3*x^4+5*x^2+2)^(1/2)+73/27 
*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)+17/9*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 = 128, normalized size of antiderivative = 0.80 \[ \int \frac {4-7 x^2+x^4}{\sqrt {2+5 x^2+3 x^4}} \, dx=\frac {6 x+15 x^3+9 x^5+73 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 )-107 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 )}{27 \sqrt {2+5 x^2+3 x^4}} \] Input:

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

Output:

(6*x + 15*x^3 + 9*x^5 + (73*I)*Sqrt[3]*Sqrt[1 + x^2]*Sqrt[2 + 3*x^2]*Ellip 
ticE[I*ArcSinh[Sqrt[3/2]*x], 2/3] - (107*I)*Sqrt[3]*Sqrt[1 + x^2]*Sqrt[2 + 
 3*x^2]*EllipticF[I*ArcSinh[Sqrt[3/2]*x], 2/3])/(27*Sqrt[2 + 5*x^2 + 3*x^4 
])
 

Rubi [A] (verified)

Time = 0.31 (sec) , antiderivative size = 166, normalized size of antiderivative = 1.04, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {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 {x^4-7 x^2+4}{\sqrt {3 x^4+5 x^2+2}} \, dx\)

\(\Big \downarrow \) 2207

\(\displaystyle \frac {1}{9} \int \frac {34-73 x^2}{\sqrt {3 x^4+5 x^2+2}}dx+\frac {1}{9} \sqrt {3 x^4+5 x^2+2} x\)

\(\Big \downarrow \) 1503

\(\displaystyle \frac {1}{9} \left (34 \int \frac {1}{\sqrt {3 x^4+5 x^2+2}}dx-73 \int \frac {x^2}{\sqrt {3 x^4+5 x^2+2}}dx\right )+\frac {1}{9} \sqrt {3 x^4+5 x^2+2} x\)

\(\Big \downarrow \) 1413

\(\displaystyle \frac {1}{9} \left (\frac {17 \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}}-73 \int \frac {x^2}{\sqrt {3 x^4+5 x^2+2}}dx\right )+\frac {1}{9} \sqrt {3 x^4+5 x^2+2} x\)

\(\Big \downarrow \) 1456

\(\displaystyle \frac {1}{9} \left (\frac {17 \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}}-73 \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 {1}{9} \sqrt {3 x^4+5 x^2+2} x\)

Input:

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

Output:

(x*Sqrt[2 + 5*x^2 + 3*x^4])/9 + (-73*((x*(2 + 3*x^2))/(3*Sqrt[2 + 5*x^2 + 
3*x^4]) - (Sqrt[2]*(1 + x^2)*Sqrt[(2 + 3*x^2)/(1 + x^2)]*EllipticE[ArcTan[ 
x], -1/2])/(3*Sqrt[2 + 5*x^2 + 3*x^4])) + (17*Sqrt[2]*(1 + x^2)*Sqrt[(2 + 
3*x^2)/(1 + x^2)]*EllipticF[ArcTan[x], -1/2])/Sqrt[2 + 5*x^2 + 3*x^4])/9
 

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 = 4.11 (sec) , antiderivative size = 118, normalized size of antiderivative = 0.74

method result size
default \(\frac {x \sqrt {3 x^{4}+5 x^{2}+2}}{9}-\frac {17 i \sqrt {x^{2}+1}\, \sqrt {6 x^{2}+4}\, \operatorname {EllipticF}\left (i x , \frac {\sqrt {6}}{2}\right )}{9 \sqrt {3 x^{4}+5 x^{2}+2}}-\frac {73 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 )}{27 \sqrt {3 x^{4}+5 x^{2}+2}}\) \(118\)
risch \(\frac {x \sqrt {3 x^{4}+5 x^{2}+2}}{9}-\frac {17 i \sqrt {x^{2}+1}\, \sqrt {6 x^{2}+4}\, \operatorname {EllipticF}\left (i x , \frac {\sqrt {6}}{2}\right )}{9 \sqrt {3 x^{4}+5 x^{2}+2}}-\frac {73 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 )}{27 \sqrt {3 x^{4}+5 x^{2}+2}}\) \(118\)
elliptic \(\frac {x \sqrt {3 x^{4}+5 x^{2}+2}}{9}-\frac {17 i \sqrt {x^{2}+1}\, \sqrt {6 x^{2}+4}\, \operatorname {EllipticF}\left (i x , \frac {\sqrt {6}}{2}\right )}{9 \sqrt {3 x^{4}+5 x^{2}+2}}-\frac {73 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 )}{27 \sqrt {3 x^{4}+5 x^{2}+2}}\) \(118\)

Input:

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

Output:

1/9*x*(3*x^4+5*x^2+2)^(1/2)-17/9*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))-73/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))-EllipticE(I*x,1/2*6^ 
(1/2)))
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.42 \[ \int \frac {4-7 x^2+x^4}{\sqrt {2+5 x^2+3 x^4}} \, dx=\frac {146 \, \sqrt {3} \sqrt {-\frac {2}{3}} x E(\arcsin \left (\frac {\sqrt {-\frac {2}{3}}}{x}\right )\,|\,\frac {3}{2}) + 7 \, \sqrt {3} \sqrt {-\frac {2}{3}} x F(\arcsin \left (\frac {\sqrt {-\frac {2}{3}}}{x}\right )\,|\,\frac {3}{2}) + 3 \, \sqrt {3 \, x^{4} + 5 \, x^{2} + 2} {\left (3 \, x^{2} - 73\right )}}{81 \, x} \] Input:

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

Output:

1/81*(146*sqrt(3)*sqrt(-2/3)*x*elliptic_e(arcsin(sqrt(-2/3)/x), 3/2) + 7*s 
qrt(3)*sqrt(-2/3)*x*elliptic_f(arcsin(sqrt(-2/3)/x), 3/2) + 3*sqrt(3*x^4 + 
 5*x^2 + 2)*(3*x^2 - 73))/x
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

integrate((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)/sqrt(3*x^4 + 5*x^2 + 2), x)
 

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

(sqrt(3*x**4 + 5*x**2 + 2)*x + 34*int(sqrt(3*x**4 + 5*x**2 + 2)/(3*x**4 + 
5*x**2 + 2),x) - 73*int((sqrt(3*x**4 + 5*x**2 + 2)*x**2)/(3*x**4 + 5*x**2 
+ 2),x))/9