Physics
&
Astronomy


Fall '98
Courses

Physics/Math Computational Lab

Jim Mahoney (mahoney@marlboro.edu)

General Info

Time
W 11:30-1:00
Place
SciBldg 217
A 1 credit lab expanding on themes in General Physics I and Calculus I, this course taught by both Jim and Joe will emphasize the use of numerical, computer and "hands-on" lab techniques. Since this is a new course, I'm not entirely sure what all of it will look like - but expect a smattering of statistics and experimental data analysis, curve plotting and fitting, an examination of some computer simulations and mathematical computation software, as well as a few traditional experiments.

Resources

  • Software
    (Usually the documention read from within the software. Printed manuals should be in the lab.)
    Who What Where
    Maple A powerful symbolic math analysis and graphing package. Macs on the network at server:applications:area programs:math:maple
    NumberCrunch Jim's "scientific calculator with a few extras" does plots, arrays, units, etc. Macs, servers:applications:area programs:physics:numbercrunch
    Octave Very powerful numerical analysis, including differential equations. Unix, "big" - ask for an account.
    MatLab Numerical analysis and graphing; like NumberCrunch on order
    Mathematica Another powerful symoblic math package. on order
    Interactive Physics simulations of physical models Macs, PCs in the lab
    StatView statistical data analysis and graphing Macs, servers:applications:statistics and graphing
    others as we need 'em and get 'em

  • Links

