# Wolf chasing chicken

1. Jun 25, 2009

### Nick89

Hi,

First of all, I hope this is the right forum for this. I was thinking about the brain teaser forum too, but thought this was more appropriate (at least, I think there's no trick involved).

Someone on another forum asked the following question.

Suppose you have a wolf and a chicken on a cartesian x-y plane. The chicken starts running away from the wolf, but it moves only in the +y direction, with constant speed $w$

The wolf, initially on the same axis as the chicken, separated by a distance $d$, will start to move toward the chicken, at constant speed $v$.

The crux is that the wolf always faces the chicken at all times. It does not 'think ahead' and try to intercept the chicken, he just empties his mind, stares at the chicken and starts running.

Now, there's a few questions like 'how long does it take the wolf to capture the chicken', or at what distance did the wolf run, etc. But my question is, what is the path of the wolf??

The setting again, as worded by the original poster:

We've been trying to solve this with a few people, and I think I have finally come close, except for one major detail.

I wrote a quick and dirty simulation which shows the following behavior (blue = wolf, red = chicken):
First, the speed of the chicken is 0.5, and the wolf 0.7:
Relatively slow wolf

Then I increase the speed of the wolf to 1.5 and the interception is of course a bit sooner:
Relatively fast wolf

Here's two video's of these simulations:

I then derived an equation for the path, and graphed it, and got:

The derivation is as such:

This is based on the fact that the wolf faces the direction (d - vx, wt - vy) , which is the vector between the wolf and the chicken (since wt is the y-coordinate of the chicken). So the x coordinate of the wolf should increase in the (d-vx) direction, and the y coordinate in the (wt - vy) direction.

The graph above is for d = 10, v = 0.7 and w = 0.7 (as in the simulation).

The graph looks similar, but there's one major problem: the vertical asymptote is not at x = d!!
I didn't think this was a problem at first, the wolf had merely captured the chicken already at x = d, and the graph is nonsensical after that.

However, I discovered that the position of the asymptote depends on the speeds v and w... For example, if the speeds are exactly the same, I would expect the asymptote to be at x = d (as always), and the wolf just trailing behind the chicken at a constant distance, never quite reaching x = d.

This is true in my graph if v = w = 1. It is NOT true if v = w = 1/2 or 2 or ... If v = w = 1/2, the asymptote is twice as far, at x = 20 instead of 10. If v = w = 2, it's at x = 5...

This is what I don't understand... I don't think my equation is correct therefor.
What do you think?

Also, I don't know any way to verify that the speed of the wolf is constant. It probably isn't at all, while it should be...

Anyway got any thought on this?

Last edited by a moderator: Sep 25, 2014
2. Jun 25, 2009

### Nick89

Ok, scratch most of the above :P

I've noticed my set of DE's wasn't correct. I think it should be this:

$\mathbf{p}_w$ is the position vector of the wolf. $\mathbf{p}_c$ is the position vector of the chicken. Their difference is the vector between wolf and chicken, which is the direction the wolf runs in.

With this, the equation becomes:
$$y(x) = -wv - w \ln \left( \frac{d-x}{d} \right)v - \frac{x-d}{d} wv$$

And the graph looks similar, but now has a vertical asymptote for every v and w. I think I finally got it, did I?!

3. Jun 25, 2009

### Nick89

On second thought... When I try to determine when the chicken is intercepted, there is no solution.

Solving x(t) = d gives $\exp(-t/v) = 0$, no solution (well, t to infinity).
Solving y(t) = wt gives t = 0, which is valid of course, but it's not the solution we need...

Damn!

4. Jun 25, 2009

### Staff: Mentor

Isn't it called curve of pursuit?

5. Jun 25, 2009

### Nick89

Thanks, I had never heard about it. I think that's exactly what it is.

6. Jun 25, 2009

### Staff: Mentor

7. Jun 25, 2009

### Nick89

Yeah, I found that. The wikipedia article isn't really descriptive, but it links to that page. The mouse problem is also pretty cool hehe, also never heard of that one!

8. Jun 25, 2009

### arildno

Hmm, possibly, the mathworld result reduces to the one I had in mind, but I'll post mine anyhow.

We let the chicken start at (0,0), the wolf at (d,0), w and v are the chicken's and wolf's speeds, respectively.

DIFF.EQS GOVERNING THE WOLF'S PATH:
($$u\equiv{wt}-y$$)

These must be:
$$\frac{dx}{dt}=-\frac{vx}{\sqrt{x^{2}+u^{2}}},\frac{dy}{dt}=\frac{vu}{\sqrt{x^{2}+u^{2}}}(*)$$
Dividing the first with the second, letting Y(x) be regarded as the sought path, we get:
$$\frac{dY}{dx}=-\frac{u}{x}(**)$$

Now, since u=wt-y, we get:
$$\frac{dy}{dt}=w-\frac{du}{dt}$$
Letting u(t)=U(x(t)) (meaning: $$\frac{du}{dt}=\frac{dU}{dx}\frac{dx}{dt}$$)the second equation in (*) may be re-written as:
$$w+\frac{dU}{dx}\frac{vx}{\sqrt{x^{2}+U^{2}}}=\frac{vU}{\sqrt{x^{2}+U^{2}}}$$
which can be manipulated into:
$$\frac{dU}{dx}=\frac{U}{x}-\frac{w}{v}\sqrt{1+(\frac{U}{x})^{2}}(***)$$

Now, setting $$S(x)=\frac{U}{x}$$,
we have:
$$\frac{dS}{dx}=\frac{1}{x}(\frac{dU}{dx}-S)\to\frac{dU}{dx}=x\frac{dS}{dx}+S$$

Inserting this into (***) yields:
$$\frac{dS}{dx}=-\frac{w}{vx}\sqrt{1+S^{2}}(****)$$

This diff.eq for S is separable, and with starting value for x being d, and for S being 0, we get:
$$S(x)=Sinh(\frac{w}{v}\ln(\frac{d}{x}))$$

Since S equals U/x, we may rewrite (**) as:
$$\frac{dY}{dx}=-Sinh(\frac{w}{v}\ln(\frac{d}{x}))$$

This might look horrendous, the left-hand side is easily transformed:
$$Sinh(\frac{w}{v}\ln(\frac{d}{x}))\equiv\frac{1}{2}((e^{\ln(\frac{d}{x})}^{\frac{w}{v}}-(e^{\ln(\frac{d}{x})})^{-\frac{w}{v}})=\frac{1}{2}((\frac{d}{x})^{\frac{w}{v}}-(\frac{x}{d})^{\frac{w}{v}})$$

Thus, we have:
$$\frac{dY}{dx}=-\frac{1}{2}((\frac{d}{x})^{\frac{w}{v}}-(\frac{x}{d})^{\frac{w}{v}})$$, which is trivial to solve.

Last edited: Jun 26, 2009
9. Jun 25, 2009

### arildno

This would be the solution:
$$Y(x)=\frac{1}{2}(\frac{\alpha}{1-\beta}d^{1-\beta}-\frac{\gamma}{1+\beta}d^{1+\beta})-\frac{1}{2}(\frac{\alpha}{1-\beta}x^{1-\beta}-\frac{\gamma}{1+\beta}x^{1+\beta})$$

where:
$$\alpha=d^{\frac{w}{v}},\beta=\frac{w}{v},\gamma=d^{-\frac{w}{v}}$$

Note:

This presupposes that w and v are unequal.

In mathworld, I think w and v have been assumed equal, in which a logarithmic term in x and a square in x would, indeed, appear in the solution!

EDIT:

A clean-up yields the equivalent expression:
$$Y(x)=\frac{d\beta}{1-\beta^{2}}-\frac{d}{2}(\frac{1}{1-\beta}(\frac{x}{d})^{1-\beta}-\frac{1}{1+\beta}(\frac{x}{d})^{1+\beta}),\beta=\frac{w}{v}$$

Last edited: Jun 25, 2009
10. Jun 25, 2009

### Nick89

I tried reproducing the equations from mathworld, but now using arbitrary v and w instead of 1, but somehow they cancel out completely...

Also, I think there might be a mistake on their site, although I can't imagine that. From equation (11) to (13). In (11) they have:
$$xy' + t - y = 0$$
Then they note that, using the arc length integral:
$$s = \int \sqrt{1 + (y')^2}\, dx = vt = t$$
(since v = 1)

Then they substitute t = that integral into (11) and magically transform the +t into -t! :
$$xy' - y - \int \sqrt{1 + (y')^2}\, dx$$
There was +t in (11), and it became minus the integral in (13)...?

I will have a look at your solution later. I'm not sure how the mathworld result reduces to this yet... It doesn't seem very similar :p

11. Jun 26, 2009

### Nick89

Ok, I've worked your example through and solved it, but a few questions. If $\alpha = d^{w/v}$ then $\alpha d^{1-w/v} = d^{w/v}d^{1-w/v} = d$, right? So your final solution can be simplified quite a bit.

Anyway, I wrote it all out and the determined the y-intercept of the function, which would be the point of interception. I got a surprisingly simple result:
$$Y(0)= \frac{vwd}{v^2-w^2}$$

And the time it takes the wolf to get there is of course the same as the time it takes the chicken to get there, which is
$$t = \frac{Y(0)}{w} = \frac{vd}{v^2-w^2}$$

The original poster on the other forum has confirmed that this is correct. He is claiming though that there is a MUCH simpler solution which tells us the time and interception point without much algebra at all. Of course, we don't get the path of the wolf then, but the question was to determine the time and interception point. I'm waiting for him to show me the easy solution.

12. Jun 26, 2009

### arildno

Hi, nick!

If you read my clean-up edit in my last post, you'll find the simplification there.

Secondly, post the easy solution when you get it, I'll be interested.

Thirdly, you haven't exactly proved that the time at which the wolf hits the y-axis equals the time it gobbles up the chicken.

A priori, it is conceivable that the wolf has to run along the y-axis for some time before he reaches the chicken.

Although I very much doubt that this would be the case, I would have liked a proof of the simultenous y-axis and chicken "collision"

13. Jun 26, 2009

### Nick89

Cool. Another note, shouldn't the DE's in (*) have a square root?
$$\frac{dx}{dt} = \frac{-vx}{\sqrt{x^2+u^2}}$$
?
You seem to use the sqrt later, so it was probably a typo?

14. Jun 26, 2009

### arildno

That is indeed a typo.
I'll change it forthwith.

EDIT:

15. Jun 26, 2009

### Staff: Mentor

No idea about interception point, but time is just a matter of initial distance and speed difference. That's a kindergarten level question

16. Jun 26, 2009

### Nick89

Is it? I must be missing it then, I haven't got a clue how to derive the equation I posted above easily :p

17. Jun 26, 2009

Staff Emeritus
Correct. It's also called a tractrix.

18. Jun 26, 2009

### Staff: Mentor

Think outside of the box.

You will hate yourself when you will find out

19. Jun 26, 2009

### Nick89

Hmm... The original poster just told me the short solution, but both of us have no idea why that must be true. It does give the same answer... I just can't see why. It looks like a coincidence to me at this point lol...

His answer was to determine the distance the chicken can run (before being caught) in two cases:
a) The chicken runs exactly away from the wolf, down the x-axis
b) The chicken runs exactly toward the wolf, up the x-axis

