hw2 solution

# hw2 solution - 1 PHZ 5156 Computational Physics Homework 2...

This preview shows pages 1–3. Sign up to view the full content.

1 PHZ 5156, Computational Physics Homework 2 Solution September 13, 2005 Problem 1 (Garcia 1.23) (a) v = 2 π r/T with r = Rcos40 and T=24*3600 s gives v=3.553076903 x10 2 m/s. (b) a = v 2 /r = 2.583870440 x 10 -2 m/s 2 . (c) a' is the same with R replaced by R+2m=6378002 m. This gives v’ = 2.553078017 x 10 2 m/s a’ = 2.583871249 x 10 -2 m/s 2 a’ –a = 8.090000000 x 10 -9 m/s 2 This is accurate at most to three places (8.09). This is repaired by canceling some terms using algebra: a = v 2 /r = (2 π /T) 2 R cos40 a’ = same with R replaced by R+2m hence a’ – a = (2 π /T) 2 (2m)cos40 = 8.102447279 x 10 -9 m/s 2 This is exact to the number of places shown. Can see that the first approach was only accurate to two decimal places.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Problem 2 Python code # HW2, problem 3. # Approximate the derivative of f(x)=exp(2x) at x=3 # using the FS and CS approximations. Plot the results. # MDJ 9/13/05 from scipy import * import Gnuplot,Gnuplot.funcutils g = Gnuplot.Gnuplot(debug=0) g('set terminal aqua') # Array of step sizes h h=10.**arange(-20,0) # Calculate for x=3 x = 3. exact = 2.*exp(2.*x)
This is the end of the preview. Sign up to access the rest of the document.

### Page1 / 5

hw2 solution - 1 PHZ 5156 Computational Physics Homework 2...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online