The reason we use cosine, is because a cosine graph is at its maximum at the beginning of the cycle.
We begin with basic cosine equation:
Y(x)=Acos(Bx+c)+D
First we need to determine the middle line of the graph (amplitude) by finding the difference between tides and dividing by two: (7-1)/2=3
We know that period is 12. This means that b needs to be pi/6 or 0.523 if 12b=2pi
Then we need to average out the tides, to determine how much the curve needs to shift: (7+1)/2= 4
In addition, we need to shift the equation to the right since high tide is at 1pm or 13 hours after midnight.
In the end we get the following equation:
y=4+3cos(0.523(x-13))