This is a related problem to Fly and Two Trains Riddle, but must not be confused for a duplicate.
A man is taking a leisurely walk with his pet fly at a pace of $v_m$. While the fly is buzzing at a speed of $v_f$. At a distance $d$ from their house, the fly starts to fly back and forth between the house and the man, while the owner walks back with speed $v_m$.
The previous question asks for the total distance the fly traveled, which (obviously?) is given as $d_f = (v_f \cdot d)/v_m$. I had the two similar questions about this problem
- At which times does the fly visit home?
- Is it possible to find a function / method, which takes in a time $t \in [0,d/v_m]$ and returns the fly position?
For question 1, I cam up with the following solution
$$ \begin{align*} v_d \cdot ( t[n] - t[n-1] ) & = s - v_m \cdot t[n] \\ t[n-1] & = 2\cdot t[n-2] - t[n-3] \end{align*} $$ With initial conditions $$ t[1] = \frac{s}{v_m} \, , \ \ t[2] = \frac{2s}{v_m+v_f} \, , \ \ t[3] = \frac{4s}{v_m+v_f} - \frac{s}{v_m} $$ After some numerical tests this seems to hold, but is far from a closed solution (solving the reccurence relation leads to a gross forth order polynomial). Is there a simpler form for the answer?
For the next part I have no idea where to start, nor if it is possible. Any ideas or help is much appreciated.