Let's place the submarine at (0,0) to start.
The freighter is 40 miles at N20°E, placing it at (13.68,37.59)
The freighter's heading is 140°, so at time t its position is
(fx,fy) = (13.68 + 20t*cos(140°), 37.59 + 20t*sin(140°))
(fx,fy) = (13.68-15.32t , 37.59 + 12.86t)
The sub, at speed 25, sails at a heading of a°, so its position at time t is
(sx,sy) = (25t*cos(a),25t*sin(a))
Now we can figure the distance between the vessels:
d^2 = (fx-sx)^2 + (fy-sy)^2
The equation is in two variables, and is not subject to direct solution, but a little iteration will show that the two ships will meet at
time t = 4.15 hours if the sub's heading is 118.75° or N28.75°W.
Hmmm. It occurs to me that I have been using common trig angles, with 0° pointing due East. Nautical headings have 0° = due North, so you may have to fiddle with the angles to correct things.
A freighter, streaming on course 140„a at 20 knots, is 40 nautical miles N20„aE of a submarine with a cruising speed of 25 knots. Find the course to be set by the sub to overtake the freighter in the least amount of time, and find this minimum time.
2 answers
Thinking about things a bit more, I realized that a simple law of cosines setup would work.
(25t)^2 = 40^2 + (20t)^2 - 2*40*cos110°
625t^2 = 1600 + 400t^2 + 684t
225t^2 - 684t - 1600 = 0
t = 4.58 (a little different value)
20t = 91.6
25t = 114.5
sin(a)/91.6 = sin110°/114.5
sin(a) = .75175
a = 48.74°
add that to the 70° initial bearing to get 118.74°
(25t)^2 = 40^2 + (20t)^2 - 2*40*cos110°
625t^2 = 1600 + 400t^2 + 684t
225t^2 - 684t - 1600 = 0
t = 4.58 (a little different value)
20t = 91.6
25t = 114.5
sin(a)/91.6 = sin110°/114.5
sin(a) = .75175
a = 48.74°
add that to the 70° initial bearing to get 118.74°