(*This file computes the partial derivatives of the function G. Here we call G by the name GG. The function F makes up 6 of the 10 symmands comprising the energy function. The argument is a list L that specifies which partial derivative. For instance, L={1,2} specifies the derivative D1D2F.*) (*inverse stereographic projection*) s[x_, y_] := {(2*x)/(1 + x*x + y*y), (2*y)/(1 + x*x + y*y), 1 - 2/(1 + x*x + y*y)}; GG:=(a1=s[x1,y1]-s[x2,y2]; Simplify[1/a1.a1]) VARG={x1,y1,x2,y2}; SymbolicDerivativeG[L_]:=( count=1; a1=GG; While[count<=Length[L],{a1=D[a1,VARG[[L[[count]]]]];++count}]; a2=ExpandAll[a1]; a3=Together[a2]) (*We have 4 functions here because there are 4 summands in the energy function, one per finite point in the configuration. These are really the functions U4,...,U9 in the paper. All these functions coincide, but they are evaluated at different points.*) ExactBound[5,L_]:=( f1=SymbolicDerivativeG[L]; {x1,y1,x2,y2}={0,0,1,0}; f2=f1; Clear[x1,x2,y1,y2]; f2) ExactBound[6,L_]:=( f1=SymbolicDerivativeG[L]; {x1,y1,x2,y2}={0,0,-1/2,Sqrt[3]/2}; f2=f1; Clear[x1,x2,y1,y2]; f2) ExactBound[7,L_]:=( f1=SymbolicDerivativeG[L]; {x1,y1,x2,y2}={0,0,-1/2,-Sqrt[3]/2}; f2=f1; Clear[x1,x2,y1,y2]; f2) ExactBound[8,L_]:=( f1=SymbolicDerivativeG[L]; {x1,y1,x2,y2}={1,0,-1/2,Sqrt[3]/2}; f2=f1; Clear[x1,x2,y1,y2]; f2) ExactBound[9,L_]:=( f1=SymbolicDerivativeG[L]; {x1,y1,x2,y2}={1,0,-1/2,-Sqrt[3]/2}; f2=f1; Clear[x1,x2,y1,y2]; f2) ExactBound[10,L_]:=( f1=SymbolicDerivativeG[L]; {x1,y1,x2,y2}={-1/2,Sqrt[3]/2,-1/2,-Sqrt[3]/2}; f2=f1; Clear[x1,x2,y1,y2]; f2)