# Why does this evaluate to {}?

I'm stuck with what seems to be an extremely simple issue, still, I just can't seem to find the solution or even the cause of the problem.

So my issue is that I have the following surfaces:

f[x_,y_]:=-1 + 1/(1.8 (0.02 + x) + 1.2 (0.02 + y));
g[x_,y_]:=-1 + 1/(0.15 + x + 1.2 (0.15 + y));


which intersect for sure, I checked via Plot3D, but

Solve[f[x,y]==g[x,y],y]


returns {}. This baffles me, what is happening?

Tried with exact coefficients, tried restarting the kernel, no change.

• Have you tried replacing the inexact numbers with exact ones (e.g. replace 1.8 with 9/5)? – J. M. will be back soon Jul 24 '15 at 10:39
• When I try to solve it generally, Mathematica produces the warning "Solve::ratnz: Solve was unable to solve the system with inexact coefficients. The answer was obtained by solving a corresponding exact system and numericizing the result." so that doesn't seem to be a problem (or am I missing something? :/ ) – Benjamin Márkus Jul 24 '15 at 10:40
• But just to make sure, I tried it with exact coeffs now, to no avail. – Benjamin Márkus Jul 24 '15 at 10:45
• Most likely you want to find the simpltaneous zero set, that is, Solve[{f[x,y]==0,g[x,y]==0},{x,y}]. – Daniel Lichtblau Jul 24 '15 at 13:37

The issue is that you're asking for a general solution for y only whereas your particular set of equations has a solution only for one specific value of x.

You should have called Solve as:

Solve[f[x, y] == g[x, y], {x, y}]

During evaluation of Solve::ratnz: Solve was unable to solve the system with inexact coefficients. The answer was obtained by solving a corresponding exact system and numericizing the result. >>

During evaluation of Solve::svars: Equations may not give solutions for all "solve" variables. >>

(* {{x -> 0.3375}} *)


or better, with exact coefficients:

f[x_, y_] := -1 + 1/(18/10 (2/100 + x) + 12/10 (2/100 + y));
g[x_, y_] := -1 + 1/(15/100 + x + 12/10 (15/100 + y));

Solve[f[x, y] == g[x, y], {x, y}]

During evaluation of Solve::svars: Equations may not give solutions for all "solve" variables. >>

(* {{x -> 27/80}} *)


In this case Reduce or SolveAways would have been better approaches:

Reduce[f[x, y] == g[x, y], y]
(* x == 27/80 && 89 + 160 y != 0 *)

SolveAlways[f[x, y] == g[x, y], y]
(* {{x -> 27/80}} *)

• But shouldn't this solution also contain a value for y? I'm confused. – Benjamin Márkus Jul 24 '15 at 10:56
• No, for the given value of x all y's are a solution. Check f[27/80, y] - g[27/80, y] // FullSimplify for the system with exact coefficients. – Sjoerd C. de Vries Jul 24 '15 at 10:58
• Ohh, thanks a lot! – Benjamin Márkus Jul 24 '15 at 11:00