The answer to the question when the chicken runs up the y-axis instead would then be the average of these two distances...

It does work out:
The time it takes:
$$t_a = \frac{d}{v-w}$$
$$t_b = \frac{d}{v+w}$$

The distance is thus:
$$x_a = wt_a = \frac{wd}{v-w}$$
$$x_b = wt_b = \frac{wd}{v+w}$$

Average:
$$x = \frac{x_a + x_b}{2} = \frac{1}{2} \left( \frac{wd}{v+w} + \frac{wd}{v-w}\right) = \frac{1}{2} \left( \frac{(v-w)wd + (v+w)wd}{(v+w)(v-w)} \right) = \frac{vwd}{v^2-w^2}$$

I just can't see why this should be so obvious..? Sure, the chicken running up the y-axis is exactly 'between' running toward the wolf and running away from the wolf, but since the path of the wolf is so 'odd' it doesn't click in my mind :p

20. Jun 26, 2009

### Staff: Mentor

Try to solve the question about amount of time required in wolf's coordinates.

21. Jun 26, 2009

### Nick89

Meh... I know I'm missing something, but I can't figure it out. How does that help me?

22. Jun 26, 2009

### Staff: Mentor

Are you aware of the fact this is the same equation? Hint: think velocity, not speed.

Will it look different for any other direction?

Does the change of the direction change the distance?

23. Jun 26, 2009

### Nick89

I'm slowly starting to follow :p I assume you mean that I can take w, the speed of the chicken, to be negative when it runs toward the wolf (or the other way around). That makes sense I guess.

Will it look different for any other direction... Direction of what? The chicken running in a different direction than down the x-axis or up the x-axis?

Do you perhaps mean that the amount of distance the wolf gains on the chicken per unit of time is constant, no matter which direction the chicken runs in? So that the distance between the two decreases linearly?

24. Jun 26, 2009

### Staff: Mentor

The only thing that you should take into account is the speed at which the distance between them changes.

Think about the direction of the wolf motion.

HOT!!!!!!

25. Jun 26, 2009

### Nick89

Are you saying that, in the wolf's frame of reference, the chicken is merely moving towards the wolf, in a straight line?

I've been trying to reproduce that in my simulator, but haven't been able to yet. I have been able to look at the problem from the wolf's position (keeping the wolf stationary), but I have not taken into account that the wolf 'rotates'. Right now, the chicken kind of follows a raindrop shaped path, towards the wolf. I think if I take the rotation into account then it would move in a straight line... Correct??