Presentation is loading. Please wait.

Presentation is loading. Please wait.

One problem arises when a function is given explicitly, but we wish to find a “ simpler ” type of function, such as a polynomial, that can be used to.

Similar presentations


Presentation on theme: "One problem arises when a function is given explicitly, but we wish to find a “ simpler ” type of function, such as a polynomial, that can be used to."— Presentation transcript:

1

2 One problem arises when a function is given explicitly, but we wish to find a “ simpler ” type of function, such as a polynomial, that can be used to determine approximate values of the given function. The other problem in approximation theory is considered with fitting functions to given data and finding the “ best ” function in a certain class to represent the data. To find a function in a certain class to represent the given data best relative to some measure. A better approach would be to find the “best” ( in some sense) approaching curve, even if it does not agree precisely with the data at any point The study of approximation theory involves two general types of problems: Gaoal of Chapter 4

3 x58108150228 y88225365687 T88.2209224.2145366.9991687.7496 P151 Fig. 4.1

4 least squares 最小二乘 ; root mean square(rms) 均方根 ; normal equations 正则方程组 ; deviation 偏差 ; residual 残差,留数 ; Useful Words 4.1 Least- Square Line Problem: Given data, where the abscissas are distinct, determine a formula that relates these variables. Finding a best function means in some sense to minimize one of the errors Maximum error Everage error Root-mean-square error See Eq. (4.4-4.6) (P152)

5 Formula used for fitting curve 1.Straight line f(x)=Ax+B sec. 4.1.1, Page 153 2.Polynomial, sec. 4.2.6, P168 3.Power curve, sec. 4.1.2, P156 4.Exponential curve, sec. 4.2 P160

6 * * * The minimax approach To minimize The average approach To minimize The least squares approach To minimize · Determine a best line approximation using the given data I) The linear least squares polynomial · · · *

7 To minimize The normal equations See Eq. (4.15-4.16) (P154)

8 Determine a best approximation using the given data such that is minimal. Example Find the least squares line to approximate the data given in the given table. The normal equations II) The least squares polynomial of degree M (M >1) * * * · k 12345678910 xkxk 123456789 ykyk 1.33.54.25.07.08.810.112.513.015.6

9 See Subsection 4.2.6(P168)

10 Example Fit the data in the table with the discrete least squares polynomial of degree 2. Using normal equations produces Solving the system gives Hence k 12345 xkxk 00.250.50.751.00 ykyk 1.00001.28401.64872.11702.7183

11 Determine an linear-squares power function using the given data III) Power fit Minimize Let Then See Subsection 4.1.2(P156) Example See Figure 4.1 (page 151).

12 Method I Find directly using the least-squares technique. Determine a least-squares exponential function using the given data IV) Transformations for data linearization Let The error function E(A,C) is It’s a system of nonlinear equations. Eq. 4. 34 ( page 163 ) See Subsection 4.2.2(P162) We have

13 Method II Transformations for data linearization Let Then, to find is to find the least-squares line 1. Tansform into which is denoted by 2. Find the normal equations with unkowns 3. Let 4. Write out See Table 4.6 ( page 166 ) Determine a least-squares exponential function using the given data (Note that ) Subsection 4.2.1 (P160)

14 piecewise-linear 4.3 Interpolation by Spline Functions 样条函数 Find piecewice interpolating polynomial with smoothness enough.

15 Definition Let, and the nodes are given. If is a cubic function on each subinterval with some properties, then is called the cubic spline function. There are 4N constants need to be determined. Since is a polynomial with degree of 3, the degree of its 2 nd derivative is only 1. Let

16 Integrate twice : Rewrite it as Evaluate at and Note that and We have Then

17 Derivative Evaluate at Denote Then Replace k by k-1 in Evaluate at

18 give only N-1 equations with N+1 unkowns

19 See 4.65, Page 180

20 Natural boundary: Endpoint constaints are introduced. (See Table 4.8, Page 179) Lemma 4.2, Page 180

21 and are specifed. clamped boundary: Lemma 4.1, Page 180

22 Cubic spline for

23 For each of the different endpoint conditions, there is a particular tridiagonal system of linear equations


Download ppt "One problem arises when a function is given explicitly, but we wish to find a “ simpler ” type of function, such as a polynomial, that can be used to."

Similar presentations


Ads by Google