This one is a little difficult......
Here's the form of the function that we need :
f(x) = Asin (Bx) + C
The amplitude, A, can be determined by taking the [high point - the midline point ] =
8.3 - 4.35 = 3.95
"C" will be the midline point = 4.3
B" is the harder to determine.....we want to divide 2pi by 24 = pi / 12 = B
So our function is
f(x) = 3.95sin [ pi/12 * x ] + 4.35
Here's the graph :
https://www.desmos.com/calculator/1ox0tmscf7
Note that at = 0 [ midnight ] we are at 4.35 ft
At x = 6 [ 6AM] we are at high tide = 8.3 ft
At x = 12 [noon] we are back to 4.35 ft
At x = 18 [ 6PM] we are at low tide = 0.4 ft
At x = 24 [ midnight, again ] we are back to the midline