A dog in the coordinate system starts from the origin along the x-axis with vk=1m/s speed. The owner starts from the (0,1) point running towards the direction of the dog with vg=2m/s speed.Show the path of the dog and owner(blue and red) on the t=[0,0.51] interval.
This is the graph that i need to get:
Here is my take on it,but for some reason the path of the owner won't reach the dog on t=[0,0.51] in my case.
{kutyax, kutyay, gazdaq, gazdaz} =
NDSolveValue[{x'[t] == 1, y'[t] == 0,
z'[t] == 2*(x[t] - z[t])/Sqrt[(x[t] - z[t])^2 + (y[t] - q[t])^2],
q'[t] == 2*(y[t] - q[t])/Sqrt[(x[t] - z[t])^2 + (y[t] - q[t])^2],
x[0] == 0, y[0] == 0, z[0] == 0, q[0] == 1}, {x, y, z, q}, {t, 0,
0.51}]
Show[ParametricPlot[{kutyax[t], kutyay[t]}, {t, 0, 0.51},
PlotStyle -> Blue],
ParametricPlot[{gazdaq[t], gazdaz[t]}, {t, 0, 0.51},
PlotStyle -> Red]]