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

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

Optimal result

Integrand size = 46, antiderivative size = 70 \[ \int \frac {1+\sqrt {3}+2 x}{\left (1-\sqrt {3}+2 x\right ) \sqrt {-1-4 \sqrt {3} x^2+4 x^4}} \, dx=-\frac {1}{3} \sqrt {3+2 \sqrt {3}} \arctan \left (\frac {\left (1+\sqrt {3}+2 x\right )^2}{2 \sqrt {3 \left (3+2 \sqrt {3}\right )} \sqrt {-1-4 \sqrt {3} x^2+4 x^4}}\right ) \] Output:

-1/3*(3+2*3^(1/2))^(1/2)*arctan(1/2*(1+3^(1/2)+2*x)^2/(9+6*3^(1/2))^(1/2)/ 
(-1-4*3^(1/2)*x^2+4*x^4)^(1/2))
                                                                                    
                                                                                    
 

Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(209\) vs. \(2(70)=140\).

Time = 21.80 (sec) , antiderivative size = 209, normalized size of antiderivative = 2.99 \[ \int \frac {1+\sqrt {3}+2 x}{\left (1-\sqrt {3}+2 x\right ) \sqrt {-1-4 \sqrt {3} x^2+4 x^4}} \, dx=-\frac {\sqrt {\frac {3}{2}+\sqrt {3}} \left (1+\sqrt {3}-2 x\right )^2 \sqrt {-\frac {-1+\sqrt {3}-2 \left (-2+\sqrt {3}\right ) x+2 \left (1+\sqrt {3}\right ) x^2+4 x^3}{\left (1+\sqrt {3}-2 x\right )^3}} \arctan \left (\frac {\sqrt {-\frac {9}{2}+3 \sqrt {3}} \left (1+\sqrt {3}-2 x\right )^2 \sqrt {-\frac {-1+\sqrt {3}-2 \left (-2+\sqrt {3}\right ) x+2 \left (1+\sqrt {3}\right ) x^2+4 x^3}{\left (1+\sqrt {3}-2 x\right )^3}}}{-1-2 \left (-1+\sqrt {3}\right ) x+2 \left (-2+\sqrt {3}\right ) x^2}\right )}{3 \sqrt {-1-4 \sqrt {3} x^2+4 x^4}} \] Input:

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

Output:

-1/3*(Sqrt[3/2 + Sqrt[3]]*(1 + Sqrt[3] - 2*x)^2*Sqrt[-((-1 + Sqrt[3] - 2*( 
-2 + Sqrt[3])*x + 2*(1 + Sqrt[3])*x^2 + 4*x^3)/(1 + Sqrt[3] - 2*x)^3)]*Arc 
Tan[(Sqrt[-9/2 + 3*Sqrt[3]]*(1 + Sqrt[3] - 2*x)^2*Sqrt[-((-1 + Sqrt[3] - 2 
*(-2 + Sqrt[3])*x + 2*(1 + Sqrt[3])*x^2 + 4*x^3)/(1 + Sqrt[3] - 2*x)^3)])/ 
(-1 - 2*(-1 + Sqrt[3])*x + 2*(-2 + Sqrt[3])*x^2)])/Sqrt[-1 - 4*Sqrt[3]*x^2 
 + 4*x^4]
 

Rubi [A] (verified)

Time = 0.48 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.10, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.043, Rules used = {2278, 216}

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

\(\Big \downarrow \) 2278

\(\displaystyle -4 \left (2+\sqrt {3}\right ) \int \frac {1}{\frac {2 \left (2 x+\sqrt {3}+1\right )^4}{4 x^4-4 \sqrt {3} x^2-1}+24 \left (3+2 \sqrt {3}\right )}d\frac {\left (2 x+\sqrt {3}+1\right )^2}{\sqrt {4 x^4-4 \sqrt {3} x^2-1}}\)

\(\Big \downarrow \) 216

\(\displaystyle -\frac {\left (2+\sqrt {3}\right ) \arctan \left (\frac {\left (2 x+\sqrt {3}+1\right )^2}{2 \sqrt {3 \left (3+2 \sqrt {3}\right )} \sqrt {4 x^4-4 \sqrt {3} x^2-1}}\right )}{\sqrt {3 \left (3+2 \sqrt {3}\right )}}\)

Input:

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

Output:

