wu :: forums (http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi)
riddles >> medium >> Optimal Time to Jump Off a Swing
(Message started by: kordle on Jul 20th, 2009, 1:29am)

Title: Optimal Time to Jump Off a Swing
Post by kordle on Jul 20th, 2009, 1:29am
First post here. I do a bunch of Project Euler and heard this forum mentioned in one of the forums there. Nice joint you got here.

This is essentially a physics problem. It came up when I was chatting with a friend a few weeks ago, so I did some algebra and made some graphs.

Say you're swinging on a regular swing (you're the mass on a pendulum). What is the optimal time to jump off the swing if you want to jump as far as possible?

There's lots of parameters you can throw in here:
Distance from swing to ground at rest.
Length of chain.
Mass of jumper, mass of swing.
Assumed state maximum angle in a stable swinging pattern.
Strength of gravity on your home planet.
Others.

Some end up being relevant, some not.

I couldn't find anything quite like this through the search bit of the site. Hopefully this will interest some people here. I'll follow up in a few days with my analysis if anybody seems to be interested.
cheers
-dave

Title: Re: Optimal Time to Jump Off a Swing
Post by Ronno on Jul 20th, 2009, 4:54am
A simple pendulum?

Title: Re: Optimal Time to Jump Off a Swing
Post by towr on Jul 20th, 2009, 5:55am
Is the jump distance taken from the the seat of the swing, or from the resting position? And just horizontally, or from point of departure to point of impact?

Title: Re: Optimal Time to Jump Off a Swing
Post by rmsgrey on Jul 20th, 2009, 6:03am

on 07/20/09 at 05:55:03, towr wrote:
Is the jump distance taken from the the seat of the swing, or from the resting position? And just horizontally, or from point of departure to point of impact?

And is it straight-line distance, or distance along the path travelled?

Title: Re: Optimal Time to Jump Off a Swing
Post by towr on Jul 20th, 2009, 6:06am

on 07/20/09 at 06:03:44, rmsgrey wrote:
And is it straight-line distance, or distance along the path travelled?
Yeah, I had though about asking that, but I really didn't want to give him any ideas :P It's difficult enough as it is.

Title: Re: Optimal Time to Jump Off a Swing
Post by kordle on Jul 20th, 2009, 11:54am
I take distance measured along the ground from where the swing rests to where you hit the ground first.
(I figure a real-life swing-jump contest would have to be conducted with this measure)

Measuring distance from the seat at the time of release doesn't change much, and I doubt measuring the distance along the path traveled would change the optimal angle to jump from much, either.

Title: Re: Optimal Time to Jump Off a Swing
Post by Azgard on Jul 20th, 2009, 5:35pm
I should think it's a relatively simple manner of Newton's Second Law... Jump off the swing when your initial direction of movement would be at a 45 degree angle up from the ground for optimal horizontal distance.

Or am I forgetting things from my physics classes?

Title: Re: Optimal Time to Jump Off a Swing
Post by kordle on Jul 20th, 2009, 5:42pm
That doesn't quite do it.
Your speed is at a maximum when you're in the swing-hanging-freely position, and as you undergo the periodic motion, any deviation from that has you losing speed, until your horizontal speed becomes 0, and then starts to pull you back to center, at the extent of your swing.
As the distance to the ground gets big, all other things being equal, you'll want to jump off closer to that spot with maximum speed.

Title: Re: Optimal Time to Jump Off a Swing
Post by Azgard on Jul 20th, 2009, 6:12pm
I was just thinking of the problem of firing a baseball from a canon... At what angle do you need to fire to optimize your horizontal distance? 45 degrees. Anything more or less and you loose on your horizontal distance. Do I remember right?

Besides, are we sure the point in the swing with the maximum speed and the point where release would be 45 degrees are not one and the same?

Title: Re: Optimal Time to Jump Off a Swing
Post by ThudanBlunder on Jul 20th, 2009, 10:52pm

on 07/20/09 at 18:12:01, Azgard wrote:
I was just thinking of the problem of firing a baseball from a canon... At what angle do you need to fire to optimize your horizontal distance? 45 degrees. Anything more or less and you loose on your horizontal distance. Do I remember right?

It is 45o only when we assume the baseball is fired from ground level. Here, we are being 'fired' from a swing that is above ground level, similar in principle to firing the baseball off a cliff.

