Rate of Separation Between Two Ships I was solving different problems when I approached this question. It looks like this:

One ship is 1 mile north of a certain pier and is travelling N $30^o$ E at a rate of 3 miles per hour. Another ship is $\frac{3}{4}$ mile east of the pier and 
  is travelling east at a rate of 7 miles per hour. How fast are the ships separating?

My work:
I imagined the problem like this:

I can easily calculate the third side of the the triangle formed by two ships and a pier by cosine law.
Adding some details to the picture above: 

$$z^2 = x^2 + y^2 -2xy\cos Z$$
$$z^2 = (0.75)^2 + (1)^2 -2(0.75)(1)\cos (60^o)$$
$$z = \frac{\sqrt{13}}{4}$$
Now....we need to get the rate of separation between two ships, which is the $\frac{dz}{dt}.$ Implicitly differentiating the cosine law equation shown above:
$$\frac{d}{dt}(z^2) = \frac{d}{dt}(x^2) + \frac{d}{dt}(y^2) - \frac{d}{dt}(2xy \cos(Z))$$
$$2z\frac{dz}{dt} = 2x\frac{dx}{dt} + 2y\frac{dy}{dt} - (2 \cos (60^o)) \left(x \frac{dy}{dt} + y \frac{dx}{dt} \right)$$
$$2\left(\frac{\sqrt{13}}{4}\right)\frac{dz}{dt} = 2(0.75)(7) + 2(1)(3) - (2 \cos (60^o))((0.75)(3) + (1)(7))$$
$$\frac{dz}{dt} = 4.02 \space mph$$
The rate of separation between two ships is $\frac{dz}{dt} = 4.02\space $  mph. But my book says it is 5.4 miles per hour. Where did I messed up?
 A: The problem statement did not say the first ship was moving directly away from the pier, only that its course was $30$ degrees east of north.
Try placing the first ship $1$ mile due north of the pier 
(no eastward displacement at all!) and see what you get.
By the way, there is an alternative method that I think is easier
than law of cosines.
Find the line that connects the position of the two ships.
Decompose the velocity vector of each ship into two components,
one of which is parallel to that line and the other is perpendicular.
The components parallel to the line will tell you how fast the distance between ships is increasing or decreasing.
(You could use the components perpendicular to the line to find out how fast the direction from one ship to the other is changing, but since this problem did not ask about that, you can ignore those components.)
A: Denote the point $1$ mile due north by $A$ and $0.75$ miles due east by $B$. These are the points where the ships are located at first. With the point $O$ as origin the triangle $ABO$ is right angle. The initial distance between the ships is:
$$d_0=\sqrt{1^2+0.75^2}=1.25.$$
After $t$ hours, let $C$ be the point the first ship arrives at in the course $NE30^o$ and $D$ be the point the second ship arrives at in the eastern course. So the distance between the ships is $CD$. The coordinates of $C$ are:
$$x_1=AC\cdot \sin{30^o}=\frac32t; y_1=1+AC\cdot \cos{30^o}=1+\frac{3\sqrt{3}t}{2}.$$
The coordinates of $D$ are:
$$x_2=0.75+7t; y_2=0.$$
The distance formula is:
$$CD=\sqrt{(x_1-x_2)^2+(y_1-y_2)^2}=\sqrt{(0.75+5.5t)^2+(1+3\sqrt{3}t/2)^2}.$$
Taking derivative:
$$\frac{d(CD)}{dt} \bigg{|}_{t=0}=5.378.$$
