f(x)=ax+b is the relation needed to determine f in terms of argument/input x.
is grammatically OK, and comprehensible. However, in terms of is not the usual way of expressing the role of the 'x' in a formula, and relation is more associated with set theory than algebra. In terms of is more likely to be used with an abstract noun or a dimension of measurement: 'in terms of the macro-economy'; 'in terms of number theory'; 'in terms of voltage'. http://dictionary.cambridge.org/dictionary/english/in-terms-of-something
There are various ways to express the relationship between f,x, and ax+b, depending partly on the domain.
In mathematics, you might say, (http://www.columbia.edu/itc/sipa/math/variables.html)
The formula f(x)=ax+b determines the value of function f, for any value of the dependent variable x
, or replace "for any value of the dependent variable" with "for a given" ( (http://www.ldoceonline.com/dictionary/any-a-given)
Another common way to say this is,
f is a function of x, such that f(x)=ax+b
If the formula appeared in a software specification, it might say:
Method f accepts parameter x and returns ax+b
[concerning the use of 'relation' and 'function':