What are the historical origins of the $f(x)$ notation used for functions? That is when did people start to use this notation instead of just thinking in terms of two different variables one being dependent on the other?
Any references would be appreciated.
The authoritative reference for these matters is the book
Florian Cajori, A History of Mathematical Notations (1929), reprinted by Dover.
On page 268 of volume II, Cajori says that the notation $f(x)$ was first used by Euler in 1734:
According to this wiki article (search for “function”), this goes back to the first half of 17th century, so long before Euler (as it should be, since Newton already use the dot over the function symbol for derivative).
Take a look at Earliest uses of symbols.
It has a good historical information.