Can anyone help me with this:
We have a room 4 metres deep and 4 metres wide. In the far right corner is a mousehole. The cat starts in the bottom left corner, and the mouse starts in the top left corner i.e. cat starts at (0,0) and mouse at (0,4), and the mouse hole is at (4,4).
The cat starts to chase the mouse and always runs directly at the mouse. The mouse runs straight for the hole i.e. along the top wall from (0,4) towards (4,4).
The cat has a constant speed, so too does the mouse. Cat speed is 2x faster than mouse .
Questions: Will cat catch the mouse, before mouse get away ?
I will ilustrate solving step by step manualy
- $y=y(x) $ equations of curve (cat route way )
In moment $x_0$ cat made pass way : $$l(x_0)=\int_{0}^{x_0} \sqrt{1+(y'(s))^2} ds. $$
Mouse way is on tanget's of curve $y=y(x)$ , equation of that tanget is $$p(x)-y(x_0)=y'(x_0)(x-x_0).$$
So coordinates of mouse are $$\left(4,y(x_0)+y'(x_0)(4-x_0)\right),$$ from it we get $$\int_{0}^{x} \sqrt{1+(y'(s))^2} ds=2\left(y(x)+y'(x)(4-x)\right).$$ $$\sqrt{1+(y'(x))^2}=2(4-x)y''(x). $$
We need solve Cauchy problem
$$\left\{\begin{array}{rcl} 2\sqrt{1+(y'(x))^2}&=&2(4-x)y''(x), \\ y(0)&=&0,\\ y'(0)&=&0 \end{array}\right.$$
When we solve it we get
$$y(x)=\frac{1}{6} \left(-\sqrt{4-x} x-8
\sqrt{4-x}+16\right)$$,$$y(x)=\frac{1}{6} (-16 + 8\sqrt{4 - x} + \sqrt{4 - x} x).$$
My question here for Mathematica is next:
Have anyone idea how to make manipulate that i see on graph cat-mouse moving, so with that manipulate I can see the moment and when cat catch mouse etc.
I wrote for my Student research project this and now i need as much as can to involve here Mathematica (so give some idea if you have for plotting , manipulate plot etc) .