

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Project; Class: Numerical Analysis; Subject: Mathematical Computer Science; University: University of Illinois - Chicago; Term: Fall 2005;
Typology: Study Guides, Projects, Research
1 / 2
This page cannot be seen from the preview
Don't miss anything!


MCS 471 Project Four due Wednesday 16 November, 3PM Fall 2005
The goal of this project is to study the use of Chebyshev polynomials to approximate functions. We will use Maple in our investigations. Maple 9.5 is available in the computer labs on campus. To start working on the project, download the companion Maple worksheet from the web pages for this course.
The Chebyshev polynomials form an orthogonal basis with respect to the inner product
〈f, g〉 =
π
− 1
f (x)g(x) √ 1 − x^2
dx. (1)
For example, we have 〈Ti, Tj 〉 = 0 for i 6 = j. In this project we will use truncated Chebyshev series to approximate functions. A Chebyshev approx- imation is a polynomial p(x) of degree n of the form
p(x) =
a 0 2
∑^ n
i=
aiTi(x), with ai = 〈p, Ti〉, for i = 0, 1 ,... , n. (2)
The division by 2 of a 0 is made for a 0 = 〈p, T 0 〉 to hold. Geometrically, the coefficients ai are the coordinates of p in the basis Ti, i = 0, 1 ,... , n. To compute a least squares approximation of any function f with a Chebychev approximation p of degree n, we project the function f onto the basis, computing the coordinates of the approximation via the inner products of f with the basis elements Ti, i = 0, 1 ,... , n. The truncation of a Chebyshev series expansion for f leads to a least squares approximation p.
f (x) =
c 0 2
i=
ciTi(x) = p(x) +
i=n+
ciTi(x), with ci = 〈f, Ti〉, for i = 0, 1 ,... , n. (3)
By construction, we see that the error f − p is perpendicular to the basis Ti, i = 0, 1 ,... , n, as is typical for least squares approximations. The Chebyshev polynomials are available as the procedure T in the package orthopoly. The sequence of commands below — documented by the companion Maple worksheet on the web — defines 3 func- tions: num ip for the inner product, num prj for the projection operation, and chb for the creation of the Chebyshev approximation.
[> with(orthopoly,T): [> num_ip := (f,g) -> evalf(Int(fg/sqrt(1-x^2),x=-1..1)2/Pi); [> num_prj := (f,n) -> seq(num_ip(f,T(i,x)),i=0..n); [> c := num_prj(exp(x),4); [> chb := c -> c[1]/2 + sum(c[i]*T(i-1,x),i=2..nops(c)); [> cp := chb([c]);
The polynomial cp is a truncated Chebyshev series, the following commands are plots and checks:
[> plot_f := plot(exp(x),x=-1..1,color=black): [> plot_p := plot(cp,x=-1..1,color=red): [> plots[display](plot_f,plot_p); [> e := exp(x) - cp; # error of the approximation [> num_prj(e,4); # verifies that e is perpendicular to the basis [> plot(e,x=-1..1); # plots show typical oscillations
University of Illinois at Chicago, Department of Mathematics, Statistics and Computer Science page 1
MCS 471 Project Four due Wednesday 16 November, 3PM Fall 2005
In the example above we have seen that already with a fourth degree polynomial we obtain a very accurate approximation for exp(x). The purpose of the next assignment is to verify the decrease in coefficient size as the degree of the approximation increases.
n ranging from 4 to 13. Make a table with two columns: first the degree n, and then the highest degree coefficient of p, in scientific format with four significant decimal places. Describe the relationship between the degree n and the magnitude of the highest degree coefficient of p.
While we use the standard interval [− 1 , +1], we can compute Chebyshev approximations over any finite interval. The purpose of the next assignment is that you figure out a coordinate transformation which maps t ∈ [a, b] (for −∞ < a < b < ∞) to x ∈ [− 1 , +1] so that we can approximate functions f (t), for t ∈ [a, b].
degree n high enough so the error is below 1e-6 everywhere on the interval [1, 5]. Verify the least squares property of the solution.
As the Chebyshev polynomials are defined via the cosine, we could expect Chebyshev approximations to be very suitable to approximate periodic functions.
a Chebyshev approximation with a degree high enough so the error is below 1.0e-6 everywhere on the interval [− 1 , +1]. Describe the quality of the approximation. In particular, describe its quality when we replace every sin() in f (x) by cos().
If the function we approximate has a discontinuous jump somewhere inside the interval [− 1 , +1], does the Chebyshev approximation then converge as the degrees increase? The purpose of the next assignment is to find out.
− 1 if x < 0 0 if x = 0 +1 if x > 0. Compute Chebyshev approximations for increasing degrees and observe the behavior of the error function. Can you get the error as low as you like?
Bring your solution to the project to class. The your is emphasized to stress that your solution is the result of an individual effort. Collaborations are not permitted. Your solution should contain the following:
University of Illinois at Chicago, Department of Mathematics, Statistics and Computer Science page 2