Mathematical Tools for Physics

(coco) #1
11—Numerical Analysis 352

11.29 From the equationy′=f(x,y), one derivesy′′=fx+ffy. Derive a two point Adams type formula using
the first and second derivatives, with error of orderh^5 as for the standard four-point expression. This is useful
when the analytic derivatives are easy. The form is


y(0) =y(−h) +β 1 y′(−h) +β 2 y′(− 2 h) +γ 1 y′′(−h) +γ 2 y′′(− 2 h)

Ans:β 1 =−h/ 2 ,β 2 = 3h/ 2 ,γ 1 = 17h^2 / 12 ,γ 2 = 7h^2 / 12

11.30 Using the same idea as in the previous problem, find a differential equation solver in the spirit of the
original Euler method, ( 30 ), but doing a parabolic extrapolation instead of a linear one. That 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. ( 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 for the value ofD 2 f(0,y 0 )in Eq. ( 35 ). 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) + 8f(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. If√ aandbare 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+.


11.35 Repeat the previous 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.

Free download pdf