CS/MA 342 Numerical Computing and Visualization (3 cr)

Spring 2004, 11:00 - 12:15 TR, SH 123/147

Instructor: Dr. Kelly Cline E-mail: kcline@carroll.edu Office: SH 119 Office phone: 447-4451

Office Hours: MWF 9-12, TR 9-11, or by appointment.


Course Description:
There are many simple problems which cannot be solved using ordinary analytical (pencil and paper) techniques. For example we do not have any function which corresponds to the integral equation $f(x) = \int \ln \sqrt{\sin x} dx$, or the ordinary differential equation $\frac{df}{dx} = \sqrt{\cos e^x}$, or the partial differential equation $\ln \frac{df}{dx} = \cos \frac{df}{dy}$. However we can use numerical methods to easily approximate these functions at whatever accuracy we desire. This course will serve as an introduction to the numerical methods of approximation, integration, and the numerical solution of ordinary and partial differential equations. My goal for the course is that you will understand how to apply these techniques, when they are appropriate, and how to interpret the results. Prerequisite: MA 334 or consent of instructor. If you have special needs or problems, please be sure to speak to me or see Joan Stottlemyer in the Academic Resources Center about them as early as possible in the semester. There is additional information in the Carroll College catalog.


Textbook:
Numerical Methods for Engineers by Chapra and Canale, 4th edition, published by McGraw-Hill, 2002.


Grading:
Term Projects: 10% each Midterm Exam: 20% Final Exam: 30% There will be two exams in this class, a midterm on Thursday, March 4, and a final on Monday, May 3, at 3:00 pm. In order to pass this class, all students must take both exams and complete all five projects. Exams will be open book, open notes, and will take place in the computer lab so that you will be able to use Excel to complete the problems. I will use a no-curve grading policy to assign final grades: above 90% = A, 80% - 89% = B, 70% - 79% = C, 60% - 69% = D, below 60% = F. Policies on academic integrity are in the Carroll College catalog.


Course Material:
We will cover 15 chapters of this textbook, one per week, during this 15 week term. These comprise four major topics: Regression and Curve Fitting (Ch17-20), Numerical Integration and Differentiation (Ch21-24), the solution of Ordinary Differential Equations (Ch25-28), and the solution of Partial Differential Equations (Ch29-32).


In Class:
Please read the assigned chapter (see the schedule on the back of this syllabus) before the class when we begin discussing it. Rather than lecturing, I prefer to ask you questions about what we've read, and guide a class discussion about the material, so if you haven't done the reading it is very obvious! Unless otherwise announced we will meet in the computer lab (room 147) on Tuesdays to see how we can use the methods from that week's chapter to solve various types of problems, then on Thursdays meet in room 123 discuss the chapter in more detail. For each computer lab day I will hand out an open-ended lab assignment (based in Excel) in which you will practice using the methods contained in that week's chapter. These activities will not be turned in or graded, but will be invaluable in praparing to do the term projects and the examinations.


Projects:
Rather than doing homework problems, you will complete five term projects and write up your work on each project into a formal paper. Project 1 will be due on Thursday, February 5, Project 2 on Tuesday, March 2, Project 3 on Thursday, April 1, Project 4 on Tuesday, April 20, and Project 5 at the time of the final (Monday, May 3, 3:00 pm).

Tentative Schedule



Lab: Chapter 17: Regression T 1/13
Least Squares Regression R 1/15
Lab: Chapter 18: Interpolation T 1/20
Interpolation R 1/22
Lab: Chapter 19: Fourier Approximation T 1/27
Fourier Approximation R 1/29
Lab: Chapter 20: Applications T 2/3
Curve Fitting Applications & Epilogue (Project 1 Due) R 2/5
Lab: Chapter 21: Newton-Cotes Integration T 2/10
Newton-Cotes Integration Formulas R 2/12
Lab: Chapter 22: Integration of Equations T 2/17
Integration of Equations R 2/19
Lab: Chapter 23: Numerical Differentiation T 2/24
Numerical Differentiation R 2/26
Chapter 24: Applications & Epilogue (Project 2 Due) T 3/2
Midterm Examination R 3/4
Spring Break T 3/9
Spring Break R 3/11
Lab: Chapter 25: Runge-Kutta ODE Methods T 3/16
Runge-Kutta Methods R 3/18
Lab: Chapter 26: Stiffness/Multistep Methods T 3/23
Stiffness/Multistep ODE Methods R 3/25
Lab: Chapter 27: Boundary Value Problems T 3/30
Boundary Value and Eigenvalue Problems (Project 3 Due) 4/1
Lab: Chapter 28: Applications of ODEs T 4/6
Engineering Applications of ODEs & Epilogue R 4/8
Lab: Chapter 29: Elliptic PDEs T 4/13
Finite Difference Methods of Solving Elliptic PDEs R 4/15
Lab: Chapter 30: Parabolic Problems (Project 4 Due) T 4/20
Finite Difference Methods of Solving Parabolic PDEs R 4/22
Lab: Chapter 32: Applications of PDEs T 4/27
Engineering Applications of Partial Differential Equations R 4/29
Final Examination 3:00 - 4:45 (Project 5 Due) M 5/4

