In: Mechanical Engineering
Ship A is traveling north at 6 mi/hr, and ship B is traveling west at 12 mi/hr. When ship A was dead ahead of ship B, it was 6 mi away. Use MuPAD to determine how close the ships come to each other.
The distance between two vectors can be calculated as:
d = √ s21 + s22
To find the minima point, equate the derivative with 0. This point can be then put into the equation to calculate the least distance.
To calculate the derivative using MuPAD, the diff function is used. The solve function can be used to solve the arithmetic equations.
The program can be defined as:
Displacement of the ships is calculated as:
A:=t-> 6*t;B:=t-> 12*t;
Calculate the distance between the ships as:
s:=t-> sqrt((6-B(t))^2+A(t)^2)
Calculate the derivative as:
ds:=diff(s(t), t);
Solving for t:
solve(ds=0, t)
Calculate the least distance as:
s(op(%));
Get the result in decimal value using float function as:
float(%)
The result obtained is:
Displacement of the ships is calculated as:
Calculate the distance between the ships as:
Calculate the derivative as:
Solving for t:
Calculate the lease distance as:
Get the result in decimal value using float function as:
Thus, the least distance between the ships has been calculated.