McGill University
189-579B: Numerical Differential Equations
(4 credits)

Professor: Martin J. Gander
Many physical phenomena can be formulated as differential equations, for example the flow of a fluid or the temperature in your room. The solution of these equations is however challenging and analytical methods rarely suffice to obtain the desired results. Only numerical methods can solve the problems of interest in applications. This course introduces you to the theory of modern numerical methods for solving ordinary differential equations (ODEs) and partial differential equations (PDEs). We use throughout the course Matlab to develop prototype codes and we use Maple to avoid tedious hand calculations. This is the ideal course for you if you are an engineer or applied mathematician who needs to solve ODEs and PDEs in your application area. After the course you will be able to make an informed choice when solving your problems numerically.

Latest Information

  • The final is online (postscript,pdf)
    The programs you need are InitialW.m and PlotAll.m.
  • The course schedule is Monday from 18:00 - 21:00 in Burnside Hall, 1205

Places

  • Classroom: Burnside Hall, 1205
  • Office hours in Burnside Hall, 1114: Th and Fr 16:00-17:00

Handouts

Homeworks

  • Homework #1 (postscript,pdf)
  • Homework #2 (postscript,pdf)
  • Homework #3 (postscript,pdf)
    If you implement your room discretization in a certain way, you might have a problem with a Matlab bug which unfortunately still exists in Matlab 6. If you have a statement like the following, where G is the grid for your room:

    no=G(i,j);

    and you want to use no as an index, it will not work, even though no contains the right number. You need to do the following to make it work:

    no=no+0; % matlab bug, otherwise no-index wrong

    Now no can be used as an index.

    There is also a misprint in 2 (f), what I mean is f is periodic with its derivatives, not u.
  • Homework #4 (postscript,pdf)
    The part of NewMesh with the chicken is here:
    elseif G==3                                         % chicken in a microwave
      N=[.08 .09; .14 .04; .2  .03; .3  .03; .35 .04    % inside
         .4  .1 ; .35 .16; .3  .2 ; .25 .22; .2  .24 
         .14 .24; .1  .2 ; .05 .2 ; .03 .22; .02 .19 
         .03 .16; .05 .18; .1  .18; .13 .14; .15 .18
         .2  .2 ; .15 .1 ; .2  .1 ; .3  .1 ; .35 .1  
         0   0  ; .1  0  ; .2  0  ; .3  0  ; .4  0      % outside
         .5  0  ; .5  .3 ; .4  .3 ; .25 .3 ; .15 .3
         .08 .3 ; 0   .3 ; 0   .19; 0   .1 ; .5  .15];
      T=[13 14 15 0 0 0; 15 16 17 0 0 0; 15 17 13 0 0 0; 17 12 13 0 0 0
         17 18 12 0 0 0; 18 20 12 0 0 0; 18 19 20 0 0 0; 12 20 11 0 0 0
         20 21 11 0 0 0; 21 10 11 0 0 0; 21  9 10 0 0 0;  1 22 19 0 0 0
         22 20 19 0 0 0; 22 23 20 0 0 0;  2 22  1 0 0 0;  2 23 22 0 0 0
         20 23 21 0 0 0; 23  9 21 0 0 0;  2  3 23 0 0 0;  3 24 23 0 0 0
         23 24  9 0 0 0;  3  4 24 0 0 0; 24  8  9 0 0 0; 24  7  8 0 0 0 
         24 25  7 0 0 0; 24  5 25 0 0 0;  4  5 24 0 0 0;  5  6 25 0 0 0
          6  7 25 0 0 0; 26 27  1 1 0 0; 27  2  1 0 0 0; 27 28  2 1 0 0 
         28  3  2 0 0 0; 28 29  3 1 0 0; 29  4  3 0 0 0; 29 30  4 1 0 0
         30  5  4 0 0 0; 30  6  5 0 0 0; 30 31  6 1 0 0; 31 40  6 1 0 0
         32 33 40 1 0 1; 33  7  6 0 0 0; 33  8  7 0 0 0; 33 34  8 1 0 0
         34  9  8 0 0 0; 34 10  9 0 0 0; 34 35 10 1 0 0; 35 11 10 0 0 0
         35 36 11 1 0 0; 36 12 11 0 0 0; 36 13 12 0 0 0; 36 14 13 0 0 0
         36 37 14 1 0 0; 37 38 14 1 0 0; 38 15 14 0 0 0; 38 16 15 0 0 0
         38 39 16 1 0 0; 39  1 16 0 0 0;  1 17 16 0 0 0;  1 18 17 0 0 0
          1 19 18 0 0 0; 39 26  1 1 0 0; 40 33  6 0 0 0];  
      P=[muChicken*(epsChicken+sigmaChicken/i/w)*ones(1,29) ...
         muAir*epsAir*ones(1,34)];
    
  • Homework #5 (postscript,pdf)

Solutions

Other useful and interesting links

     [Home] [Teaching] [Research] [Consulting] [MathHome] [McGill]