Project #1, Due Thursday, February 5, 2004


The Heating Oil Problem: The price of heating oil tends to be higher in the winter when demand is high, and lower in the summer. However there are many other factors that influence the price as well, including long term trends, and complex almost random effects. Predicting what the price of oil will be in the future can be very useful for business, in knowing when to stockpile oil, or when to sell off reserves. Develop several models of heating oil prices, then implement several methods of predicting the future price of heating oil. Using your models, test and evaluate the effectiveness of your prediction methods.

A Few Hints: In order to produce your models of heating oil prices, you may want to consider using a sine or cosine function to model the effects of seasonal variation, perhaps a linear function to represent long term trends, and some type of random function for the more complex effects. Remember that you need several different models of heating oil prices, so I would suggest starting with a very simple model, then trying more complex ideas. A similar strategy may be helpful in developing your methods of prediction: Start with something very simple, the most straightforward and obvious method, and then try to improve on it. This unit in your textbook (Ch 17-20) should provide you with lots of ideas for how to do your price extrapolation. (However I would also be very happy to see you doing research beyond our textbook and finding other resources.) Given the random factors in this process, you may want to run your models many times, trying each prediction method to see how close it comes. This will require you to do a little thinking about exactly how you can compare the effectiveness of the different prediction methods.

Note that this assignment is very deliberately open-ended. This project is a challenge to both your mathematical skill and creativity. There is no one right way to approach this problem, but instead it gives you a large amount of freedom. There is a lot of ambiguity here, for instance I did not tell you how far into the future your method should attempt to predict prices, and this means you have to make choices about what you want to do. Different people in this class will make different choices about what aspect of this problem they want to focus on, and that's okay!

Professional mathematicians, economists, and businessmen have spent their entire careers trying to understand how to model and predict prices, and I am asking you to do this project in just a couple of weeks. Remember, that you can't do everything. You must make some specific decisions about what you are going to do and how far you want to take this. You will be graded not only on how ambitious your project is (how much you have attempted to do) as well as how successful you were in doing what you have attempted, and how well you have written up and explained your work. All of your methods do not have to work. Sometimes working harder to use more complex methods is more effective, but not always. Other times, simpler is better. It may be useful to present failed methods, in order to show how much better other methods do by comparison. Each of the numerical methods we will study in this class is a tool, and different tools are appropriate for different types of problems. In this class I want you to learn not only which tools you should use, but which tools you should not use in different situations. If a method fails, tell me all about it, explaining why it is not useful in this context.

Warning: DO NOT leave the writing of your paper to the last minute! You not only have to do interesting and useful mathematics, but you have to explain it all to me. If your work isn't clearly and effectively described in your paper, I can't give you as much credit for your work.

The Paper: Write up your work in a formal paper that is typed, double spaced, and written at a college level. This paper must consist of at least the following parts:

Each of these sections should begin with these headings in a large bold font. Within these sections I would suggest using subheadings to further organize things and aid in clarity.

Each figure and each table should appear on a sheet of paper alone. This sheet should contain only one figure, or one table, so that it does not contain any of the text of your paper. Never break tables or figures across pages. Each figure or table must fit completely onto one sheet of paper. If your table has too much information to fit onto one sheet, divide it into two separate tables. In addition to the figure, this sheet should contain the figure number, the figure title, and a brief caption; for example ``Figure 2: A plot of heating oil price versus time from Model F1. We see that the effects of seasonal variation in price are dominated by random fluctuations." Don't try to insert the figure/table into the text. Instead refer to the figure/table by its number. For example in the text you might say ``As we see in Figure 2, in model F1 the effects of seasonal variation in price are dominated by random fluctuations." You may choose to group the sheets containing figures and tables together at the end of your paper, or you may insert these pages just after the page where each figure is first mentioned. Every figure and table must be mentioned (by number) somewhere in the text of your paper. If you do not refer to it anywhere in the text, then you do not need it.

Think of figures and tables as containing the evidence that you are using to support the point you are trying to make with your paper. Always remember that the purpose of a figure or a table is to show a pattern, and when someone looks at the figure this pattern should be obvious. Figures should not be cluttered and confusing, they should make things very clear.

These papers may be read and evaluated by the other people in this class, so do your best to write them clearly and understandably. The real goal of mathematical writing is to take a complex and intricate subject and to explain it so simply and so plainly that the results are obvious for everyone. I want your paper to demonstrate that you not only did the right calculations, but that you understand what you did and why your methods worked.

A writing hint: When your paper is finished, find an empty room and read the entire thing out loud. You will be amazed at how many problems and awkward spots that you will discover when you actually hear yourself speaking it verbally. If it sounds odd or confusing when you say it, it will be odd or confusing to me when I read it. One of the big goals here is to learn how to write good mathematics and your writing will be an important part of your grade.

Write this paper using the word `we' instead of `I.' For example: ``First we calculate the sample mean." This `we' refers to you and the reader as you guide the reader through the work that you've done. Also please avoid the word ``prove" or ``proof." Numerical methods usually deal with approximations, not absolutes, and in mathematics we reserve the word ``prove" for things that are absolutely 100% certain. Often the word ``test" can be used instead of ``prove."



Kelly Cline 2004-01-22