Looks pretty good, p4wn3r. You got a numerical value that is very close to what I got.
I figured out the exact value of the speed that your ship has to go compared to the sub (relative velocity). It is sqrt((1/x
2) + 1), where x is the only solution to -ln(x)/x=pi/2. WolframAlpha gives x≈0.474541 and so that gives an answer of sqrt((1/x
2) + 1 ≈ 2.332533.
How I did this:
Model the problem such that your ship starts at (-1,0), the sub starts at (0,0), and the port is at (1,0). Assume the sub has speed 1 and your ship has speed b. Note that b is the answer to this problem.
The ship's path, as p4wn3r guessed, is indeed a line from (-1,0) meeting the sub's circle expanding away from (0,0), followed by a logarithmic spiral to the port at (1,0). Now the transition point where the line and the expanding circle meet can't just be anywhere, but must be such that your ship's radial speed at that point must be 1 outward, since the circle is expanding outward at a speed of 1.
I claim that this point must lie on the y-axis. Indeed, the following image shows why:
At the transition point C, your ship's radial speed is 1 and, with the ship's velocity vector having a magnitude of b, we form right triangle EDC. However, if we call distance BC as r, then the distance of AC is br. Since points A,C,E are collinear as well as B,C,D, the two triangles ABC and EDC are similar, so ABC is a right triangle with legs of 1 and r and hypotenuse br. Note that as your ship travels along AC, the sub's circle grows along BC with the same y-coordinate, so point C is indeed the first point where they meet.
By using the Pythagorean Theorem and rearranging, we get our first identity
1/r = sqrt(b
2-1). (*)
Now after your ship meets the edge of the sub's circle, your ship must always maintain a radial speed of 1 while having a speed of b. Thus the tangential speed is sqrt(b
2-1), which is 1/r from the identity (*), which depends only on b. (Note that constant radial and tangential velocities at every point is a characteristic of a logarithmic spiral.) Since the tangential speed is distance times angular speed, we get
1/r = x*θ'(x),
where θ'(x) is the angular speed and x is the distance travelled by the sub (alternatively, the radius of the sub's circle). So
θ'(x) = 1/r * 1/x,
so then by integration,
θ
2 - θ
1 = 1/r * (ln(x
2) - ln(x
1)).
From the above image, we know that your ship must travel this spiral through the angle CBF, which has an angle of θ
2 - θ
1 = pi/2. Now the initial distance of the spiral is x
1=r and the final distance is x
2=1, so this simply gives
pi/2 = 1/r * (-ln(r)).
Then we simply solve for the variables r and b. WolframAlpha gives r≈0.474541, and plugging into (*) and solving gives b≈2.332533, which is our answer.
The following image (created from
desmos.com) shows the path your ship must take at speed b≈2.332533 that allows you to reach port safely. The blue part is the straight line and the red part is the logarithmic spiral. Note that the transition between blue and red occurs at the point (0,r) ≈ (0,0.474541).