The link between math and music is explored in this video.
Equations are made with the formula
y= sin ( f * 2 pi x)
f is frequency
if you want to graph notes like this the frequency table is on this page
http://www.phy.mtu.edu/~suits/notefreqs.html
if you want to know where they got those values then explore that page, they explain themselves. or do the math yourself.
have a good day!