Integrand size = 17, antiderivative size = 52 \[ \int \sqrt {\left (1-x^2\right ) \left (3+x^2\right )} \, dx=\frac {1}{3} x \sqrt {1-x^2} \sqrt {3+x^2}-\frac {2 E\left (\arcsin (x)\left |-\frac {1}{3}\right .\right )}{\sqrt {3}}+\frac {4 \operatorname {EllipticF}\left (\arcsin (x),-\frac {1}{3}\right )}{\sqrt {3}} \] Output:
1/3*x*(-x^2+1)^(1/2)*(x^2+3)^(1/2)-2/3*EllipticE(x,1/3*I*3^(1/2))*3^(1/2)+ 4/3*EllipticF(x,1/3*I*3^(1/2))*3^(1/2)
Result contains complex when optimal does not.
Time = 0.03 (sec) , antiderivative size = 59, normalized size of antiderivative = 1.13 \[ \int \sqrt {\left (1-x^2\right ) \left (3+x^2\right )} \, dx=\frac {1}{3} \left (x \sqrt {3-2 x^2-x^4}-2 i E\left (\left .i \text {arcsinh}\left (\frac {x}{\sqrt {3}}\right )\right |-3\right )-4 i \operatorname {EllipticF}\left (i \text {arcsinh}\left (\frac {x}{\sqrt {3}}\right ),-3\right )\right ) \] Input:
Integrate[Sqrt[(1 - x^2)*(3 + x^2)],x]
Output:
(x*Sqrt[3 - 2*x^2 - x^4] - (2*I)*EllipticE[I*ArcSinh[x/Sqrt[3]], -3] - (4* I)*EllipticF[I*ArcSinh[x/Sqrt[3]], -3])/3
Time = 0.37 (sec) , antiderivative size = 53, normalized size of antiderivative = 1.02, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.471, Rules used = {2048, 1404, 27, 1494, 27, 399, 321, 327}
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 \sqrt {\left (1-x^2\right ) \left (x^2+3\right )} \, dx\) |
\(\Big \downarrow \) 2048 |
\(\displaystyle \int \sqrt {-x^4-2 x^2+3}dx\) |
\(\Big \downarrow \) 1404 |
\(\displaystyle \frac {1}{3} \int \frac {2 \left (3-x^2\right )}{\sqrt {-x^4-2 x^2+3}}dx+\frac {1}{3} \sqrt {-x^4-2 x^2+3} x\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {2}{3} \int \frac {3-x^2}{\sqrt {-x^4-2 x^2+3}}dx+\frac {1}{3} \sqrt {-x^4-2 x^2+3} x\) |
\(\Big \downarrow \) 1494 |
\(\displaystyle \frac {4}{3} \int \frac {3-x^2}{2 \sqrt {1-x^2} \sqrt {x^2+3}}dx+\frac {1}{3} \sqrt {-x^4-2 x^2+3} x\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {2}{3} \int \frac {3-x^2}{\sqrt {1-x^2} \sqrt {x^2+3}}dx+\frac {1}{3} \sqrt {-x^4-2 x^2+3} x\) |
\(\Big \downarrow \) 399 |
\(\displaystyle \frac {2}{3} \left (6 \int \frac {1}{\sqrt {1-x^2} \sqrt {x^2+3}}dx-\int \frac {\sqrt {x^2+3}}{\sqrt {1-x^2}}dx\right )+\frac {1}{3} \sqrt {-x^4-2 x^2+3} x\) |
\(\Big \downarrow \) 321 |
\(\displaystyle \frac {2}{3} \left (2 \sqrt {3} \operatorname {EllipticF}\left (\arcsin (x),-\frac {1}{3}\right )-\int \frac {\sqrt {x^2+3}}{\sqrt {1-x^2}}dx\right )+\frac {1}{3} \sqrt {-x^4-2 x^2+3} x\) |
\(\Big \downarrow \) 327 |
\(\displaystyle \frac {2}{3} \left (2 \sqrt {3} \operatorname {EllipticF}\left (\arcsin (x),-\frac {1}{3}\right )-\sqrt {3} E\left (\arcsin (x)\left |-\frac {1}{3}\right .\right )\right )+\frac {1}{3} \sqrt {-x^4-2 x^2+3} x\) |
Input:
Int[Sqrt[(1 - x^2)*(3 + x^2)],x]
Output:
(x*Sqrt[3 - 2*x^2 - x^4])/3 + (2*(-(Sqrt[3]*EllipticE[ArcSin[x], -1/3]) + 2*Sqrt[3]*EllipticF[ArcSin[x], -1/3]))/3
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[1/(Sqrt[(a_) + (b_.)*(x_)^2]*Sqrt[(c_) + (d_.)*(x_)^2]), x_Symbol] :> S imp[(1/(Sqrt[a]*Sqrt[c]*Rt[-d/c, 2]))*EllipticF[ArcSin[Rt[-d/c, 2]*x], b*(c /(a*d))], x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] && GtQ[a, 0] && !(NegQ[b/a] && SimplerSqrtQ[-b/a, -d/c])
Int[Sqrt[(a_) + (b_.)*(x_)^2]/Sqrt[(c_) + (d_.)*(x_)^2], x_Symbol] :> Simp[ (Sqrt[a]/(Sqrt[c]*Rt[-d/c, 2]))*EllipticE[ArcSin[Rt[-d/c, 2]*x], b*(c/(a*d) )], x] /; FreeQ[{a, b, c, d}, x] && NegQ[d/c] && GtQ[c, 0] && GtQ[a, 0]
Int[((e_) + (f_.)*(x_)^2)/(Sqrt[(a_) + (b_.)*(x_)^2]*Sqrt[(c_) + (d_.)*(x_) ^2]), x_Symbol] :> Simp[f/b Int[Sqrt[a + b*x^2]/Sqrt[c + d*x^2], x], x] + Simp[(b*e - a*f)/b Int[1/(Sqrt[a + b*x^2]*Sqrt[c + d*x^2]), x], x] /; Fr eeQ[{a, b, c, d, e, f}, x] && !((PosQ[b/a] && PosQ[d/c]) || (NegQ[b/a] && (PosQ[d/c] || (GtQ[a, 0] && ( !GtQ[c, 0] || SimplerSqrtQ[-b/a, -d/c])))))
Int[((a_.) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(p_), x_Symbol] :> Simp[x*((a + b *x^2 + c*x^4)^p/(4*p + 1)), x] + Simp[2*(p/(4*p + 1)) Int[(2*a + b*x^2)*( a + b*x^2 + c*x^4)^(p - 1), x], x] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a* c, 0] && GtQ[p, 0] && IntegerQ[2*p]
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[2*Sqrt[-c] Int[(d + e*x^2)/(Sqr t[b + q + 2*c*x^2]*Sqrt[-b + q - 2*c*x^2]), x], x]] /; FreeQ[{a, b, c, d, e }, x] && GtQ[b^2 - 4*a*c, 0] && LtQ[c, 0]
Int[(u_.)*((e_.)*((a_.) + (b_.)*(x_)^(n_.))*((c_) + (d_.)*(x_)^(n_.)))^(p_) , x_Symbol] :> Int[u*(a*c*e + (b*c + a*d)*e*x^n + b*d*e*x^(2*n))^p, x] /; F reeQ[{a, b, c, d, e, n, p}, x]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 113 vs. \(2 (46 ) = 92\).
Time = 1.57 (sec) , antiderivative size = 114, normalized size of antiderivative = 2.19
method | result | size |
default | \(\frac {x \sqrt {-x^{4}-2 x^{2}+3}}{3}+\frac {2 \sqrt {-x^{2}+1}\, \sqrt {3 x^{2}+9}\, \operatorname {EllipticF}\left (x , \frac {i \sqrt {3}}{3}\right )}{3 \sqrt {-x^{4}-2 x^{2}+3}}+\frac {2 \sqrt {-x^{2}+1}\, \sqrt {3 x^{2}+9}\, \left (\operatorname {EllipticF}\left (x , \frac {i \sqrt {3}}{3}\right )-\operatorname {EllipticE}\left (x , \frac {i \sqrt {3}}{3}\right )\right )}{3 \sqrt {-x^{4}-2 x^{2}+3}}\) | \(114\) |
elliptic | \(\frac {x \sqrt {-x^{4}-2 x^{2}+3}}{3}+\frac {2 \sqrt {-x^{2}+1}\, \sqrt {3 x^{2}+9}\, \operatorname {EllipticF}\left (x , \frac {i \sqrt {3}}{3}\right )}{3 \sqrt {-x^{4}-2 x^{2}+3}}+\frac {2 \sqrt {-x^{2}+1}\, \sqrt {3 x^{2}+9}\, \left (\operatorname {EllipticF}\left (x , \frac {i \sqrt {3}}{3}\right )-\operatorname {EllipticE}\left (x , \frac {i \sqrt {3}}{3}\right )\right )}{3 \sqrt {-x^{4}-2 x^{2}+3}}\) | \(114\) |
risch | \(-\frac {x \left (x^{2}-1\right ) \left (x^{2}+3\right )}{3 \sqrt {-\left (x^{2}-1\right ) \left (x^{2}+3\right )}}+\frac {2 \sqrt {-x^{2}+1}\, \sqrt {3 x^{2}+9}\, \left (\operatorname {EllipticF}\left (x , \frac {i \sqrt {3}}{3}\right )-\operatorname {EllipticE}\left (x , \frac {i \sqrt {3}}{3}\right )\right )}{3 \sqrt {-x^{4}-2 x^{2}+3}}+\frac {2 \sqrt {-x^{2}+1}\, \sqrt {3 x^{2}+9}\, \operatorname {EllipticF}\left (x , \frac {i \sqrt {3}}{3}\right )}{3 \sqrt {-x^{4}-2 x^{2}+3}}\) | \(124\) |
Input:
int(((-x^2+1)*(x^2+3))^(1/2),x,method=_RETURNVERBOSE)
Output:
1/3*x*(-x^4-2*x^2+3)^(1/2)+2/3*(-x^2+1)^(1/2)*(3*x^2+9)^(1/2)/(-x^4-2*x^2+ 3)^(1/2)*EllipticF(x,1/3*I*3^(1/2))+2/3*(-x^2+1)^(1/2)*(3*x^2+9)^(1/2)/(-x ^4-2*x^2+3)^(1/2)*(EllipticF(x,1/3*I*3^(1/2))-EllipticE(x,1/3*I*3^(1/2)))
Time = 0.10 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.85 \[ \int \sqrt {\left (1-x^2\right ) \left (3+x^2\right )} \, dx=\frac {2 i \, x E(\arcsin \left (\frac {1}{x}\right )\,|\,-3) + 4 i \, x F(\arcsin \left (\frac {1}{x}\right )\,|\,-3) + \sqrt {-x^{4} - 2 \, x^{2} + 3} {\left (x^{2} + 2\right )}}{3 \, x} \] Input:
integrate(((-x^2+1)*(x^2+3))^(1/2),x, algorithm="fricas")
Output:
1/3*(2*I*x*elliptic_e(arcsin(1/x), -3) + 4*I*x*elliptic_f(arcsin(1/x), -3) + sqrt(-x^4 - 2*x^2 + 3)*(x^2 + 2))/x
\[ \int \sqrt {\left (1-x^2\right ) \left (3+x^2\right )} \, dx=\int \sqrt {\left (1 - x^{2}\right ) \left (x^{2} + 3\right )}\, dx \] Input:
integrate(((-x**2+1)*(x**2+3))**(1/2),x)
Output:
Integral(sqrt((1 - x**2)*(x**2 + 3)), x)
\[ \int \sqrt {\left (1-x^2\right ) \left (3+x^2\right )} \, dx=\int { \sqrt {-{\left (x^{2} + 3\right )} {\left (x^{2} - 1\right )}} \,d x } \] Input:
integrate(((-x^2+1)*(x^2+3))^(1/2),x, algorithm="maxima")
Output:
integrate(sqrt(-(x^2 + 3)*(x^2 - 1)), x)
\[ \int \sqrt {\left (1-x^2\right ) \left (3+x^2\right )} \, dx=\int { \sqrt {-{\left (x^{2} + 3\right )} {\left (x^{2} - 1\right )}} \,d x } \] Input:
integrate(((-x^2+1)*(x^2+3))^(1/2),x, algorithm="giac")
Output:
integrate(sqrt(-(x^2 + 3)*(x^2 - 1)), x)
Timed out. \[ \int \sqrt {\left (1-x^2\right ) \left (3+x^2\right )} \, dx=\int \sqrt {-\left (x^2-1\right )\,\left (x^2+3\right )} \,d x \] Input:
int((-(x^2 - 1)*(x^2 + 3))^(1/2),x)
Output:
int((-(x^2 - 1)*(x^2 + 3))^(1/2), x)
\[ \int \sqrt {\left (1-x^2\right ) \left (3+x^2\right )} \, dx=\frac {\sqrt {-x^{4}-2 x^{2}+3}\, x}{3}-2 \left (\int \frac {\sqrt {-x^{4}-2 x^{2}+3}}{x^{4}+2 x^{2}-3}d x \right )+\frac {2 \left (\int \frac {\sqrt {-x^{4}-2 x^{2}+3}\, x^{2}}{x^{4}+2 x^{2}-3}d x \right )}{3} \] Input:
int(((-x^2+1)*(x^2+3))^(1/2),x)
Output:
(sqrt( - x**4 - 2*x**2 + 3)*x - 6*int(sqrt( - x**4 - 2*x**2 + 3)/(x**4 + 2 *x**2 - 3),x) + 2*int((sqrt( - x**4 - 2*x**2 + 3)*x**2)/(x**4 + 2*x**2 - 3 ),x))/3