12.6 KB · commit a9602da
Assume that we have a table of values (xi,yi), i=0,1,2,…,n of any function y=f(x), the values of x being equally spaced, i.e., xi=x0+ih, i=0,1,2,…,n. Suppose that we are required to recover the values of f(x) for some intermediate values of x, or to obtain the derivative of f(x) for some x in the range x0≤x≤xn. The methods for the solution to these problems are based on the concept of the 'differences' of a function which we now proceed to define.
If y0,y1,y2,…,yn denote a set of values of y, then y1−y0,y2−y1,…,yn−yn−1 are called the differences of y. Denoting these differences by Δy0,Δy1,…,Δyn−1 respectively, we have Δy0=y1−y0,Δy1=y2−y1,…,Δyn−1=yn−yn−1, where Δ is called the forward difference operator and Δy0,Δy1,…, are called first forward differences. The differences of the first forward differences are called second forward differences and are denoted by Δ2y0,Δ2y1,… Similarly, one can define third forward differences, fourth forward differences, etc.
Thus,
Δ2y0Δ3y0Δ4y0=Δy1−Δy0=y2−y1−(y1−y0)=y2−2y1+y0,=Δ2y1−Δ2y0=y3−2y2+y1−(y2−2y1+y0)=y3−3y2+3y1−y0=Δ3y1−Δ3y0=y4−3y3+3y2−y1−(y3−3y2+3y1−y0)=y4−4y3+6y2−4y1+y0.It is, therefore, clear that any higher-order difference can easily be expressed in terms of the ordinates, since the coefficients occurring on the right side are the binomial coefficients.
Table 3.1 shows how the forward differences of all orders can be formed:
Table 3.1 Forward Difference Table
| x | y0 | Δ | Δ2 | Δ3 | Δ4 | Δ5 | Δ6 |
|---|---|---|---|---|---|---|---|
| x0 | y0 | ||||||
| Δy0 | |||||||
| x1 | y1 | Δ2y0 | |||||
| Δy1 | Δ3y0 | ||||||
| x2 | y2 | Δ2y1 | Δ4y0 | ||||
| Δy2 | Δ3y1 | Δ5y0 | |||||
| x3 | y3 | Δ2y2 | Δ4y1 | Δ6y0 | |||
| Δy3 | Δ3y2 | Δ5y1 | |||||
| x4 | y4 | Δ2y3 | Δ4y2 | ||||
| Δy4 | Δ3y3 | ||||||
| x5 | y5 | Δ2y4 | |||||
| Δy5 | |||||||
| x6 | y6 |
In practical computations, the forward difference table can be formed in the following way. For the data points (xi,yi), i=0,1,2,…,n and xi=x0+ih, we have Δyj=yj+1−yj,j=0,1,…,n−1. Denoting yj as DEL(0,j), the above equation can be written as Δyj=DEL(0,j+1)−DEL(0,j)=DEL(1,j) It follows that Δiyj=DEL(i−1,j+1)−DEL(i−1,j), which is the ith forward difference of yj.
For the data points (xi,yi), i=0,1,2,…,6, we have difference Table 3.2.
Table 3.2 Forward Difference Table
| x | y | Δ | Δ2 | Δ3 | Δ4 | Δ5 | Δ6 |
|---|---|---|---|---|---|---|---|
| x0 | DEL(0,0) | ||||||
| DEL(1,0) | |||||||
| x1 | DEL(0,1) | DEL(2,0) | |||||
| DEL(1,1) | DEL(3,0) | ||||||
| x2 | DEL(0,2) | DEL(2,1) | DEL(4,0) | ||||
| DEL(1,2) | DEL(3,1) | DEL(5,0) | |||||
| x3 | DEL(0,3) | DEL(2,2) | DEL(4,1) | DEL(6,0) | |||
| DEL(1,3) | DEL(3,2) | DEL(5,1) | |||||
| x4 | DEL(0,4) | DEL(2,3) | DEL(4,2) | ||||
| DEL(1,4) | DEL(3,3) | ||||||
| x5 | DEL(0,5) | DEL(2,4) | |||||
| DEL(1,5) | |||||||
| x6 | DEL(0,6) |
In Table 3.2
DEL(4,0)=DEL(3,1)−DEL(3,0)=DEL(2,2)−DEL(2,1)−[DEL(2,1)−DEL(2,0)]=DEL(1,3)−DEL(1,2)−2[DEL(1,2)−DEL(1,1)]+DEL(1,1)−DEL(1,0)=DEL(0,4)−DEL(0,3)−3[DEL(0,3)−DEL(0,2)]+3[DEL(0,2)−DEL(0,1)]−[DEL(0,1)−DEL(0,0)]=DEL(0,4)−4DEL(0,3)+6DEL(0,2)−4DEL(0,1)+DEL(0,0)=y4−4y3+6y2−4y1+y0The forward difference table can now be formed by the simple statements:
Do i = 1(1) n
Do j = 0(1) n - i
DEL(i, j) = DEL(i - 1, j + 1) - DEL(i - 1, j)
Next j
Next i
End
The differences y1−y0,y2−y1,…,yn−yn−1 are called first backward differences if they are denoted by ∇y1,∇y2,…,∇yn respectively, so that
∇y1∇yn=y1−y0,∇y2=y2−y1,⋮=yn−yn−1,where ∇ is called the backward difference operator. In a similar way, one can define backward differences of higher orders.
Thus, we obtain
∇2y2∇3y3=∇y2−∇y1=y2−y1−(y1−y0)=y2−2y1+y0,=∇2y3−∇2y2=y3−3y2+3y1−y0, etc.With the same values of x and y as in Table 3.1, a backward difference Table 3.3 can be formed:
Table 3.3 Backward Difference Table
| x | y | ∇ | ∇2 | ∇3 | ∇4 | ∇5 | ∇6 |
|---|---|---|---|---|---|---|---|
| x0 | y0 | ||||||
| x1 | y1 | ∇y1 | |||||
| x2 | y2 | ∇y2 | ∇2y2 | ||||
| x3 | y3 | ∇y3 | ∇2y3 | ∇3y3 | |||
| x4 | y4 | ∇y4 | ∇2y4 | ∇3y4 | ∇4y4 | ||
| x5 | y5 | ∇y5 | ∇2y5 | ∇3y5 | ∇4y5 | ∇5y5 | |
| x6 | y6 | ∇y6 | ∇2y6 | ∇3y6 | ∇4y6 | ∇5y6 | ∇6y6 |
The central difference operator δ is defined by the relations y1−y0=δy1/2,y2−y1=δy3/2,…,yn−yn−1=δyn−1/2. Similarly, higher-order central differences can be defined. With the values of x and y as in the preceding two tables, a central difference Table 3.4 can be formed:
Table 3.4 Central Difference Table
| x | y | δ | δ2 | δ3 | δ4 | δ5 | δ6 |
|---|---|---|---|---|---|---|---|
| x0 | y0 | ||||||
| δy1/2 | |||||||
| x1 | y1 | δ2y1 | |||||
| δy3/2 | δ3y3/2 | ||||||
| x2 | y2 | δ2y2 | δ4y2 | ||||
| δy5/2 | δ3y5/2 | δ5y5/2 | |||||
| x3 | y3 | δ2y3 | δ4y3 | δ6y3 | |||
| δy7/2 | δ3y7/2 | δ5y7/2 | |||||
| x4 | y4 | δ2y4 | δ4y4 | ||||
| δy9/2 | δ3y9/2 | ||||||
| x5 | y5 | δ2y5 | |||||
| δy11/2 | |||||||
| x6 | y6 |
It is clear from all the four tables that in a definite numerical case, the same numbers occur in the same positions whether we use forward, backward or central differences. Thus, we obtain Δy0=∇y1=δy1/2,Δ3y2=∇3y5=δ3y7/2,…
Difference formulae can easily be established by symbolic methods, using the shift operator E and the averaging or the mean operator μ, in addition to the operators, Δ, ∇ and δ already defined.
The averaging operator μ is defined by the equation: μyr=21(yr+1/2+yr−1/2). The shift operator E is defined by the equation: Eyr=yr+1, which shows that the effect of E is to shift the functional value yr to the next higher value yr+1. A second equation with E gives E2yr=E(Eyr)=Eyr+1=yr+2, and in general, Enyr=yr+n. It is now easy to derive a relationship between Δ and E, for we have Δy0=y1−y0=Ey0−y0=(E−1)y0 and hence Δ≡E−1orE≡1+Δ.∗(3.8a) We can now express any higher-order forward difference in terms of the given function values. For example, Δ3y0=(E−1)3y0=(E3−3E2+3E−1)y0=y3−3y2+3y1−y0. From the definitions, the following relations can easily be established:
∇δμΔ=1−E−1,=E1/2−E−1/2,=(1/2)(E1/2+E−1/2),μ2=1+(1/4)δ2=∇E=δE1/2.⎭⎬⎫(3.8b)*[The student should note that Eq. (3.8a) does not mean that the operators E and Δ have any existence as separate entities; it merely implies that the effect of the operator E on y0 is the same as that of the operator (1+Δ) on y0.]
As an example, we prove the relation μ2≡1+(1/4)δ2. We have, by definition,
μyr=21(yr+1/2+yr−1/2)=21(E1/2yr+E−1/2yr)=21(E1/2+E−1/2)yr.Hence μ=21(E1/2+E−1/2) and
μ2=41(E1/2+E−1/2)2=41(E+E−1+2)=41[(E1/2−E−1/2)2+4]=41(δ2+4).We therefore have μ≡1+41δ2. Finally, we define the operator D such that Dy(x)=dxdy(x). To relate D to E, we start with the Taylor's series y(x+h)=y(x)+hy′(x)+2!h2y′′(x)+3!h3y′′′(x)+⋯ This can be written in the symbolic form Ey(x)=(1+hD+2!h2D2+3!h3D3+⋯)y(x). Since the series in the brackets is the expansion of ehD, we obtain the interesting result E≡ehD.(3.8c)
Using the relation (3.8a), a number of useful identities can be derived. This relation is used to separate the effect of E into that of the powers of Δ and this method of separation is called the method of separation of symbols. The following examples demonstrate the use of this method.