If we use solve
for your function, we can see that there are two points where your function is zero. These points are in (1, 1)
and (0.3203 + 1.3354i, pi)
syms xy result = solve(-log(x)-log(y)+x+y-2, x, y); result.x % -wrightOmega(log(1/pi) - 2 + pi*(1 - 1i)) % 1 result.y % pi % 1
If we look closely at your function, we will see that the values ββare actually complex
[x,y] = meshgrid(-10:0.01:10, -10:0.01:10); values = -log(x)-log(y)+x+y-2; whos values % Name Size Bytes Class Attributes % values 2001x2001 64064016 double complex
It seems that in older versions of MATLAB ezplot
complex functions are processed, considering only the real data component. Thus, it will give the following graph

However, newer versions take into account the magnitude of the data, and zeros will occur only when both the real and imaginary components are equal to zero. Of the two points where this is true, only one of these points is real and can be built; however, a relatively coarse selection of ezplot
cannot display this single point.
You can use contourc
to locate this point.
imagesc(abs(values), 'XData', [-10 10], 'YData', [-10 10]); axis equal hold on cmat = contourc(abs(values), [0 0]); xvalues = xx(1, cmat(1,2:end)); yvalues = yy(cmat(2,2:end), 1); plot(xvalues, yvalues, 'r*')
