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

3.1.90.1 Optimal result
3.1.90.2 Mathematica [A] (verified)
3.1.90.3 Rubi [A] (verified)
3.1.90.4 Maple [C] (verified)
3.1.90.5 Fricas [B] (verification not implemented)
3.1.90.6 Sympy [F]
3.1.90.7 Maxima [F]
3.1.90.8 Giac [F]
3.1.90.9 Mupad [F(-1)]
3.1.90.10 Reduce [F]

3.1.90.1 Optimal result

Integrand size = 40, antiderivative size = 65 \[ \int \frac {1-\sqrt {3}+x}{\left (1+\sqrt {3}+x\right ) \sqrt {-4+4 \sqrt {3} x^2+x^4}} \, dx=\frac {1}{3} \sqrt {-3+2 \sqrt {3}} \text {arctanh}\left (\frac {\left (1-\sqrt {3}+x\right )^2}{\sqrt {3 \left (-3+2 \sqrt {3}\right )} \sqrt {-4+4 \sqrt {3} x^2+x^4}}\right ) \]

output
1/3*arctanh((1+x-3^(1/2))^2/(-9+6*3^(1/2))^(1/2)/(-4+x^4+4*3^(1/2)*x^2)^(1 
/2))*(-3+2*3^(1/2))^(1/2)
 
3.1.90.2 Mathematica [A] (verified)

Time = 8.27 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.18 \[ \int \frac {1-\sqrt {3}+x}{\left (1+\sqrt {3}+x\right ) \sqrt {-4+4 \sqrt {3} x^2+x^4}} \, dx=\frac {1}{3} \sqrt {-3+2 \sqrt {3}} \text {arctanh}\left (\frac {\sqrt {9+6 \sqrt {3}} \sqrt {-4+4 \sqrt {3} x^2+x^4}}{2+\left (-2-2 \sqrt {3}\right ) x+\left (2+\sqrt {3}\right ) x^2}\right ) \]

input
Integrate[(1 - Sqrt[3] + x)/((1 + Sqrt[3] + x)*Sqrt[-4 + 4*Sqrt[3]*x^2 + x 
^4]),x]
 
output
(Sqrt[-3 + 2*Sqrt[3]]*ArcTanh[(Sqrt[9 + 6*Sqrt[3]]*Sqrt[-4 + 4*Sqrt[3]*x^2 
 + x^4])/(2 + (-2 - 2*Sqrt[3])*x + (2 + Sqrt[3])*x^2)])/3
 
3.1.90.3 Rubi [A] (verified)

Time = 0.26 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.12, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.050, Rules used = {2278, 220}

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

\(\Big \downarrow \) 2278

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

\(\Big \downarrow \) 220

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

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

3.1.90.3.1 Defintions of rubi rules used

