According to David Joyce (University of Pennsylvania), the convention to use "x" for the unknown variable in mathematics comes from Rene Descartes, who used letters from the beginning of the alphabet for constants and those from the end for variables.
https://www.quora.com/Why-is-x-the-most-popular-variable-in-mathematics
Ian Stewart says the same thing in "Taming The Infinite" (2009, Quercus Publishing, p. 83).