1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Finding position of simple pendulum?

  1. Oct 3, 2009 #1
    I'm trying to write a program to model a simple pendulum, and I'm having some trouble seeing how I would solve for the position w.r.t. time.

    I would ultimately like to be able to specify a length of string, acceleration due to gravity, mass (though I know it has no effect on the period) and angle it's pulled back.

    Any help would be great, thanks!

    PS: I don't think this qualifies as homework because I'm doing it for fun, but I'm very sorry if I'm wrong!:smile:
  2. jcsd
  3. Oct 3, 2009 #2
    I'm assuming you are using a pendulum with a dampening force such as air resistance. If not you will be able to exclude the resistive force parameters from this adaptation of newtons second law, allowing your pendulum to follow free oscillation. the angle in this case is equal to phi and anything following after the symbol [tex]\cdot[/tex] is meant to be the time derivative of that variable.
    Force=m(L [tex]\cdot[/tex] [tex]\cdot[/tex][tex]\phi[/tex])=restoring force+resistive force
    =-mgsin([tex]\phi[/tex])-2m[tex]\sqrt{g/l}[/tex](L [tex]\cdot\phi[/tex]) [note: the rsistive force in this case is a obscure example. you will need to create your own depending on what you would like your program to do.

    from here you will integrate solving for your angle as a function of time.

    [note: the value [tex]\sqrt{g/l}[/tex] is considered your dampening parameter which i defined in this case. if you chose to exclude a dampening force or use a different dampening scenario this will not be similar]

    to solve for A and B you need to use the first equation and the previous in combination and also set initial parameters. hope this helped!
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook