Hi Math H.,
We can use h(t) = Acos[B(t - C)] + D, where A = amplitude; B = 2π/P (P= period); C = horizontal shift (phase shift); D = vertical shift.
For a tide with a high of 5m and a low of 1m, for a difference of 4m, produces an amplitude of A = 2, and a midline (vertical shift) of D = 3.
Since time t = 0 starts at noon at high tide, there is no phase shift C = 0.
It takes 4 hours for 1/2 a wave (high to low), therefore the whole wave takes 8 hours and P = 8.
And B = 2π/P = 2π/8 = π/4
∴ h(t) = 2*cos(π*t /4) + 3, graph on Desmos and have a look.
I hope this helps, Joe.