if I'm defining the range of a function would the following be valid documentation?

Function and rule:

f(x)=x^2

Range f(x) = {f(x)|f(x)>=0}

or is it better to write the range similar to the following.

since,

f(x)=y

then,

Range f(x) = {y|y>=0}

My question is just which is the preferred method of documentation of the mathematician world?