1. Trang chủ
  2. » Công Nghệ Thông Tin

A textbook of Computer Based Numerical and Statiscal Techniques part 30 pptx

10 229 0
Tài liệu đã được kiểm tra trùng lặp

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 10
Dung lượng 118,85 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

Thus we obtain the Chebyshev series expansion of the given continuous functionf x on the interval [–1, 1]... However for a large number of functions, an expansion as in 2, converges mor

Trang 1

P n (x) = 0 ( )

1

2

n

i i i

a

a T x

=

is very near solution to the problem

1 1

1 1

x x

− ≤ ≤

i.e., the partial sum (1) is closely the best approximation to f(x).

Chebyshev polynomial approximation

T0

T1

T2

T3

T6

T5

T4

1 8 6 4 2 0 –.2 –.4 –.6 –1

x

1

.5

0

–.5

–1

FIG 5.2 Chebbyshev polynomiats T0(x) through T 6 (x) Note that T j has j roots in the interval (–1,1)

and that all the polynomials are bounded between +1.

(iii) Economization of power series: To describe the process of economization, which

is essential due to Lanczos, we first express the given function as a power series in x Let power series expansion of x is.

2

Now convert each term in the power series, in terms of Chebyshev polynomials Thus we obtain the Chebyshev series expansion of the given continuous functionf x( ) on the interval

[–1, 1] i.e.,

0

( ) ( )

n

i

=

Trang 2

Now, if the truncated Chebyshew expansion is taken by (2) then

1

max ( ) n( ) n n

x f x P x B+ B +

and Hence Pn (x) is a good uniform approximation to f x( ) in which the number of terms retained depends on the given tolerance of ∈ However for a large number of functions, an expansion as

in (2), converges more rapidly than the initial power series for the given function

This process is known as ‘economization of the power series’, which is essentially due to Lanczos Replacing each Chebyshev polynomial Ti (x) by its polynomial form and rearranging the terms, we

get the required economized polynomial approximation We have, thus economized the initial power series in the sense of using fewer terms to achieve almost the same accuracy

Example 5 Economize the power series.

sin x =

6 120 5040

to 3 significant digit accuracy.

6 120 5040

Now it is required to compute sin x correct to 3 significant digits So truncating after 3 terms

as the truncation error after 3 terms of the given series is 1 0.000198

5040

sin xx –

6 120

x + x

Now converting the powers of x in to Chebyshev polynomials.

sin xT 1 (x) – 1

24 [3T1 (x) + T3 (x)] + 1 1( ) 3( ) 5( )

1920 T x + T x +T x 

192T x −128T x +1920T x

Again, since the truncation error after two terms of the series is 1 0.00052

1920

have

192T x −128T x

Now, to get the economized series, we put basic values of T1 and T3

192 x −128 xx

384x− 32x

sin x = 0.9974x – 0.1562x3

Which gives sin x to 3 significant digit accuracy and therefore, it is the economized series.

Trang 3

Example 6 Prove that 2 ( ) ( ) ( )

Sol If x = cos θ, we get

T n (cos θ) = cos nθ and U n (cos θ) = sin nθ [here U n (cos θ) = sin nθ]

is Chebyshev polynomial of second kind of degree n over the interval [–1, 1].

Then we have to prove,

sinθ cos nθ = sin (n + 1)θ – cosθ sin nθ Now, R.H.S = sin nθ cosθ + cos nθ sinθ – cos θ sin nθ

= sinθ cos nθ = L.H.S

Example 7 Find a uniform polynomial approximation of degree four or less to sin –1 x on [–1, 1], using Lanczos economization with an error tolerance of 0.05

Sol We have,

sin–1 x = x +

3

x

Since the error is required to be less than 0.05 and we see that if the given series is truncated after three terms then the truncation error

7

15

336x < 0.044643

On [–1, 1] hence, we retain three terms and write

sin–1 x = x +

3

6

x

+ 3 5

40x

= T1 + 1

24 [3T1 + T3] +

3

640 [10T1 + 5T3 + T5]

= 75

Now, the co-efficient of T5 = 3

640 = 0.0046875 and as T5 ≤1

For all x∈ [–1, 1], we have

5

3

640T < 0.0046875

Therefore, we omit this term and this omission will not affect the desired accuracy, because the total error