Taking both swing motion and free-fall into account, for a given swing length of fulcrum to ground, it looks like a not-so-simple maximisation problem. We won't be able to use the approximation x = sinx for small x, and so a nice, neat answer is probably not possible. Nice problem, though.

But I have no time to have a go now. SMQ should make short work of it, though.  :)



Title: Re: Optimal Time to Jump Off a Swing
Post by Ronno on Jul 21st, 2009, 2:43am

on 07/20/09 at 22:52:56, ThudanBlunder wrote:
It is 45o only when we assume the baseball is fired from ground level.


We also have to assume that the launching speed is constant.



on 07/20/09 at 18:12:01, Azgard wrote:
Besides, are we sure the point in the swing with the maximum speed and the point where release would be 45 degrees are not one and the same?


The velocity is tangential to the circle at the point of release. For this to be 45 degree, the swing has to make 45 degrees with the vertical. Also the speed is highest at the lowest point of the path, easily seen by conserving the sum of gravitational potential energy and kinetic energy.

Title: Re: Optimal Time to Jump Off a Swing
Post by rmsgrey on Jul 21st, 2009, 3:52am
So, let T be the angle of the (light, inextensible) chain from the vertical, h the height of the pivot above the ground, l the length of the chain, and E a constant representing the kinetic energy of swing-seat plus person at T=0 divided by the mass of swing-seat plus person (the mass cancels out unless you want to start allowing for friction and air resistance...)

Taking x-y co-ordinates with an origin at ground level directly below the pivot, so that the swing's motion is within the plane, you need to find T to maximise the x-coordinate of the point where your projectile motion crosses the x-axis, launching from:

(l*sinT, h - l*cosT)

with initial speed:

SQRT[ 2E - 2gl(1-cosT) ]

at angle T above the horizontal, and constant downward acceleration of g

That gives position in terms of T, time after launch, t, and a bunch of constants as:

x = lsinT + t SQRT[2E - 2gl(1-cosT)] cosT
y = h-lcosT + t SQRT[2E - 2gl(1-cosT)] sinT - gt2/2)

anyone want to tackle the algebra to find t when y=0 and use that to get an expression for x in terms of T and a bunch of constants?

Title: Re: Optimal Time to Jump Off a Swing
Post by Ronno on Jul 21st, 2009, 7:10am
I'm afraid to check the second derivative but the only real solution mathematica gives for setting the first derivative zero is ArcCos[(2/3 (1-(e/gl))].

If anybody wants to check,  :'( :'(

y= 0 gives t=(1/(2 g)) (2 Sqrt[2] Sqrt[e - g l + g l Cos[T] Sin[T] + Sqrt[   4 g (2 h - 2 l Cos[T]) + 8 (e - g l + g l Cos[T]) Sin[T]^2]

this gives x=(1/g)(g l Sin[T] + 2 e Cos[T] Sin[T] - 2 g l Cos[T] Sin[T] +
 2 g l Cos[T]^2 Sin[T] +
 2 Cos[T] Sqrt[e - g l + g l Cos[T] Sqrt[   g h - g l Cos[T] + e Sin[T]^2 - g l Sin[T]^2 + g l Cos[T] Sin[T]^2])

Title: Re: Optimal Time to Jump Off a Swing
Post by Azgard on Jul 21st, 2009, 7:51am
Just a side note (because I am now officially out of my league) are we including any bounces after the initial landing towards the total horizontal distance traveled?  ::)

Title: Re: Optimal Time to Jump Off a Swing
Post by Ronno on Jul 21st, 2009, 9:04am
No. The first collision is perfectly inelastic, that is, the floor is perfectly sticky.

Title: Re: Optimal Time to Jump Off a Swing
Post by Azgard on Jul 21st, 2009, 9:09am
The floor doesn't have to be sticky for that to happen, just turn the child into very soft play dough or clay... ::)

Or, have the child landing in a pool  :D

Title: Re: Optimal Time to Jump Off a Swing
Post by Ronno on Jul 21st, 2009, 9:23am
Yeah the child can be perfectly sticky too.   ::)

But in the pool he can still keep going forward so the distance would be greater. ;D

Title: Re: Optimal Time to Jump Off a Swing
Post by Ronno on Jul 21st, 2009, 9:27am
Btw my solution requires 5gl>=2e.
Really can't see why this should be a requirement.  ???

Title: Re: Optimal Time to Jump Off a Swing
Post by Azgard on Jul 21st, 2009, 9:27am
But if we count the surface of the water as the "ground" the landing point, once he goes under the water (as he would have to do in landing) anything else the child does is just plain fun!

Assuming the child did not belly flop into the pool... :o

Title: Re: Optimal Time to Jump Off a Swing
Post by kordle on Jul 21st, 2009, 11:32am
Decent, ronno, but it's a little bit awkward to parameterize it in e.
See:

Code:
Manipulate[ Plot[(1/g) (g l Sin[T] + 2 e Cos[T] Sin[T] - 2 g l Cos[T] Sin[T] +
    2 g l Cos[T]^2 Sin[T] +
    2 Cos[T] Sqrt[e - g l + g l Cos[T]] Sqrt[       g h - g l Cos[T] + e Sin[T]^2 - g l Sin[T]^2 +
       g l Cos[T] Sin[T]^2]), {T, 0, Pi/2}, AxesOrigin -> {0, 0}],
[g, 9.8}, 0, 100},
[l, 1}, 1, 100},
[h, 0}, 0, 100},
[e, 1}, 0, 100}]

