Department of Mathematics

Math 300: Mathematical Computing

Assignment B

You will write a Python script containing a function called chebexpansion which computes a Chebyshev polynomial approximation to any function we specify. Specifically your function will satisfy the following criteria.

Once your function is working, you will use it to plot Chebyshev polynomial approximations of degree 20 to two functions: the name function you created in Assignment A; and the function \[ \text{step}(x)=\begin{cases} -1 & x<0\\ 1 & x \ge 0. \end{cases} \] The plots will look something like that in Figure 1. Observe the following things about the plots.


Figure 1: Chebyshev approximation to the Ahz function.

Once you have the program working, you will save the two images, and write a paper around them. The paper will be done in LaTeX, and will discuss the practical application of Chebyshev polynomial approximation, including the method for computing the coefficients. In discussing the coefficients, you will present the mathematics - there is no interest in a discussion of the Python function you were given. You will obviously present the coefficients you calculated in each case, and discuss the figures you generated. Equally obviously, you will discuss the nature of the results you see for the discontinuous function. If the words "Gibbs phenomenon" were to appear in your paper, that would not be a bad thing (unless, of course. those words were not explained). Remember that there are hints for mathematical writing in Assignment 6 and in the style document.

You will turn in two things for this assignment: the Python script; and the PDF copy of the paper you wrote. For emphasis, this time we want the PDF copy - you do not need to send the .tex file unless you want to. The assignment is turned in when the two files containing the script and paper are received as attachments to an email message in the instructor's inbox. The assignment is worth 60 points, and is due at 8 AM on Tuesday, 12 December.


Assignment 6 is posted.




The midterm exam will take place on Friday, 12 October. As always, you are permitted any paper notes you find useful, but no electronic devices are allowed. The test is cumulative, but emphasizes the material covered in the last fours weeks. A sample exam is available.




You need to install Matlab on your computer by Wednesday. You do not need Simulink or any particular toolboxes, though you might find the Symbolic toolbox useful at some time in the future (not in this class).



Department of Mathematics, PO Box 643113, Neill Hall 103, Washington State University, Pullman WA 99164-3113, 509-335-3926, Contact Us
Copyright © 1996-2015 Kevin Cooper