Answer
$y(t)=21sin(\frac{\pi}{6}t)$
Work Step by Step
Given $y(0)=0, a=\frac{21+21}{2}=21, p=12 $, $a$ is positive because the tide rise first after $t=0$.
Use a simple harmonic model with
$y(t)=a\cdot sin(\omega t)$, since $p=\frac{2\pi}{\omega}=12, \omega=\frac{\pi}{6}$,
the equation becomes $y(t)=21 sin(\frac{\pi}{6}t)$ which is shown in the figure.