Indeed, on mathematical point of view guess value of x shouldn't be a function of variable y, You're right. But when I write x=1, r(y) becomes red ("This variable is undefined"), so the problem is still unsolved. Steve, could You type this to mathcad and take a closer look ? Peter.