to COMP 205 Homework 10 Apr 22, 1998
Due: April 29, 1998
We consider the following problem: a jogger is running along his/her favorite trail on the plain in order to get his/her daily exerc ise. Suddenly, he is being attacked by a dog. The dog is running with a constant velocity w. Compute the orbit of the dog.
The orbit of the dog has the property that the velocity vector of the dog
points at every time to its goal: the jogger. We assume that the jogger
is running on some trail and that his/her movement is described by the
two functions
and
Let us assume that for t = 0 the dog is at the point
,
and that at time t his/her position will be at
. The following equations
hold:
: The dog is running with
constant velocity.

and
from the second equation, we obtain

Solve this equation for
and get the equation for the orbit of the
dog as:

Use the Matlab differential solvers ode23() or ode45() to solve for these equations. This system will have a singularity when the dog reaches the jogger. In this case, we should terminate the integration when the dog reaches the jogger. Furthermore, you should try different jogger functions like
. Let w = 10 (the velocity of the dog).
else
. In this case the jogger turns
back returns home. Again use w = 10.
. Initially use w = 19. In this case
the dog should catch the jogger at time
. Then consider an
old, slow dog with w = 10.
For each case, you should submit the Matlab program and the plots showing the trajectory of the jogger and the dog.