For direct variation, an increase or decrease in one variable leads to a corresponding increase or decrease in another variable. Given that y varies with x, we would introduce a constant of proportionality, k. it becomes
y = kx
Given that y = 1/2 when x = 5, it means that
1/2 = 5k
k = 0.5/5 = 0.1
The equation becomes
y = 0.1x
When x = 7,
y = 0.1 * 7 = 0.7