Monday, November 17, 2014

A Vector Sum Trap in a Related-Rates Problem

A student of mine recently showed me a math problem that's easy to get wrong, as I did, through hasty vector addition. Here's the problem (adapted from this PDF):
Two radar stations, A and B, are tracking a ship generally north of both stations. Station B is located 6 km east of station A. At a certain instant, the ship is 5 km from A and also 5 km from B. At the same instant, station A reads that the distance between station A and the ship is increasing at the rate of 28 km/h. Station B reads that the distance between station B and the ship is increasing at 4 km/h. How fast and in what direction is the ship moving?

Solution 1: Related Rates 

If you've studied related rates before (who hasn't!), you'll look for an equation involving distances, differentiate that equation with respect to time, and solve for the unknown rate.

Let's use Newton's notation for time derivatives: \(\dot a = \frac{da}{dt}\). This problem gives you two rates: \(\dot a = v_a = 28 \text{ km/h} \) and \(\dot b = v_b = 4 \text{ km/h}\). You need to find the ship's speed and direction, i.e., its velocity vector \(v\), which you can express as the vector sum of horizontal and vertical components: \(v_x + v_y\). This is useful here because \(v_x\) and \(v_y\) are easily related to \(x\) and \(h\), as follows.

The large triangle's top corner stays anchored to the ship as it moves; the ship will "drag" the top corner while \(h\) remains vertical. So if the ship has horizontal speed \(v_x\), the right triangle base \(x\) must change at exactly \(v_x\) to move the top corner along with the ship, which means \(v_x = \dot x\). Similarly, \(v_y = \dot h\). So we just need to find \(\dot x\) and \(\dot h\) to solve this problem.

The right triangle with base \(x\) gives us \(h^2 + x^2 = a^2\), or \(h^2 = a^2 - x^2\). The other right triangle with base \((6 - x)\) gives \(h^2 + (6 - x)^2 = b^2\). Combining these equations gives
\[ \begin{equation}
b^2 = (6 - x)^2 + a^2 - x^2 \label{asdf}
\end{equation}
\]in which \(x\) is the only unknown. Good! The rate of change of \(x\) will give us the ship's horizontal speed. Differentiate both sides of (\(\ref{asdf}\)) with respect to time, using the chain rule on \(a(t), b(t),\) and \(x(t)\):
\[ \begin{align}
2b \dot b &= 2(6 - x)(-\dot x) + 2a \dot a - 2x \dot x \nonumber \\
b \dot b &= (x - 6) \dot x + a \dot a - x \dot x \nonumber \\
(6\text{ km}) \dot x &= a \dot a - b \dot b = (5\text{ km})(28\text{ km/h}) - (5\text{ km})(4\text{ km/h})  \nonumber \\
\dot x &= 20 \text{ km/h}  \nonumber
\end{align}
\]And from \(h^2 = a^2 - x^2\),
\[ \begin{align}
h \dot h &= (4\text{ km})\dot h = a \dot a - x \dot x = (5\text{ km})(28\text{ km/h}) - (3\text{ km})(20\text{ km/h}) \nonumber \\
\dot h &= 20 \text{ km/h} \nonumber
\end{align}
\] The ship's velocity is \(\mathbf{(v_x, v_y) = (20, 20)} \) km/h, or \(\mathbf{20\sqrt{2} \approx 28.8}\) km/h northeast.

Solution 2: Vector Addition

To check that answer and withdraw from the bleakness of the real world for a little while longer, let's find the sum of the given velocities \(v_a\) and \(v_b\) by resolving them into their horizontal and vertical components and adding those:

Note that we don't actually need the value of \(\theta\), since it only ever appears as \(\cos \theta = 3/5\) or \(\sin \theta = 4/5\) (these values are readable straight from the first diagram). Adding up components gives:
\[ \begin{align}
v_x &= v_{a}\cos \theta - v_{b} \cos \theta \nonumber \\
&= \frac{3}{5}(28 - 4) \nonumber \\
&= \mathbf{14.4 \text{ km/h}} \nonumber \\
v_y &= v_{a}\sin \theta + v_{b} \sin \theta \nonumber \\
&= \frac{4}{5}(28 + 4) \nonumber \\
&= \mathbf{25.6 \text{ km/h}} \nonumber
\end{align}
\]...Wait, what the hell!? \((v_x, v_y) = (14.4, 25.6)\) km/h translates to a speed of 29.4 km/h in a direction 60.6° north of east, shown in red below. This sum clearly disagrees with the related-rates answer of 28.8 km northeast, shown in blue.

How could this happen? Adding two vectors is dead simple; no way did you screw that up. Did you flip a sign somewhere in the related-rates analysis? Maybe \(\dot x\) doesn't actually equal \(v_x\) or something? What is going on!?

What Is Going On

It's true that the unknown velocity vector \(v\) has components \(v_a = 28 \text{ km/h}\) and \(v_b = 4 \text{ km/h}\). The problem is that these components are taken along non-orthogonal (not right-angled) lines \(a\) and \(b\), so they can't simply add back up to \(v\)! Some of \(v_a\) points in the direction of \(v_b\), and some of \(v_b\) points along \(v_a\). Here's a surefire way to convince yourself that these measured velocities shouldn't add up to the ship's velocity: picture multiple radar stations, say 10 of them, distributed along the line AB. It wouldn't make sense to add all of their velocity measurements.

Here's a geometric way to realize why the vector sum \(v_a + v_b \ne v\). The a-component of the unknown velocity \(v\) is \(v_a\). This defines a whole family of vectors whose component along the line defined by \(a\) is \(v_a = 28 \text{ km/h}\). Here's that family of vectors in green:

Similarly, there is a family of vectors whose component along the line defined by \(b\) is \(v_b = 4 km/h\):

Only one vector belongs to both families. That vector is the correct velocity of the ship, which we easily found using related rates to be \(20\sqrt{2} \approx 28.8 \text{ km/h}\) 45 degrees north of east:

You could of course solve this problem using vector geometry: the unknown vector \(v\) forms some angle \(\alpha\) with the positive x-axis, so the angle between \(v\) and \(v_a\) is \(\theta - \alpha\), etc. However, it's quicker to use related rates... As long as you don't add up vector components that point along non-orthogonal directions.