Mathematical Tools for Physics - Department of Physics - University

(nextflipdebug2) #1
11—Numerical Analysis 293

is, start from(x 0 ,y 0 )and fit the initial data toy=α+β(x−x 0 ) +γ(x−x 0 )^2 in order to take a


step. Ans:y(h) =y 0 +hf(0,y 0 ) +


(

h^2 / 2


)[

fx(0,y 0 ) +fy(0,y 0 )f(0,y 0 )


]

11.31 Show that the root finding algorithm of Eq. (11.7) is valid for analytic functions of a complex
variable with complex roots.


11.32 In the Runge-Kutta method, pick one of the other choices to estimateD 2 f(0,y 0 )in Eq. (11.37).


How many function evaluations will it require at each step?


11.33 Sometimes you want an integral where the data is known outside the domain of integration.


Find an integration scheme for


∫h

0 f(x)dxin terms off(h),f(0), andf(−h). Ans:[−f(−h) +


8 f(0) + 5f(h)]h/ 12 , error∝h^4


11.34 When you must subtract two quantities that are almost the same size, you can find yourself


trying to carry ridiculously many significant figures in intermediate steps. Ifaandbare very close and


you want to evaluate



a−



b, devise an algorithm that does not necessitate carrying square roots out


to many more places than you want in the final answer. Writea=b+.


Ans:/ 2



b, error:^2 / 8 b^3 /^2


11.35 Repeat the preceding problem but in a more symmetric fashion. Writea=x+andb=x−.


Compare the sizes of the truncation errors. Ans:/



x, −^3 / 8 x^5 /^2


11.36 The value ofπwas found in the notes by integrating 4 /(1+x^2 )from zero to one using Simpson’s


rule and five points. Do the same calculation using Gaussian integration and two points. Ans: 3.14754
(Three points give 3.14107)


11.37 (a) Derive Eq. (11.54).
(b) Explain why the plausibility arguments that follow it actually say something.


11.38 After you’ve done the Euclidean fit of data to a straight line and you want to do the data
reduction described after Eq. (11.59), you have to find the coordinate along the line of the best fit to


each point. This is essentially the problem: Given the line (~uandˆv) and a point (~w), the new reduced


coordinate is theαin~u+αvˆso that this point is closest to~w. What is it? You can do this the hard


way, with a lot of calculus and algebra, or you can draw a picture and write the answer down.


11.39 Data is given as(xi,yi) ={(1,1),(2,2),(3,2)}. Compute the Euclidean best fit line. Also


find the coordinates,αi, along this line and representing the reduced data set.


Ans:~u= (2, 5 /3) ˆv= (0. 88167 , 0 .47186) α 1 =− 1. 1962 α 2 = 0. 1573 α 3 = 1. 0390


The approximate points are(0. 945 , 1 .102), (2. 139 , 1 .741), (2. 916 , 2 .157)


[It may not warrant this many significant figures, but it should make it easier to check your work.]


11.40 In the paragraph immediately following Eq. (11.23) there’s mention of an alternate way to derive
Simpson’s rule. Carry it out, though you already know the answer.


11.41 (a) Derive the formula for the second derivative in terms of function values at three equally
spaced points. (b) Use five points to get the second derivative, but using the extra data to minimize
the sensitivity to noise in the data. Ans: (a)


[

f(−h)− 2 f(0) +f(h)


]

/h^2 (b)


[

− 2 f(0)−


(

f(h) +


f(−h)


)

+ 2

(

f(2h) +f(− 2 h)


)]

/ 7 h^2. The ratio of the standard deviation for (b) is smaller than for (a)


by a factor 211 /^2 = 4. 6

Free download pdf