General    Homework     Programming assignments    Demos    Links

## MATH 5543, Fall 2008    Numerical Analysis for Differential Equations

• #### Final Exam time and place

• Time: Dec. 11, 2008. 10:00-11:50 AM.
• Place: MSCS 203 (usual class meeting place).
• #### Course description:

Prerequisites: MATH 4233, MATH 4153 (or CS 4153). Advanced machine computing, algorithms, analysis of truncation and rounding errors, convergence and stability applied to discrete variables, finite difference methods for solving hyperbolic, parabolic and elliptic differential equations. One programming language (e.g. C/C++, Fortran, Matlab, Maple) is required. Among them, Matlab is recommended. (syllabus)

See Syllabus Attachment for university-wide rules regarding dropping a course, academic integrity, and office of student disability services.

• #### Instructor:Yanqiu Wang

• Office:  441 MATH   (405-744-5698)
• Office Hour:   TR 4-6pm or by appointment.
• Email:  yqwang  (AT)   math.okstate.edu

• #### Classroom and time:

Sec Classroom Time
001 TR 10:30-11:45pm MSCS 203

• 6 homework (120pts) and 4 programming assignments (80pts);
• Final Exam (100pts): comprehensive, open-book, open-notes;
• The Total is 300 pts: A (>=90%), B (>=80%), C (>=70%), D (>=60%).
• #### Make-up Policy:

• Make-ups for exams will only be allowed for an authorized absence under University Regulations. Normally a written note is required. Student should contact the instructor to schedule a make-up by the end of the next working day after the missed exam.
• You sacrifice 5 points per day for each late homework and programming assignments. Early submissions are always welcome.

## Homework

• Hwk 1: due 9/2/2008. A.2.2, A.2.3(only first part), 1.1.1, 1.1.2
• Hwk 2: due 9/16/2008. 2.1.4, 2.1.5, 2.1.6, 1.4.2, 1.4.4
• Hwk 3: due 9/30/2008. 1.5.2, 1.6.3, 2.2.3, 2.2.4, 2.2.6, 3.2.1.
• Hwk 4: due 10/23/2008.
• Hwk 5: due 11/13/2008. 6.3.1 (only the part for (6.3.4)), 6.3.14, 7.1.4, 7.2.2.
• Hwk 6: due 12/4/2008.

## Programming assignments

For each programming assignment, you need to submit
(1) a report stating your results, conclusions, and graphs if any; (in hardcopy)

## Demos

• Here's our first demo Matlab program (all .m examples list on this webpage should also runs under Octave). It models the continuous shifting of sin(x) to the right. You can see how to define a vector and a matrix, to make a loop, and to plot curves and surfaces.
• A simple example of using forward/backward-time forward-space discretization to solve the one-way wave problem. Copy and paste the code into a .m file and run it. (The programming style in this example is considered "bad" for matlab programs. I delibrately disintegrated some commands in order to make the code easier to read for beginners. For those who are familiar with Matlab, you should "vectorize" your codes.)
• You can use the following code to save the plots into image files:
```plot(sin(0:0.1:(2*pi)),'r');  % 'r' specifies that the curve be drawn in red
print('sin.eps','-depsc');    % save an eps file, which can be used in latex
print('sin.png','-dpng');     % save a png file```
Type "help print" to learn about file formats. Option '-depsc' save an eps file in color, option '-deps' will save an eps file in black-and-white. In matlab, you can also save a jpg file with by using the option '-djpeg'. Unfortunately, Octave supports less file formats.
• How to change directory under Octave? For example, the script "myprogram.m" file is saved under "C:\Documents and Settings\myusername\My Documents\myprogram.m", you need to change the current working directory under Octave in order to run the script. Type
`chdir('C:\Documents and Settings\myusername\My Documents')`
Then you can type the filename in Octave to run the script:
`myprogram`
• A Matlab demo on error in h-norm for the upwind scheme.
• A Maple demo demo for solutions of 1-D heat equations.
• Solving the minimal surface problem using the finite difference method. This is a nonlinear problem. Detailed description is given in this PDF file. The Matlab code can be found here.