Feeds:
Posts

## Safely into the harbour

In yesterday’s blog, I discussed how mathematicians and physicists measure angles in radians rather than the more familiar degrees. I finished the blog by mentioning a problem to do with water level in a harbour. Let me state the problem in more detail, and then show how we go about solving it.

## The tide is high

Suppose the height in metres of the water in a harbour can be described by the equation

$y = 6\sin(\frac{\pi}{4}t) + 8\cos(\frac{\pi}{4}t) + 11$

where $t$ is the time in hours. We will assume that the time $t=0$ corresponds to midnight. We want to find the following

1. The maximum height of the water
2. The minimum height of the water
3. The time when the first maximum water height occurs
4. The time when the first minimum water height occurs
5. If a boat needs 2 metres of water to be able to use the harbour, how many hours a day can it use the harbour?

As I showed yesterday, the period of this up and down motion of the water level is given by $\frac{2\pi}{\omega}$, so in this example above the period is $\frac{2\pi}{\pi/4}=8\; \text {hours}$. In reality, of course, if the up and down motion of the level of water is due to the tides, then the period has to be 12 hours, as there are two high and two low tides each day. But, let’s assume, just for variety, that the period can differ from 12 hours, so in this example it will be 8 hours.

Notice that the equation describing the level of the water $y$ is a combination of sines and cosines. How do we go about solving this?

## Combining sines and cosines

The trick to being able to solve this equation is to use the compound angle formula. A few pages of algebra will show that

$\sin(A+B) = \sin(A)\cos(B) + \cos(A)\sin(B)$.

We will use that to rewrite our formula for the water level. We can write

$\sin( \frac{\pi}{4}t + \alpha ) = \sin( \frac{\pi}{4}t ) \cos( \alpha ) + \cos( \frac{\pi}{4}t ) \sin( \alpha )$

Multiplying all the terms by $R$ we get

$R \sin( \frac{\pi}{4}t + \alpha ) = R \sin( \frac{\pi}{4}t ) \cos(\alpha) + R \cos( \frac{\pi}{4}t ) \sin( \alpha )$

and, re-ordering this we get

$R \sin( \frac{\pi}{4}t + \alpha ) = R \cos( \alpha) \sin( \frac{\pi}{4}t ) + R \sin( \alpha ) \cos( \frac{\pi}{4}t )$

By writing it in this order we can see that in our original equation $6=R \cos( \alpha )$ and $8=R \sin( \alpha )$. If we square these two equations, and remember that $\sin^{2}( \alpha ) + \cos^{2}( \alpha ) = 1$ for any value of $\alpha$, then $36=R^{2} \cos^{2}( \alpha )$ and $64 = R^{2} \sin^{2}( \alpha )$, so adding these we get $36 + 64 = 100 = R^{2} (\cos^{2} ( \alpha ) + \sin^{2} ( \alpha ) ) = R^{2} (1)$, so $R = \sqrt{100} = 10$.

In order to calculate the phase angle $\alpha$ we not that $\frac{ R \sin ( \alpha ) }{ R \cos ( \alpha ) } = \tan ( \alpha ) = \frac{8}{6} = \frac{4}{3}$. So $\alpha = \tan^{-1} (4/3) = 0.93 \; \text{radians}$. (This is about $53^{\circ}$).

So, now we have an equation for $y$ which is entirely in terms of $\sin$, we have

$y = 10 \sin( \frac{\pi}{4}t + 0.93 ) + 11$.

Plots of $y = \sin( \frac{\pi}{4}t)$ (black curve) and $y=\sin(\frac{\pi}{4}t + 0.93)$ (green curve). The blue dashed line is where y=-9. These plots do not include the +11 constant, so of course +11-9=2 metres.

## The maximum and minimum heights of water in the harbour

Sine is a function which varies between +1 and -1, so the maximum value of $10 \sin ( \frac{\pi}{4}t + 0.93 ) = 10$. This means the maximum height of the water in the harbour will be $10 + 11 = 21 \; \text{metres}$.

