Mathematical Tools for Physics

(coco) #1
11—Numerical Analysis 344

f′(. 5 h)≈

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

, (59)


and the variance is 2 σ^2 (α^2 +β^2 ) =σ^2 / 5 h^2. In contrast, the formula for the variance in the standard four point
differentiation formula Eq. ( 10 ), where the truncation error is least, is 65 σ^2 / 72 h^2 , which is 4.5 times larger.
When the data is noisy, and most data is, this expression will give much better results for this derivative.
Can you do even better? Of course. You can for example go to higher order and both decrease the truncation
error and minimize the statistical error.


11.9 Partial Differential Equations
I’ll illustrate the ideas involved here and the difficulties that occur in only the simplest example of a PDE, a first
order constant coefficient equation in one space dimension


ut+cux= 0, (60)

where the subscript denotes differentiation with respect to the respective variables. This is a very simple sort of
wave equation. Given the initial condition that att= 0,u(0,x) =f(x), you can easily check that the solution is


u(t,x) =f(x−ct). (61)

The simplest scheme to carry data forward in time from the initial values is a generalization of Euler’s
method for ordinary differential equations


u(t+ ∆t,x) =u(t,x) +ut(t,x)∆t
=u(t,x)−ux(t,x)c∆t

=u(t,x)−

c∆t
2∆x

[


u(t,x+ ∆x)−u(t,x−∆x)

]


, (62)


where to evaluate the derivative, I’ve used the two point differentiation formula.

Free download pdf