Certain settings of the parameters behave oddly. I'm not totally sure if it's correct, but it behaves somewhat like my solution.
Try it again with a more directly physical parameter than e and you might see an interesting result pop out.

Title: Re: Optimal Time to Jump Off a Swing
Post by Ronno on Jul 21st, 2009, 8:30pm
You mean the velocity at mean position?
The curve does behave oddly

Title: Re: Optimal Time to Jump Off a Swing
Post by ThudanBlunder on Jul 21st, 2009, 8:34pm
I would first consider the simpler model with l = h

Title: Re: Optimal Time to Jump Off a Swing
Post by Ronno on Jul 22nd, 2009, 3:38am
If my solution is correct, h doesn't matter except possibly being greater than l.

Title: Re: Optimal Time to Jump Off a Swing
Post by rmsgrey on Jul 22nd, 2009, 9:44am

on 07/22/09 at 03:38:23, Ronno wrote:
If my solution is correct, h doesn't matter except possibly being greater than l.


Which casts doubt upon your solution - when h is very, very large, the extra flight time you gain by launching at relatively large angles, and having purely horizontal travel at a higher altitude is insignificant compared to the time spent falling anyway, so you're best off launching when the swing is only just past vertical. When h is only slightly larger than l, launching at small angles doesn't get you even as far as launching at the peak of your swing would...


As for the relationship 5gl>=2E, from considering the physical situation, anything with E>gl represents swinging above the horizontal at the peak of the swing - E represents either the kinetic energy per unit mass at the bottom of the swing or the gain in gravitational potential energy per unit mass between the bottom and the peak of the swing (the two being equivalent and representing the total energy available)



Edit:

If you like, you can write E=dg where d is the maximum vertical displacement achieved by the swing from rest, making the proposed solution earlier:

T=ArcCos[2/3 (1-(d/l))]

The problem is that the swing only swings up to ArcCos[1-(d/l)], while the proposed solution has you jump off from a higher point...

This page (http://www.mathematik.uni-bielefeld.de/~sillke/PUZZLES/swing-jump) gives an answer in terms of l and (h-l+E/g) - the length of the chain, and the height above the ground of the highest point the swing reaches. With that parameterisation, the answer is still fairly messy, but possibly less so than the one I'm now up to 4 filled sides of A4 and counting on - I've managed to find the first derivative of x (assuming no errors in my working) - though I've yet to write it out in full in one place - at present, it's written out as a number of primitive terms and a function representing the messy bit with the square roots in - which is itself written out as the ratio of two full-line expressions (one of which is the square root of something that's looking closer and closer to being expressed as a square)

It looks promising to substitute dg for E as above, and express things in terms of the ratio of pivot-height to radius, h/l, rather than h though it does still leave me playing with trig identities to try to simplify the remaining expressions...



Powered by YaBB 1 Gold - SP 1.4!
Forum software copyright © 2000-2004 Yet another Bulletin Board