rule 220
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(- 
1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && 
 (LtQ[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]
 
3.1.90.4 Maple [C] (verified)

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

Time = 2.30 (sec) , antiderivative size = 327, normalized size of antiderivative = 5.03

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

input
int((1+x-3^(1/2))/(1+x+3^(1/2))/(-4+x^4+4*3^(1/2)*x^2)^(1/2),x,method=_RET 
URNVERBOSE)
 
output
1/(1/2*I*3^(1/2)-1/2*I)*(1-(-1+1/2*3^(1/2))*x^2)^(1/2)*(1-(1/2*3^(1/2)+1)* 
x^2)^(1/2)/(-4+x^4+4*3^(1/2)*x^2)^(1/2)*EllipticF(x*(1/2*I*3^(1/2)-1/2*I), 
I*(1+4*3^(1/2)*(1/2*3^(1/2)+1))^(1/2))-2*3^(1/2)*(-1/2/((-1-3^(1/2))^4+4*( 
-1-3^(1/2))^2*3^(1/2)-4)^(1/2)*arctanh(1/2*(4*(-1-3^(1/2))^2*3^(1/2)-8+4*3 
^(1/2)*x^2+2*x^2*(-1-3^(1/2))^2)/((-1-3^(1/2))^4+4*(-1-3^(1/2))^2*3^(1/2)- 
4)^(1/2)/(-4+x^4+4*3^(1/2)*x^2)^(1/2))-1/(-1+1/2*3^(1/2))^(1/2)/(-1-3^(1/2 
))*(1-(-1+1/2*3^(1/2))*x^2)^(1/2)*(1-(1/2*3^(1/2)+1)*x^2)^(1/2)/(-4+x^4+4* 
3^(1/2)*x^2)^(1/2)*EllipticPi((-1+1/2*3^(1/2))^(1/2)*x,1/(-1+1/2*3^(1/2))/ 
(-1-3^(1/2))^2,(1/2*3^(1/2)+1)^(1/2)/(-1+1/2*3^(1/2))^(1/2)))
 
3.1.90.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 323 vs. \(2 (47) = 94\).

Time = 0.36 (sec) , antiderivative size = 323, normalized size of antiderivative = 4.97 \[ \int \frac {1-\sqrt {3}+x}{\left (1+\sqrt {3}+x\right ) \sqrt {-4+4 \sqrt {3} x^2+x^4}} \, dx=\frac {1}{12} \, \sqrt {2 \, \sqrt {3} - 3} \log \left (-\frac {37 \, x^{12} - 204 \, x^{11} + 804 \, x^{10} - 2408 \, x^{9} + 3708 \, x^{8} - 5472 \, x^{7} + 6432 \, x^{6} + 10944 \, x^{5} + 14832 \, x^{4} + 19264 \, x^{3} + 12864 \, x^{2} + {\left (54 \, x^{10} - 300 \, x^{9} + 1026 \, x^{8} - 2232 \, x^{7} + 3024 \, x^{6} - 3024 \, x^{5} - 1008 \, x^{4} - 2016 \, x^{3} - 2592 \, x^{2} + \sqrt {3} {\left (31 \, x^{10} - 176 \, x^{9} + 576 \, x^{8} - 1320 \, x^{7} + 1848 \, x^{6} - 1008 \, x^{5} + 1344 \, x^{4} + 1632 \, x^{3} + 1008 \, x^{2} + 832 \, x + 256\right )} - 1152 \, x - 480\right )} \sqrt {x^{4} + 4 \, \sqrt {3} x^{2} - 4} \sqrt {2 \, \sqrt {3} - 3} + 3 \, \sqrt {3} {\left (7 \, x^{12} - 40 \, x^{11} + 160 \, x^{10} - 400 \, x^{9} + 924 \, x^{8} - 960 \, x^{7} - 1920 \, x^{5} - 3696 \, x^{4} - 3200 \, x^{3} - 2560 \, x^{2} - 1280 \, x - 448\right )} + 6528 \, x + 2368}{x^{12} + 12 \, x^{11} + 48 \, x^{10} + 40 \, x^{9} - 180 \, x^{8} - 288 \, x^{7} + 384 \, x^{6} + 576 \, x^{5} - 720 \, x^{4} - 320 \, x^{3} + 768 \, x^{2} - 384 \, x + 64}\right ) \]

input
integrate((1+x-3^(1/2))/(1+x+3^(1/2))/(-4+x^4+4*3^(1/2)*x^2)^(1/2),x, algo 
rithm="fricas")
 
output
1/12*sqrt(2*sqrt(3) - 3)*log(-(37*x^12 - 204*x^11 + 804*x^10 - 2408*x^9 + 
3708*x^8 - 5472*x^7 + 6432*x^6 + 10944*x^5 + 14832*x^4 + 19264*x^3 + 12864 
*x^2 + (54*x^10 - 300*x^9 + 1026*x^8 - 2232*x^7 + 3024*x^6 - 3024*x^5 - 10 
08*x^4 - 2016*x^3 - 2592*x^2 + sqrt(3)*(31*x^10 - 176*x^9 + 576*x^8 - 1320 
*x^7 + 1848*x^6 - 1008*x^5 + 1344*x^4 + 1632*x^3 + 1008*x^2 + 832*x + 256) 
 - 1152*x - 480)*sqrt(x^4 + 4*sqrt(3)*x^2 - 4)*sqrt(2*sqrt(3) - 3) + 3*sqr 
t(3)*(7*x^12 - 40*x^11 + 160*x^10 - 400*x^9 + 924*x^8 - 960*x^7 - 1920*x^5 
 - 3696*x^4 - 3200*x^3 - 2560*x^2 - 1280*x - 448) + 6528*x + 2368)/(x^12 + 
 12*x^11 + 48*x^10 + 40*x^9 - 180*x^8 - 288*x^7 + 384*x^6 + 576*x^5 - 720* 
x^4 - 320*x^3 + 768*x^2 - 384*x + 64))
 
3.1.90.6 Sympy [F]

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

input
integrate((1+x-3**(1/2))/(1+x+3**(1/2))/(-4+x**4+4*3**(1/2)*x**2)**(1/2),x 
)
 
output
Integral((x - sqrt(3) + 1)/((x + 1 + sqrt(3))*sqrt(x**4 + 4*sqrt(3)*x**2 - 
 4)), x)
 
3.1.90.7 Maxima [F]

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

input
integrate((1+x-3^(1/2))/(1+x+3^(1/2))/(-4+x^4+4*3^(1/2)*x^2)^(1/2),x, algo 
rithm="maxima")
 
output
integrate((x - sqrt(3) + 1)/(sqrt(x^4 + 4*sqrt(3)*x^2 - 4)*(x + sqrt(3) + 
1)), x)
 
3.1.90.8 Giac [F]

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

input
integrate((1+x-3^(1/2))/(1+x+3^(1/2))/(-4+x^4+4*3^(1/2)*x^2)^(1/2),x, algo 
rithm="giac")
 
output
integrate((x - sqrt(3) + 1)/(sqrt(x^4 + 4*sqrt(3)*x^2 - 4)*(x + sqrt(3) + 
1)), x)
 
3.1.90.9 Mupad [F(-1)]

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

input
int((x - 3^(1/2) + 1)/((x + 3^(1/2) + 1)*(4*3^(1/2)*x^2 + x^4 - 4)^(1/2)), 
x)
 
output
int((x - 3^(1/2) + 1)/((x + 3^(1/2) + 1)*(4*3^(1/2)*x^2 + x^4 - 4)^(1/2)), 
 x)
 
3.1.90.10 Reduce [F]

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

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