-(((2 + Sqrt[3])*ArcTan[(1 + Sqrt[3] + 2*x)^2/(2*Sqrt[3*(3 + 2*Sqrt[3])]*S 
qrt[-1 - 4*Sqrt[3]*x^2 + 4*x^4])])/Sqrt[3*(3 + 2*Sqrt[3])])
 

Defintions of rubi rules used

rule 216
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[b, 2]))*A 
rcTan[Rt[b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] && (GtQ[a 
, 0] || GtQ[b, 0])
 

rule 2278
Int[((A_) + (B_.)*(x_))/(((d_) + (e_.)*(x_))*Sqrt[(a_) + (b_.)*(x_)^2 + (c_ 
.)*(x_)^4]), x_Symbol] :> Simp[(-A^2)*((B*d + A*e)/e)   Subst[Int[1/(6*A^3* 
B*d + 3*A^4*e - a*e*x^2), x], x, (A + B*x)^2/Sqrt[a + b*x^2 + c*x^4]], x] / 
; FreeQ[{a, b, c, d, e, A, B}, x] && NeQ[B*d - A*e, 0] && EqQ[c^2*d^6 + a*e 
^4*(13*c*d^2 + b*e^2), 0] && EqQ[b^2*e^4 - 12*c*d^2*(c*d^2 - b*e^2), 0] && 
EqQ[4*A*c*d*e + B*(2*c*d^2 - b*e^2), 0]
 
Maple [C] (verified)

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

Time = 1.96 (sec) , antiderivative size = 336, normalized size of antiderivative = 4.80

method result size
elliptic \(\frac {\sqrt {1-\left (-4-2 \sqrt {3}\right ) x^{2}}\, \sqrt {1-\left (4-2 \sqrt {3}\right ) x^{2}}\, \operatorname {EllipticF}\left (x \left (i+i \sqrt {3}\right ), i \sqrt {1-\sqrt {3}\, \left (4-2 \sqrt {3}\right )}\right )}{\left (i+i \sqrt {3}\right ) \sqrt {-1-4 \sqrt {3}\, x^{2}+4 x^{4}}}+\sqrt {3}\, \left (-\frac {\operatorname {arctanh}\left (\frac {-4 \sqrt {3}\, \left (\frac {\sqrt {3}}{2}-\frac {1}{2}\right )^{2}-2-4 \sqrt {3}\, x^{2}+8 x^{2} \left (\frac {\sqrt {3}}{2}-\frac {1}{2}\right )^{2}}{2 \sqrt {4 \left (\frac {\sqrt {3}}{2}-\frac {1}{2}\right )^{4}-4 \sqrt {3}\, \left (\frac {\sqrt {3}}{2}-\frac {1}{2}\right )^{2}-1}\, \sqrt {-1-4 \sqrt {3}\, x^{2}+4 x^{4}}}\right )}{2 \sqrt {4 \left (\frac {\sqrt {3}}{2}-\frac {1}{2}\right )^{4}-4 \sqrt {3}\, \left (\frac {\sqrt {3}}{2}-\frac {1}{2}\right )^{2}-1}}-\frac {\sqrt {1-\left (-4-2 \sqrt {3}\right ) x^{2}}\, \sqrt {1-\left (4-2 \sqrt {3}\right ) x^{2}}\, \operatorname {EllipticPi}\left (\sqrt {-4-2 \sqrt {3}}\, x , \frac {1}{\left (-4-2 \sqrt {3}\right ) \left (\frac {\sqrt {3}}{2}-\frac {1}{2}\right )^{2}}, \frac {\sqrt {4-2 \sqrt {3}}}{\sqrt {-4-2 \sqrt {3}}}\right )}{\sqrt {-4-2 \sqrt {3}}\, \left (\frac {\sqrt {3}}{2}-\frac {1}{2}\right ) \sqrt {-1-4 \sqrt {3}\, x^{2}+4 x^{4}}}\right )\) \(336\)

Input:

int((1+3^(1/2)+2*x)/(1-3^(1/2)+2*x)/(-1-4*3^(1/2)*x^2+4*x^4)^(1/2),x,metho 
d=_RETURNVERBOSE)
 

Output:

1/(I+I*3^(1/2))*(1-(-4-2*3^(1/2))*x^2)^(1/2)*(1-(4-2*3^(1/2))*x^2)^(1/2)/( 
-1-4*3^(1/2)*x^2+4*x^4)^(1/2)*EllipticF(x*(I+I*3^(1/2)),I*(1-3^(1/2)*(4-2* 
3^(1/2)))^(1/2))+3^(1/2)*(-1/2/(4*(1/2*3^(1/2)-1/2)^4-4*3^(1/2)*(1/2*3^(1/ 
2)-1/2)^2-1)^(1/2)*arctanh(1/2*(-4*3^(1/2)*(1/2*3^(1/2)-1/2)^2-2-4*3^(1/2) 
*x^2+8*x^2*(1/2*3^(1/2)-1/2)^2)/(4*(1/2*3^(1/2)-1/2)^4-4*3^(1/2)*(1/2*3^(1 
/2)-1/2)^2-1)^(1/2)/(-1-4*3^(1/2)*x^2+4*x^4)^(1/2))-1/(-4-2*3^(1/2))^(1/2) 
/(1/2*3^(1/2)-1/2)*(1-(-4-2*3^(1/2))*x^2)^(1/2)*(1-(4-2*3^(1/2))*x^2)^(1/2 
)/(-1-4*3^(1/2)*x^2+4*x^4)^(1/2)*EllipticPi((-4-2*3^(1/2))^(1/2)*x,1/(-4-2 
*3^(1/2))/(1/2*3^(1/2)-1/2)^2,(4-2*3^(1/2))^(1/2)/(-4-2*3^(1/2))^(1/2)))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 114 vs. \(2 (50) = 100\).

Time = 0.31 (sec) , antiderivative size = 114, normalized size of antiderivative = 1.63 \[ \int \frac {1+\sqrt {3}+2 x}{\left (1-\sqrt {3}+2 x\right ) \sqrt {-1-4 \sqrt {3} x^2+4 x^4}} \, dx=\frac {1}{6} \, \sqrt {2 \, \sqrt {3} + 3} \arctan \left (-\frac {{\left (36 \, x^{4} - 60 \, x^{3} + 18 \, x^{2} - \sqrt {3} {\left (16 \, x^{4} - 40 \, x^{3} + 6 \, x^{2} - 10 \, x + 1\right )} + 6\right )} \sqrt {4 \, x^{4} - 4 \, \sqrt {3} x^{2} - 1} \sqrt {2 \, \sqrt {3} + 3}}{88 \, x^{6} - 168 \, x^{5} + 132 \, x^{4} - 176 \, x^{3} - 66 \, x^{2} - 42 \, x - 11}\right ) \] Input:

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

Output:

1/6*sqrt(2*sqrt(3) + 3)*arctan(-(36*x^4 - 60*x^3 + 18*x^2 - sqrt(3)*(16*x^ 
4 - 40*x^3 + 6*x^2 - 10*x + 1) + 6)*sqrt(4*x^4 - 4*sqrt(3)*x^2 - 1)*sqrt(2 
*sqrt(3) + 3)/(88*x^6 - 168*x^5 + 132*x^4 - 176*x^3 - 66*x^2 - 42*x - 11))
 

Sympy [F]

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

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

Output:

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

Maxima [F]

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

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

Output:

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

Giac [F]

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

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

Output:

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

Mupad [F(-1)]

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

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

Output:

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

Reduce [F]

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

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

Output:

sqrt(3)*int(sqrt( - 4*sqrt(3)*x**2 + 4*x**4 - 1)/(16*x**8 - 56*x**4 + 1),x 
) + 4*sqrt(3)*int((sqrt( - 4*sqrt(3)*x**2 + 4*x**4 - 1)*x**3)/(16*x**8 - 5 
6*x**4 + 1),x) + 2*sqrt(3)*int((sqrt( - 4*sqrt(3)*x**2 + 4*x**4 - 1)*x**2) 
/(16*x**8 - 56*x**4 + 1),x) + 4*sqrt(3)*int((sqrt( - 4*sqrt(3)*x**2 + 4*x* 
*4 - 1)*x)/(16*x**8 - 56*x**4 + 1),x) + 2*int(sqrt( - 4*sqrt(3)*x**2 + 4*x 
**4 - 1)/(16*x**8 - 56*x**4 + 1),x) + 4*int((sqrt( - 4*sqrt(3)*x**2 + 4*x* 
*4 - 1)*x**4)/(16*x**8 - 56*x**4 + 1),x) + 6*int((sqrt( - 4*sqrt(3)*x**2 + 
 4*x**4 - 1)*x**2)/(16*x**8 - 56*x**4 + 1),x) + 6*int((sqrt( - 4*sqrt(3)*x 
**2 + 4*x**4 - 1)*x)/(16*x**8 - 56*x**4 + 1),x)