cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X

Wolf and hare - one old problem with simple Mathcad solution

ValeryOchkov
24-Ruby IV

Wolf and hare - one old problem with simple Mathcad solution

WolfHare.gif

41 REPLIES 41

Hi 

Very beautiful. I also have the analytical solution.

Show please!
But the solution without animation is not solution!

Hi

I only provide you with the most important part I have developed. Let me know if you find something wrong. (After the formula (11) there is still some simple calculation to do)
Greetings FM.

Greyhound-hare tracking curve.jpg

Greyhound-hare tracking curve 1.jpg

Thanks!

But show please the analytical view of the wolf (or борзая) tracing curve!

One Russian article with the formula is here

PS Greyhound (русская псовая борзая) is the only breed of dogs that is bred in Russia:

grayhound.png

 

Hi ValeryOchkov,

thank you very much for the article on the topic under consideration. 

 

… but this problem has no analytical solution

WolfHare-Square.gif

 

and one more

WolfHare-Circle-1.gif

… one more

WolfHare-90.gif

… and one more

WolfHare-Ellipse.gif

The wolf must stay and wait for the hare...

WolfHare-Circle-3.gif

… and one more

WolfHare-Spiral_1.gif

WolfHare-Square-1.gif

Very simple solution

Solution.png

One interesting problem for an analytical solution - what is the formula of this closed curve?

WolfHare-Spiral.png

 

WolfHare-Circle-1-3.gifWolfHare-Circle-1-4.gifWolfHare-Circle-1-5.gif


here@-MFra- wrote:

Hi ValeryOchkov,

thank you very much for the article on the topic under consideration. 

 


You welcome!

See please one English article here

And my article in attach (Russian)

And of course Pursuit curve

Is there an ODE for this case?

WolfHare-2-Circle.png

WolfHare-2-Circle (2).gif

 


@ValeryOchkov wrote:

Is there an ODE for this case?


Sure! And its the very same no matter what the path of the rabbit is.

Its always

F'/|F'|=(R-F)/|R-F|

where F and R are the vectors to the fox resp. the rabbit.

And if k is the ratio v.fox:f.rabbit, we have |F'|=k*|R'|.

Unfortunately Mathcad does not solve ODEs with vector functions, so we have to split the vector in its components:

Werner_E_0-1628988176734.png

And of course you can easily change the Rabbit's path to a cardiode, if you like.

Werner_E_1-1628989640263.gif

You may try to create an animation, where the rabbit (and so the fox) move at constant speed.

I als leave the analytical/symbolical solution up to you 😉

 

Thanks, Werner!

Why the velosity of the Fox is not constant?


@ValeryOchkov wrote:

Thanks, Werner!

Why the velosity of the Fox is not constant?


Because the velocity of the rabbit is not constant 😉 The fox's speed is always 70% (I think thats the value I had chosen) of the rabbit's speed.

And the rabbit's speed is not constant, because the parameter t used in defining the rabbits path is not (proportional to) the arc length of the cardioide :

Werner_E_0-1629018907577.png

In case of the circular rabbit path the parameter t is proportional to the arc length and with the radius=1 it actually IS the arc length.

Werner_E
25-Diamond I
(To:Werner_E)

Here's an animation with constant speed, doesn't look much better, though.

But we can see that the red rabbit can change direction lightning quick.

Werner_E_0-1629026131109.gif

 

Attach please the Mathcad sheet!


@ValeryOchkov wrote:

Attach please the Mathcad sheet!


Here you are. The constants speed ani is a quick hack requiring some nasty workarounds to compensate for numerical inaccuracies.

The basic idea can be used for any rabbit-path, though.

Keep in mind that odesolve can't find a solution for k>=1 if you chose t.end to high. As soon as the fox catches the rabbit the above mentioned vector R-F is the null vector and odesolve is supposed to fail.

 

BTW, in your animation with the elliptical path, the rabbit/hare isn't moving with constant velocity, either!

 

Show please an analytical solution!

I look and look at this animation and I expect that the hare will still run away from the wolf into the forest...


@ValeryOchkov wrote:
I look and look at this animation and I expect that the hare will still run away from the wolf into the forest...

The hare has an afterburner. The hare turns it on when the distance to the wolf becomes less than 300 m. Therefore, the hare can be saved in the forest from the wolf!

Can you solve this problem analytical?

And the second (new, fresh) problem! The hare does not run in a straight line, but along a circular arc!

WolfHare-Forsage.gif

Thanks, Werner!

But.

We are creating a differential equation. We cannot solve it analytically and we solve it numerically using one of the difference schemes. Would not it be easier to solve the problem directly with the help of a difference scheme without making a differential equation?

I suppose that this should rather be an answer to my post here: https://community.ptc.com/t5/PTC-Mathcad/Wolf-and-hare-one-old-problem-with-simple-Mathcad-solution/m-p/743860/highlight/true#M196892  , which was mainly about your request to see how to make the characters move with constant speeds.

 


@ValeryOchkov wrote:

Thanks, Werner!

But.

We are creating a differential equation. We cannot solve it analytically and we solve it numerically using one of the difference schemes. Would not it be easier to solve the problem directly with the help of a difference scheme without making a differential equation?


I may remind you that your question was this:

Werner_E_2-1629101890761.png

And yes, of course there is one.

BTW, I find it more natural and easier to set up an ODE in its natural notation and let it then solve by a reliable tool. Unfortunately Mathcad does not provide a tool to solve an ODE with vector functions, so the notation had to be more elaborate than normally necessary.

And, who knows, some day a tool will be able to solve the ode symbolically 😉 We know that this sure will not be Mathcad/Prime, though.

Or do you already have a proof that the ODE is not solvable symbolically?

One symbolic solution one partial case of the problem

WolfHareSymbol.png

 

Announcements

Top Tags