At midnight, ship B was 90 km due south of ship A. Ship A sailed east at 15 km/hr and ship B sailed north at 20 km/hr. At what time were they closest together?

at time t, the distance d is

d^2 = (90-20t)^2 + (15t)^2
d^2 = 625t^2 - 3600t + 8100

2d dd/dt = 1250t-3600
dd/dt=0 when t=72/25
d(72/25) = 54

To find at what time the two ships were closest together, we need to determine the distance between them at different times. Let's break the problem down into steps:

1. At midnight, ship B was 90 km due south of ship A.
2. Ship A sailed east at a speed of 15 km/hr.
3. Ship B sailed north at a speed of 20 km/hr.

Let's consider the horizontal and vertical components separately.

Horizontal Component:
- As ship A sails east at 15 km/hr, its horizontal position increases by 15 km/hr over time.
- Since ship B is not moving horizontally, its horizontal position remains constant.
- Therefore, the horizontal distance between the two ships remains constant.

Vertical Component:
- As ship B sails north at 20 km/hr, its vertical position increases by 20 km/hr over time.
- Since ship A is not moving vertically, its vertical position remains constant.
- Therefore, the vertical distance between the two ships decreases over time.

Now, to find the time they were closest together, we need to determine when their horizontal and vertical distances are equal.

Let's assume the time in hours since midnight is given by t.

Horizontal Distance:
- The initial horizontal distance between the two ships remains constant throughout.
- Given that ship B was initially 90 km due south of ship A, their horizontal distance is always 90 km.

Vertical Distance:
- At midnight, ship B was 90 km due south of ship A.
- Since ship A is moving east at 15 km/hr and ship B is moving north at 20 km/hr, their vertical distance decreases at a rate of (20 km/hr - 15 km/hr) = 5 km/hr.

The time it takes for the vertical distance to decrease by 90 km (initial vertical distance) is calculated by:
time = distance / speed = 90 km / 5 km/hr = 18 hours.

Therefore, the ships were closest together 18 hours after midnight.

To find the time when the two ships were closest together, we can use the concept of relative velocity.

Let's assume that it took 't' hours for them to be closest together after midnight. During this time, ship A would have traveled an eastward distance of 15t km, and ship B would have traveled a northward distance of 20t km.

To determine the distance between them at this closest point, we can create a right-angled triangle with the initial distance between them (90 km) as the hypotenuse, the eastward distance covered by ship A as one side, and the northward distance covered by ship B as the other side.

Using the Pythagorean theorem, the distance (d) between the ships at this point is given by:
d^2 = (90 - 15t)^2 + (20t)^2

Now, we want to minimize the distance between the ships, which means finding the minimum value of d.

Differentiating the equation of d^2 with respect to 't' and setting it to zero, we can find the value of 't' where the distance is minimized.

Let's solve this equation:

d^2 = (90 - 15t)^2 + (20t)^2
= (8100 - 2700t + 225t^2) + (400t^2)
= 8100 - 2700t + 225t^2 + 400t^2
= 8100 - 2700t + 625t^2

Differentiating with respect to 't':

d^2/dt = -2700 + 1250t

Setting it to zero:

-2700 + 1250t = 0
1250t = 2700
t = 2700/1250
t = 2.16 hours

Since time can't be fractional, we round the value to the nearest whole number. Therefore, they were closest together approximately 2 hours after midnight.

To determine the exact time, we add this time to midnight:

12:00 AM + 2 hours = 2:00 AM

So, they were closest together at 2:00 AM.