TestFunction[x_,y_]:= x^2+y^2+1
f1[x_,y_] := 1.5 - 2Abs[x-0.5+y-0.5]
f2[x_,y_]:= 1.41 - 2Abs[x-0.5+y+0.4]
f3[x_,y_]:=1.32-2Abs[x+0.4+y+0.4]
f4[x_,y_]:=1.41-2Abs[x+0.4+y-0.5]
f5[x_,y_]:=1.98-2Abs[x-0.7+y-0.7]
f6[x_,y_]:=1.98 -2Abs[x-0.7+y+0.7]
SharktoothFunction[x_,y_]:= Max[f1[x,y],f2[x,y],f3[x,y],f4[x,y],f5[x,y],f6[x,y]]

Plot3D[{TestFunction[x,y], SharktoothFunction[x,y]},{x,-1,1},{y,-1,1}]

MaxValue[TestFunction[x,y] - SharktoothFunction[x,y],{x,y}∈ x>= -1&& x<= 1 && y>= -1 && y<=1 ]