= 0.044642857 + 0.0046875

= 0.04933 < 0.05 Hence, required expension for Sin–1 x is

sin–1 x = 75

64 T1 +

25 384

= 125

128 x +

3

25

96x

Trang 4

Example 8 Find a uniform polynomial approximation of degree 4 or less to e x in [–1, 1], using lanczos economization with a tolerance of = 0.02.

Sol Since f(x) = ex = 1 + x +

x +x +x + x +

120 = 0.00833

Therefore, we take f(x) up to

4

24

x with a tolerance of ∈ = 0.02

S.t f(x) = e x = 1 + x +

Changing each power of x in (1) in terms of Chebyshev polynomials, we get

e x = 81 0 9 1 13 2 1 3 1 4

64T +8T +48T +24T +192T

Neglecting the last term because its magnitude 0.005 is less than 0.02 Hence, the required

economized polynomial approximation for e x is given by

x

(iv) Least square approximation: To obtain a polynomial approximation to the given

function f(x) on the interval [a, b] using least square approximation, with weight function w(x).

be a polynomial of degree n Where a0, a1, a2, a n, are arbitrary constant we then have,

2

0 1

0

,

i

i a

=

where w(x) > 0 is a weight function.

The necessary conditions for S to be minimum, are given by

( ) ( )

i i i a

S

( ) ( )

i i i a

S

i i i a

S

( ) ( )

0

i n i

S

Trang 5

after simplication, we get

n n

a w x dx a xw x dx a x w x dx w x f x dx

n n

n

n

ax w x dx+ax + w x dx+ +ax w x dx=∫x w x f x dx

which are normal equations for P n (x) These are (n + 1) equations in (n + 1) unknowns and are

solved to obtain a0, a1, a2, a n

Example 9 Obtain a least-square quadratic approximation to the function y(x) = x on [0, 1] w.r.t weight function w(x) = 1.

Sol Let y = a0 + a1x + a 2 x 2 be required quadratic approximation

then, S(a0, a1, a2) =

1

0

The normal equations are

1

1

1

S

a S

a S

a

= 

or

∫1 3/2 = ∫1 + ∫1 2 + ∫1 3

3

or Simplifying above equations, we get

0

2

2

2

a

Trang 6

On solving the equations, we get

Hence the required quadratic approximation to y = x on [0, 1] is

2

6 48 20

35 35 35

6 48 20

Example 10 Using the Chebyshev polynomials, obtain the least square approximation of second

degree for f(x) = x 4 on [–1, 1].

Sol Let f(x) P(x) = C0T0 (x) + C1T1 (x) + C2T 2 (x)

1

which is to be minimum when

0

Now,

0

0

S c

∂ =

1

0

1

0 1

T x

x

0

1

8 1

x T x

x

Similarly,

1

0

S c

∂ =

1

0 1

T x

x

( )

1 4 1

1

2

0 1

x T x

x

and

2

0

S c

∂ =

2 1

0 1

T x

x

( )

1 4 2

1

2 1

x T x

x

Hence the required approximation is f(x) = 3 0 1 2

8T + 2T

Example 11 The function f is defined by

f(x) =

2

2 0

1

dt

Trang 7

Approximate f by a polynomial P(x) = a + bx + cx 2 such that

x 1

may

f x( )−P x( ) ≤ ×5 103

Sol The given function

f(x) =

0

1

2 6 24 120 720

x

dt x

= 1 –

6 30 168 1080 7920

given that ∈ = 5× 10–3

⇒ ∈ = 0.005

Now, truncating the series (1) at x8, we have

P(x) = 1 –

6 30 168 1080

x + xx + x

= T0 – 1

12 (T2 + T0) +2401 (T4 + 4T2 + 3T0) – 1 ( 6 +6 4 +15 2+10 0)

138240 (T8 +8T6 +28T4 +56T2 +35T0)

= 0.92755973T0 – 0.06905175T 2 + 0.003253T4 – 0.000128T6 + 0.000007T8 .(2) Truncate the equation (2) at T2, to get required polynomial

P(x) = 0.92755973T 0 – 0.06905175T2

= 0.99661148 – 0.13810350x2

or P(x) = 0.9966 – 0.1381 x 2 Ans