Assignments

  1. for Wed Sept 9
    1. If you don't already know how, make sure you can use a web browser. (Ask someone.)
    2. Play around a bit with both Maple and NumberCrunch (see the table above) and learn your way around. The idea is to see a few different approaches to doing mathematics with a computer. Documention is online, or ask us. At a bare minimum try to
      1. Calculate the value of "960t - 16t2" when t = 2.335
      2. Ditto for "one over the square root of the log of t".
      3. Make a plot of y = x5 + 4x2 - 3x + 5
      4. Solve that last one for y=0 graphically (NumberCrunch).
  2. for Wed Sept 16
    This week's lab assignment is a first examination of errors, error bars, and statistics, as explained in class.
    1. With N=(6,12,24), flip N coins and record how many heads turn up. Do this a number of times (at least 5) for each N.
    2. Find the mean and standard deviation of your numbers for each N. (Using your calculator, NumberCrunch, or StatView (on the Mac, server:Aps:statistics&Graphing)
    3. Make a plot of the means vs N with error bars showing plus/minus a standard deviation. (NumberCrunch or graph paper)
    4. Make a second plot of the means divided by N vs N, with StndDevs/N, i.e. fractional (percent, if you like) means and errors. How does this plot change with increasing N?
    A sample solution to this problem using NumberCrunch is available.
  3. for Wed Sept 23
    1. Find Visual Calculus
      This web site has many interesting and non-interesting components. Its main virtue is that it covers most of the material of the first term of calculus, some interesting and some not. If you are enrolled in Calculus, you should come back to this site regularly and work through the examples, exercises, interactions and tutorials. For example, you should look into all the sections entitled Graphing Functions as well as Shifting Graphs.
    2. Click on Computers/Calculators.
    3. Explore Parameters and Functions.
      1. Find out how to plot a one-parameter family of curves.
      2. Go to Maple and plot the following family of curves: f(x) = x^3 - a*x, where the parameter a represents integers between 1 and 10.
      3. Find out how to plot a two parameter family of curves.
      4. Go to Maple (on school Macs; see resources listed above) and plot the two parameter family of curves f(x) = a*x^2 + b*x + 1, where a represents integers between 1 and 5 and b represents integers between 1 and 5.
      5. Plot the parametric equations
        x = (a-b)*cos(t) + b*cos((a-b)*t/b)
        y = (a-b)*sin(t) - b*sin((a-b)*t/b)
        for several values of a and b. Try b = 1 and a = n/d, where n and d have no common factor. First, let n=1 and try to determine graphically the effect of the denominator d on the shape of the graph. Then let n vary while keeping d constant. What happens when n = d+1?

        What happens if b = 1 and a is irrational? Experiment with irrational numbers like sqrt(2) or e-2. Take larger and larger values for t and speculate what would happen if you were to graph the parametric equation for all real values of t.

  4. for Wed Sept 23
    Time to start looking at Interactive Physics. Your mission is to explore how it works, and to "export" some of it's data and look at the numbers with another program.
    1. Play around a bit with the program (installed on all Lab computers).
    2. Open the "Projectile Motion" file (on desktop or in the folder "Interactive_Physics/Physics_Investigations/Projectiles"), and see how it works.
    3. Under the "File" menu, use Export... to save (time,position,velocity,accel.) to a text file.
    4. Using a graphing or spreadsheet program (e.g. NumberCrunch), import those numbers, graph them, and see how the change in position gives velocity and change in velocity gives postion.
  5. for Wed Oct 7
    Kepler's Laws with Linear Regression:
    Use Interactive Physics (and whatever other software you like, perhaps with the "export" technique we used before) to find the period T and radius R of the orbits of various planets. Plot T^2 vs R^3 to show that there is a linear relation between these variables, and find the line that best fits the points. StatView will do this nicely, as shown in class.
  6. for Wed Oct 14
    Limits and numerical sequences.
    • 1. Estimate limx->0 (sin x)/x. We need a sequence of x-values that get closer to 0 from the positive side: use the sequence, 1, 0.1, 0.01, 0.001, . . . Notice that each x-value is one tenth of the previous one. For each x calculate the corresponding y using y = (sin x)/x. Form a table of x-versus y-values; choose enough x-values so that y is accurate to eight decimal places (that is, the y-value repeats in the eighth decimal place). Now repeat using x-values that get closer to 0 from the negative side. Once you think you know what the limit is, go back and write down how many additional decimal places of accuracy you get for the limit (that is, the y-value) for each additional decimal place of accuracy for the x-value.
    • 2. Estimate limx->0 (1 - cos x)/x. Proceed as in part 1.
    • 3. Estimate limh->0 (1+ h)^(1/h). Proceed as in part 1.
    • 4. Estimate limx->0 sin (1/x). Proceed as in part 1.
    • 5. Estimate limh->0 (a^h - 1)/h. Proceed as in part 1.
    • 6. Find the value of a that makes the limit in 5 equal to 1.
    • 7 Estimate limx->0 (sin(x) - x)/(x^3). Proceed as in part 1.
    For Discussion.
    • 1. Carefully compare the rates of convergence for parts 1, 2 and 3. Which converged fastest to its limit? Is there a relationship between the rate of convergence and the shape of the graph near the limiting value? (You will need to sketch a graph of each function near the limiting value using a computer or graphing calculator.)
    • 2. What was the problem in part 4? Can you explain what happened? Think about what happens to 1/x when x gets small, and use what you know about the sin function.
    • 3. Explain how you found the value of a in part 6. Is there a similarity to your answer to 3? See if you can explain this connection. Hint: Choose a small value for h and then solve the approximate equation (a^h - 1)/h = 1 for a (by hand). Note: Parts 3 and 6 represent two possible ways of defining the constant e.
    • 4. What goes wrong in part 7 when you take numbers for x that are very very small? Explain.
  7. for Wed Oct 21
    Look up Newton's Method in a calculus text. For example the text in use now has Newton's Method explained in Section 4.8.

    It's about solving the equation f(x) =0 by successive approximations, starting with an initial approximation or guess. The idea is to use the iterative formula
    Xn+1 = xn - f(xn)/f'(xn),
    for replacing the "current" approximation xn by the (hopefully) improved approximation xn+1.

    You may use any computer algebra system. In Maple things should look like:

    First define f(x). To do that write (for example):
    
      f:=x ->x^3
    
    Next write:
    
      printlevel :=0 #so we don't get unwanted printing in the for-loop
    
      xn:=15.0:
    
      for k to 8 do
    
             xn:=xn-f(xn)/D(f)(xn):
    
             print (evalf(xn,16))
    
      od;
    

    Exercise: Let f(x) = (x^3-2.1*x^2+x-2)/(x^6+1).

    • 1.Show that f has a zero in the interval [-10,10].
    • 2. Graphically show that f has only one zero in this interval.
    • 3. Pick a reasonable starting xn value and do enough Newton iterations to get at least six significant figure precision.
    • 4. Now make xn bigger; e.g. xn=3.0 or larger. Do several iterations and explain the results.
    • 5. Try xn around 0.5 and tell what happens, and why it happens.
    • 6. Try xn around -1.0 and tell what happens, and why.
  8. for Wed Oct 28
    The law of refraction (Snell's Law) states that for an boundary separating two media (say air and water), the angle of incidence (theta1) is related to the angle of refraction (theta 2), by
    sin(theta 1)/c1 = sin(theta 2)/c2.

    Here, c1 and c2 are the respective, constant speeds in the two media. Note: theta1 and theta2 are measured from the line perpendicular to the boundary.

    Given two points, P and Q, we want to determine the location of the point of refraction (say x measured horizontally from one of the points. Assume that the two points are separated from each other by a total horizontal distance L and that their vertical distances from the boundary are respectively a and b.

    1. Use the fact that velocity = distance/time to demonstrate the law of refraction.
    2. Use the law of refraction to derive an expression x (the distance measured horizontally from one of the points to the point of refraction) in terms of a, b and L.
    3. Show that for values a = b = 1, L = 4, c1 = 1, c2 =1/2 the location of the point of refraction reduces to 3*x^4 - 24*x^3 + 51*x^2 - 32*x + 64 = 0.
    4. Graph the equation above.
    5. Explain why only one of the roots is relevant to the refraction problem.
    6. Find the relevant zero to six significant figures.
  9. for Wed Nov 4
    Plot the function f(x) = x^3 - x.
    1. Explain from the plot why you would expect that in Newton's method the initial value x0 > 1/sqrt(3) would lead to xn -> 1.0 as n ->*. (And by symmetry, x0 < -1/sqrt(3) leads to xn -> -1.0 as n -> *).
    2. Similarly, explain why if |x0| < 1/sqrt(5), you would expect xn -> 0.
    3. (The "chaos" part). Below is a list of starting values x0 lying between 1/sqrt(5) and 1/sqrt(3) and getting closer and closer to 1/sqrt(5). Using each starting value, run 15 or so Newton iterations and carefully describe what you observe (including any sign changes in the Newton iterates).
      a. x0 = 0.448955
      b. x0 = 0.447503
      c. x0 = 0.447262
      d. x0 = 0.447222
      e. x0 = 0.447215
      f. x0 = 0.447213
    4. Discuss the results above with respect to sensitivity to the choice of initial value.
    Discussion topic: Newton's Method could be fast or slow, or even fail. Take the case of running NM with starting value x0 = 1.0 on the function
    f(x) = 27*x^6-216*x^5+387*x^4-440*x^3+408*x^2-224*x+48.
    On the other hand, settling for a safe method like bisection all the time is too expensive. How could we automatically monitor when Newton's method is in trouble? Casually discuss "rescuing" Newton's method in such cases.


Physics & Astronomy at Marlboro | Jim's Schedule

Home | admissions | about | news | academics | community | resources