The minimum height will be when $10 \sin ( \frac{\pi}{4}t + 0.93 ) = -10$, and so the minimum height will be $-10 + 11 = 1 \; \text{metre}$.

## At what time does the water level first reach its maximum value?

We have shown that the maximum value happens when $\sin( \frac{\pi}{4}t + 0.93 ) = 1$. Let us call $(\frac{\pi}{4}t + 0.93 )$ a new angle $\theta$. We know that $\sin( \theta ) = 1 \; \text{when} \; \theta = \pi/2$. But $\theta = ( \frac{\pi}{4}t + 0.93 ) \; \text{so} \; \frac{\pi}{4}t = ( \theta - 0.93 ) = ( \pi/2 - 0.93 ) = 0.64 \; \text{radians}$. This leads to $t = (0.64)(4)/\pi = 0.81 \; \text{hours} = 49 \; \text{minutes}$ after midnight.

## At what time does the water level first reach its minimum value?

This happens when $\sin( \frac{\pi}{4}t + 0.93 ) = \sin ( \theta ) = -1$. The first time this happens is when $\theta = 3\pi/2, \; \text{so} \; \frac{\pi}{4}t = ( \theta - 0.93 ) = ( 3\pi/2 - 0.93 ) = 3.78 \; \text{radians}$. This leads to $t = (3.74)(4)/\pi = 4.8 \; \text{hours} = 4 \; \text{hours and} \; 49 \; \text{minutes}$ after midnight. Note, this is half a period (4 hours) after the maximum, as one would expect.

## How many hours each day can we use the harbour?

If we can only use the harbour when the water level is above 2 metres, we need to find the time when the water level first drops below 2 metres (remember it goes down as low as 1 metre). At midnight, the water level is $y = 10 \sin(0.93) + 11 = 10(0.8)+11=19 \; \text{metres}$.

We need to find $y = 10 \sin( \frac{\pi}{4}t + 0.93 ) + 11 = 2$. Re-arranging, this is $10 \sin( \frac{\pi}{4}t + 0.93 ) = 2 - 11 = -9, \; \text{so} \; \sin( \theta ) = - 9/10$.

This value is shown by the horizontal dashed blue line on the zoomed-in sine functions plotted above. This gives a value of $\theta = \sin^{-1}( -9/10 ) = - 1.12 \; \text{radians}$. But, this answer is no good for us, as it gives a negative time, as shown by the first red dot to the left of the y-axis. We have to find the next solution, which will be when at a time 1 period later, so $-1.12 + 2\pi = 5.16 \; \text{radians}$. So $( \frac{\pi}{4}t + 0.93 ) = 5.16$, the 3rd red dot on the plot. This value leads to $t = 5.39 \; \text{hours}$.

If we compare this time to the time of the first minimum, $4.8 \; \text{hours}$, we can see that is is after it. What has gone wrong? What we have found is the time when the water level comes back up to 2m after being as low as 1 metre when the time was $4.8 \; \text{hours}$. The difference between $5.39 \; \text{and} \; 4.8 = 0.59 \; \text{hours}$. From the symmetry of the sine function, the water will drop below the 2 metre level at the same time difference before the minimum, i.e. at a time of $4.8 - 0.59 = 4.21 \; \text{hours}$. This is the 2nd red dot on the plot. So, the time the water is below 2 metres during each cycle is the time between the 2nd and 3rd red dots, i.e. the part shaded in yellow. That is $2 \times 0.59 = 1.18 \; \text{hours which is} \; 1 \; \text{hour and} \; 10.8 \; \text{minutes}.$

Because the period of our sine function is 8 hours, there are $24/8 = 3$ full cycles in each 24 hour day. During each cycle the water level is below 2 metres for $1.18 \; \text{hours}$, the total number of hours each day for which we cannot use the harbour is $1.18 \times 3 = 3.54 \; \text{hours} \; = 3 \; \text{hours and} \; 32.4 \; \text{minutes}$.

We were asked for the number of hours each day we can use the harbour, so this will be $24 - 3.54 = 20.46 \; \text{hours} \; = 20 \; \text{hours and} \; 27.6 \; \text{minutes}$ each day.