Example 12 Obtain a linear polynomial approximation to the function y(x) = x 3 on [0, 1] using the least squares approximation with respect to weight function w(x) = 1.

Sol Let y = a0 + a1x be the required linear approximation

3

0 1 0

x a a x dx

1 3

0 1

S

a

3

Similarly,

1 3

0 1

S

a

x

Trang 8

From (1) and (2)

a0 + 1 1

a =

,

Hence the required linear approximation to y(x) = x3 on [0, 1] is y = 9 1 1

10−5x

Example 13 Using the Chebyshev polynomials obtain the least square approximation of second

degree for x 3 + x 2 + 3 on the interval [–1, 1].

Sol Let f(x) = a0T0 (x) + a1T1 (x) + a 2 T2 (x)

So, S(a 0 , a 1 , a 2) =

1

2 1

1

1 x

3

For S to be minimum

0

Therefore, we have

1

1

1

T x

x

1

1

1

T x

x

1

1

1

T x

x

∫ Using the orthogonality conditions, we have

a0 = ( ) ( )

=

2 1

3

2 1

dx x

1

1

1

3

4 1

x

1

2

1

3

2 1

x

Hence, the required least-square approximation is,

f(x) = 0( ) 1( ) 2 ( )

2T x + 4T x +2T x

Trang 9

Minimax polynomial approximation: Let f(x) be continuous on [a, b] and it is approximated by the polynomial P n (x) = a0 + a1x + +a n x n , then the minimax polynomial

approximation problem is to determine the constants a0, a1, a2 ,a n such that

a x b

≤ ≤

If P n (x) is the best uniform approximation in the sense of eqn (2) and

E n = a x bmax≤ ≤ f x( )−P x n( )

then there are at least (n + 2) points a = x0 < x1 < x2 < x n < x n+1 = b where error must alternate

in signs, and

(i) (x i) = ±E n , i = 0, 1, 2, n + 1

(ii) (x i ) = – (x i+1 ), i = 0, 2 , , n

(iii) ∈1 (x i ) = 0 for i = 1, 2, , n

Example 14 Obtain the Chebyshev linear polynomial approximation (Uniform approximation) to

the function f(x) = x 2 , on [0, 1].

Sol Let P1 (x) = a0 + a1x and x 0 = 0, x1 = α, x2 = 1

Therefore, ∈( )x = x2 −a0 −a x1

⇒ ∈( )x0 + ∈( )x1 = 0 or ∈( )0 + ∈ α =( ) 0 (1)

and ∈( )x1 = − ∈( )x2 ⇒ ∈( )x1 + ∈( )x2 =0

( ) ( )1

1

2

Hence from (1),

– a0 + α2 – a0 – a1α = 0

1 2 0

Similarly from (2)

2

From eq (4), (5), and (6) we get

a0 = – 1

8,

1 2

α = , a1=1

Therefore the required Chebyshev linear approximation is

P(x) = – 1

8 + x Ans

Trang 10

Example 15 Determine the best minimax approximation to f(x) = 2

1

x on [1, 2] with a straight line

y = a 0 + a 1 x Calculate the constants a 0 and a 1 , correct to two decimals.

Sol Given y = a0 + a1x

Therefore, ∈(x) = 12

x – a 0 – a1x and x 0 = 1, x1 = α, x2 = 2

( ) ( )

2

x



Thus, from (1), we have

1 – 2 a0 + 2 ( ) 1

1

α

4− a + − + α a =

α

3 1

2

0

a

α

On solving these equations, we get a0 = 1.66 and a1 = – 0.75

Hence, the best minimax approximation is y = 1.66 – 0.75x.

5.7.3 Spline Interpolation

Sometimes the problem of interpolation can be solved by dividing the given range of points by subintervals and use low order polynomial to interpolate each subintervals Such types of polynomial are called piecewise polynomial

O

Ducks

X

FIG 5.3

In the above figure piecewise polynomial exhibit discontinuity at some points If it is possible

to construct piecewise polynomial that prevent these discontinuities at the connecting points Such piecewise polynomial are called spline function According to the idea of draftsman spline, it is required that bothdy

dx and the curvature

2 2

d y

dx are the same for the pair of cubics that join at each

point The spline have possess the given properties

Ngày đăng: 04/07/2014, 15:20

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN