hw1 - t You may simply copy the code already developed to...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework 1 PHZ 5156 Due Thursday September 3, 2009 1. Consider the equation of a simple harmonic oscillator, in this case describing a pendulum of length l in a gravitational field g , d 2 θ dt 2 + g l θ = 0 a) Write the second-order linear differential equation above as two first-order dif- ferential equations by introducing a new variable ω which is the angular velocity. Determine the analytical solution for the harmonic oscillator. b) Use the code written in class to apply the Euler and Euler-Cromer methods to compute θ and ω vs. time
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: t . You may simply copy the code already developed to learn the basics of Fortran programming and the use of a simple text editor like vi. Compare a plot of θ vs. t over a few periods for the two methods. Also, compare the total energy vs. time computed from the two methods. How well do they compare to the analytical result? How does the computed trajectory depend on the time step Δ t ? Hand in a plot of θ vs. t and energy vs. t computed from both Euler and Euler-Cromer methods. 1...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online