Physics 6730 Answers to Midterm Test
x^3 = T(3,x)/4 + 3/4 * T(1,x);
N(h) = df/dx + K1*h^2 + K2*h^4 + ... N(0.2) = df/dx + K1*(0.2)^2 = 2.113 N(0.1) = df/dx + K1*(0.1)^2 = 2.125 --------------------------- 4/3*N(0.1) - N(0.1)/3 = df/dx + K2'*h^4 2.123 + (0.012)/3 = 2.127 2.127
The error goes as h^4
Change variables so x = 4 + 2*t for t in [-1,1].
Then
dx = 2 dt and
int(f(x),x=2..6) = int(2*f(4 + 2*t),t=-1..1)
= 10/9*f(4 - 2*sqrt(3/5)) + 16/9*f(4) + 10/9*f(4 + 2*sqrt(3/5))
Local truncation error goes as dt^3.
The end point truncation error goes as dt^2.
3
1/15 x + x
-----------
2
2 x
1 + ----
5
NRVeca(12); Assigns 12 to nn, creates an array of doubles and assigns the address of the first element to the pointer v. Other valid examples are also accepted.
y_2(x) = 2*y_1(x)
dt y(T) diff diff/dt^4 0.50 0.60024232 0.00050112 0.00801792 0.20 0.59975295 1.175e-05 0.00734375 0.10 0.59974191 7.1e-07 0.0071 0.05 0.59974124 4e-08 0.0064 0.02 0.59974120 0 0 We look at the fourth column. The last entry is zero because of round-off error. The first four entries appear to be approaching a non-zero, finite value as dt -> 0. Therefore the error appears to decrease as dt^4.
mfp is assigned the value 31242. The "reinterpret_cast" tells the compiler to change the interpretation of the pointer from void * to WholeWFParam *.
We wanted to pass some values from the main program through a
fixed intermediate subprogram (bsrf) to the subprogram matchf. We
wanted to do this without recompiling bsrf. So we had to use a
fixed standard data type, and void * was the best choice.
Also we wanted to make the data opaque, assuring that bsrf could not
change it.
There is one peak at the alias frequency 40 - (60 - 40) = 20 Hz.
(1) either
(2) wavelet
(3) Fourier
(4) either
(5) Fourier
The eigenfunction must fall off exponentially as rho -> infinity,
so we pick a quite large but finite value of rho and for all
practical purposes the wavefunction is zero there.