Hi,
I need a function f(x) such that:
f(1)=10
f(2)=8
f(3)=6
f(4)=4
f(5)=2
If we assume that f is of the form $\displaystyle f(x)=ax+b$ then $\displaystyle a=\frac{f(x_1)-f(x_2)}{x_1-x_2} \equiv -2 ~ \forall x_1,x_2 \in \{1,2,3,4,5\} \implies a = -2$
Now, substitute into $\displaystyle f(x) = -2x+b$ one of the given points. Namely, we can use $\displaystyle (5,2) \Rightarrow f(5) = 2 \Rightarrow 2 = -2*5+b \Rightarrow b = 2+10 = 12 \implies f(x) = -2x+12$