Get a random point (x,y) that is on a portion of a function's curve?

198 Views Asked by At

I have a function xy*100*50 = 1000 that plots the following curve:

enter image description here

I would like to be able to get a random pair (x,y), where 0<x<1 and 0.5<y<1. In other words, any pair that will define a point of the curve that is in the red area.

enter image description here

My goal is to be able to generate a random pair that solves the equation xy*100*50 = 1000 with x and y being within some variable borders.

Is it possible at all? I have limited mathematical knowledge so I am not sure if it is even doable.

EDIT: @LuLu already gave a simple solution for that case, but the truth is that I am also looking for something that would work in cases like that one:

enter image description here

Where not all values of x in [2;8] have a matching y between [1;2]. So I can't pick a random x.