Physics 6730 Midterm Test

Rules


Questions

  1. (5 pts) Express x3 as a linear combination of Chebyschev polynomials.
    ans

  2. (10 pts) Suppose we are estimating the derivative of a function df/dx(x) using the "three-point" formula
     
      N(h) = [f(x+h) - f(x-h)]/(2h).
    
    We get these results

    h N(h)
    0.2 2.113
    0.1 2.125

    From only these results, improve the estimate of the integral. Please show your assumptions and your work.
    ans

  3. (5 pts) Using the method of the previous problem, how does the error in the improved estimate vary as the step size is decreased?
    ans

  4. (10 pts) Write an algebraic expression that estimates the integral of f(x) over the interval [2,6] using three-point Gauss-Legendre quadrature. Here are the abscissas and weights:

    xi wi
    -sqrt(3/5) 5/9
    0 8/9
    sqrt(3/5) 5/9

    Be careful about the range of integration.
    ans

  5. (5 pts) The leapfrog method for integrating Newton's law d^x/dt^2 = F/m uses the central difference formula for stepping the velocity and the coordinate. As a result, how does the local truncation error (error in a single step of the coordinate or velocity) depend on the step size?
    ans

  6. (5 pts) To start and finish the leapfrog method, it is necessary to use a one-sided difference formula. How does the resulting local truncation error depend on step size?
    ans

  7. (5 pts) Find the (4,2) Pade approximation for the function tanh(x). Use the approximation that matches the Taylor series about the point x = 0.
    ans

  8. (10 pts) In the Numerical Recipes header nrutil_nr.h we see the definition
    template <class T>
    NRVec::NRVec(int n) : nn(n), v(new T[n]) {}
    
    Give an example of a declaration statement that invokes this constructor. State clearly what happens when you invoke the constructor and what values the constuctor assigns to the data members nn and v.
    ans

  9. (5 pts) Suppose we are solving a homogeneous differential equation d2 y/dx2(x) = V(x)y(x) on the interval [a,b]. We treat it as an initial value problem, integrating from x = a with initial values y(a) = 0 and dy/dx(a) = 1 and get the solution y1(x). Then we solve again, changing only the initial slope dy/dx(a) = 2. Express the second solution y2(x) in terms of the first solution.
    ans

  10. (10 pts) You are using a fourth-order Runge Kutta method with fixed step size to integrate a differential equation over a fixed interval 0 < t < T. As you vary the step size you get the result
        dt		  y(T)
      --------------------------------
      0.50          0.60024232
      0.20          0.59975295
      0.10          0.59974191
      0.05		0.59974124
      0.02          0.59974120
      0.01		0.59974120
      ---------------------------------
    
    Taking the value for dt = 0.01 as the exact result, demonstrate numerically that the errors at larger step sizes vary as expected with dt for a "fourth order" method.
    ans

  11. (10 pts) Suppose pass_parsms has the numeric address value 31242. What numeric value is initially assigned to mfp below? Exactly what does reinterpret_cast change?
    double matchf(double e, void *pass_params)
    {
      PieceWFParam wfp;   // Parameters for integrating piece of wf
      Vec_DP yac(2),ybc(2);
      double return_value;
      // Recast pass-through pointer.  See param.h
      WholeWFParam *mfp = reinterpret_cast<WholeWFParam *>(pass_params); 
    
      // Common initialization of parameters wfp
      wfp.el = mfp->el;
      ...
    }
    

    ans

  12. (5 pts) In the example of the previous exercise, why did we go to the trouble of making the parameter pass_params be of type void * in order to get data from the main program through bsrf to the subprogram matchf?
    ans

  13. (5 pts) A continous signal of 60 Hz is sampled at an interval of 1/80 sec. We then do a Fourier transform of the signal and examine the one-sided power spectrum on an interval from 0 to 40 Hz (the Nyquist frequency). Will there be a peak in the power spectrum, and (if so) at what frequency?
    ans

  14. (5 pts) Suppose you had a choice between a wavelet and a Fourier transform. For each application below, answer "wavelet", "Fourier", "either", or "neither is appropriate" for the better method:
    1. You want to smooth a noisy signal.
    2. You want an economical representation of a pulsed signal.
    3. You want to do a fast convolution of two signals.
    4. You want a method that has an inverse transform.
    5. You want to determine power as a function of frequency.

    ans

  15. (5 pts) The wave function for the hydrogenic atom is supposed to be defined on the interval from zero to infinity. But we worked on a finite interval. How can we justify such an approximation?
    ans


This page is maintained by:
Carleton DeTar Mail Form
Last modified 2 March 2004