Sunday, February 28, 2010

 

More Hints for HW 2


I have received more questions and comments about HW 2 and decided to post the responses on-line so that you all have some hints on HW 2 (and on what to expect in later HW and the exams).  Please let me know if you have other questions about HW 2.

In problem 3.6, what is our starting point?  We could start this at m - M(Sun) = -2.5 * log(F/F(10,sun) and have it be pointless.
While the solution is very short, it is not that short.  I am
guessing that you are assuming you can start with equation (3.4).  If
so, you are mistakenly trying to interchange an absolute magnitude M
for an apparent magnitude m.  As a hint, I would suggest that you try
to find an equation that includes both m and M in that section of the
book.

What is the advantage of using the rectangle method when we could just use a calculator or Mathematica to get a quicker, more accurate answer?
I'm sure you're used to dealing with simple functions that are easily
defined by an equation.  As I mentioned in class, not all functions
(including this one) can be integrated analytically and must be done
numerically.  As you will discover later, not all functions can even
be put into the form of an equation!  Thus, it is impossible to
integrate them analytically and extremely difficult to integrate them
with Mathematica. However, Excel will handle these problems deftly.

If you desire to use Mathematica to solve these relatively simple
homework problems, please feel free to do so.  However, you will be at
a sore handicap in your later research (and possibly on the exams)
when a problem comes up that is nearly impossible with Mathematica but
is trivial with Excel.

While this probably sounds "preachy", my goal in the class is not for
you to solve the astrophysics end-of-chapter problems. My goal is for
you to learn to solve problems using a set of very useful tools. I am
trying to stretch your "Excel muscles" a bit so you are ready for PHY
397/398 next semester.

 

How do you do an integration in Excel?

I got the following question from two students and decided to make up an example spreadsheet showing how to do integration in Excel to share with all of you. (Sunday@4:42 PM - I just posted this to a new server that should work better. Monday at 11:09 AM - I changed it to make it easier to read and to match better with the midpoint definition in Wikipedia.)

Suppose we want to integrate x2 from 0 to 2. Analytically, know the solution is 2 2/3. Even if we couldn't solve it analytically, we could solve it numerically using the rectangle method.  This is done in the example spreadsheet, with dx set to 0.1. I'm using the "midpoint" approximation instead of the top-left or top-right corner approximation.

You'll notice that I don't bother to calculate the midpoint between x=0 and x=-dx since we won't be using that in the calculations. Very often when doing numerical integrals or derivatives in a spreadsheet, you end up with a column with one extra or one fewer row.

If you try changing dx to 1.0, you see that the solution comes out to 3.0, which is pretty close to correct. If you try changing it to 0.01 and scroll down, you'll see that you get a closer answer.


Thursday, February 25, 2010

 

SDSS Scavenger Hunt

At the beginning of class today, we will be doing the SDSS Scavenger Hunt.  Teams will each have 30 minutes to find as many objects as possible.

Tuesday, February 16, 2010

 

Homework 2 Due 3/1

Homework 2 (due 2/22 2/27 3/1)


Here are the problems for HW 2.  To let you know the difficulty of each, I've put them in 3 categories.  I would expect that all students would be able to do the first four.  I would expect that B-level students would also be able to do 3.6 and 3.16.  I think that only A-level student would be able to complete 3.12.


"C-level" problems (25 points each): 3.3, 3.7, 3.9
"B-level" problem (10 points each): 3.6, 3.16
"A-level" problem (5 points each): 3.12

Monday, February 15, 2010

 

Help with HW 1



Q: So our orbit thing is not due on tuesday? A: Problem 2.15, the VPython problem, is due at the same time as the others, before 11:59 PM on Monday, February 15th.

Q: I know you specified in the directions not to use the Orbit code, but when asking about class on Tuesday I was told you said to modify the Orbit code with Comet Halley's data.
A: Please use the orbit.py example in VPython as the basis for your solution. Do NOT try to use the ORBIT Fortran code mentioned in the appendix of your textbook and found on the textbook publisher's website. It is far more difficult to get running on your machines.

Q: I have never taken a computer science class, and I have no idea on how to write code. 
A: Fortunately, since this isn't a computer science class, I'm not really expecting you to write the whole code for this. You simply need to do the following:
  1. Start with orbit.py code. 
  2. Change the masses to be appropriate for our Sun and Halley's comet. 
  3. Add a line to print out the time and distance between the Sun and Halley's comet. 
  4. Change the "while 1:" line to stop when the distance is 1 AU. Currently , since 1 is defined to be true all the time, the code runs forever. You need it to run only while the distance is greater than 1 AU. 
  5. Add comments to the code so I know what you were thinking at each line. Anything on a line after a # is a comment. 
Q: I have tried replacing the actual masses and radius's, but nothing shows up. 
A: Remember that I mentioned in class that if you use the actual radii, the Sun and the comet will be so small you won't be able to see them.

Q: I have no idea how to fix this. I have looked on the python website, but still have nothing. 
A: While the VPython site will tell you about how the functions work, for this particular problem, the only new function I'm expecting you to include is the "print" statement and it is very easy. Where students have typically had trouble in the past is converting units (for example, from AU to meters) or knowing what numbers to plug in. Most of the numbers were calculated in Problem 2.14.

Q: Will you be in your office at all tomorrow?
A: My schedule is pretty busy tomorrow. I'm covering Professor Moreau's classes tomorrow at 9:25 AM and at 12:15 PM and will be around a bit just before each of them if you have a question.  I am going to try to be around the office between 1:00 and 2:30 PM, as well, but can't guaranteed that today.  If we don't get a chance to meet and you need help with a particular problem, email me a phone number that you can be reached at and I'll try to call when I have a free moment to assist.

Q: In the third problem, I was wondering if it was necessary to change the coordinates from the J2000.0 date to another date. The problem does not necessarily specify it but I know you mentioned that we would need to know how to convert dates an I am not sure where that comes into play.
A: You do not need to convert dates for Problem 1.8. You would have needed to do that for Problem 1.7, but I ended up not assigning Problem 1.7.

Q: I have been looking to find relation between the period and the semi major axis. I have found relations but they typically involve a mass of the sun, and with the second portion of the question asking for an estimation of the sun's mass, I am a little confused.
A: For Problem 2.14 (a), you can use the simple, empirical version of one of Kepler's Laws to find the semimajor axis.  For Problem 2.14 (b), you will need the more physical version of one of Kepler's Laws. This problem is meant to be a simple one, so don't "overthink" it.

Thursday, February 4, 2010

 

Homework 1 Due 2/15

Your first homework set for this will be the following:

HW 1 (due 2/15): Problems 1.5, 1.6, 1.8, 2.14, and 2.15

The solutions will need to be turned is at separate "tab/sheet" in a single spreadsheet. There should be adequate English text on each sheet declaring the problem and its solution. Problem 2.15 should be done with your own VPython code instead of using Orbit. This VPython code should also be uploaded to Blackboard for grading.

Monday, February 1, 2010

 

Course Syllabus

I've drafted a syllabus for PHY 272 and am working on a schedule.  Please read over this if you can before our first class on Tuesday.  (UPDATE: I now have the schedule posted, as well.)

 

Telescope Lab Time?

I would like to reschedule a few of our regular 5:30 to 7:10 PM meetings so that we can do some telescope work at our observation platform on the roof of Koury. Please let me know your availability for the following time slots by completing this form.

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]