Re: Ball Rolling down on Cosh[t] Path

*To*: mathgroup at smc.vnet.net*Subject*: [mg36738] Re: Ball Rolling down on Cosh[t] Path*From*: Selwyn Hollis <slhollis at earthlink.net>*Date*: Sat, 21 Sep 2002 02:22:08 -0400 (EDT)*References*: <ambv6f$r44$1@smc.vnet.net>*Sender*: owner-wri-mathgroup at wolfram.com

Matthias, The simplest way to get the equation of motion is to set up the Lagrangian. Let's assume a 1 kg mass. Then the kinetic energy is KE = Simplify[(1/2)*(x'[t]^2 + D[Cosh[x[t]],t]^2)] and the potential energy is PE = 9.8*Cosh[x[t]] The Lagrangian is L = KE - PE and the equation of motion is diffeq = Simplify[ D[D[L, x'[t]], t] ] == Simplify[ D[L, x[t]] ] Now solve and animate ... xx[t_] = x[t]/. First[ NDSolve[{diffeq, x[0] == -1, x'[0] == 0}, x[t], {t, 0, 5}]] curve = Plot[Cosh[x], {x, -1, 1}] Do[ Show[curve, Graphics[Disk[{xx[t], Cosh[xx[t]]}, 0.025]], PlotRange -> {{-1.2, 1.2}, {0.9, 1.65}}, AspectRatio -> Automatic, Axes->None], {t, 0, 5, 0.1}] ---- Selwyn Hollis Matthias.Bode at oppenheim.de wrote: > Dear Colleagues, > > I intend to make an animation in which > > ball A rolls down on an inclined plane from the left whilst > > ball B - starting from the same height - rolls down Cosh[t]'s path from the > right. > > x-axis is time t, y-axis is height h. > > Ball A is fine; ball B - which should arrive at h=0 before A - is beyond my > means. > > Thank you for your consideration, > > Matthias Bode > Sal. Oppenheim jr. & Cie. KGaA > Koenigsberger Strasse 29 > D-60487 Frankfurt am Main > GERMANY > Tel.: +49(0)69 71 34 53 80 > Mobile: +49(0)172 6 74 95 77 > Fax: +49(0)69 71 34 95 380 > E-mail: matthias.bode at oppenheim.de > Internet: http://www.oppenheim.de > >