18.03 Class 8, Fri. Feb. 19, 1999


I reminded the class of the three legs of this course: analytic, qualitative, numerical. I pointed out that ``analytic'' methods really simply write solutions to one ODE (such as dot-x = x(1-x)) in terms of solutions of other ``simpler'' ODEs (such as dot-x = x). This is comforting, and may allow you to use your understanding of solutions to those simpler ODEs (exponentials). In the old days one had long tables of values of solutions to certain special ODEs, and used them to evaluate other functions. Today, however, we can compute the values of solutions to virtually any ODE with equal ease, so the truth is that the role of analytic methods has changed. One thing they can do, as I had pointed out in Class 6, is to show things like: solutions of the logistic equation above for which x>1 blow up in finite time.

I reminded the students of the simplest ODE, y'=g(x); its isoclines are vertical straight lines and its solutions have the form y(x)=y(a)+\int_a^x g(x)dx . In calculus one learns three methods of computing a definite integral: left-end point, trapezoidal rule, and Simpson's rule. These successively approximate the function over a small interval by degree 0, 1, and 2 polynomials.

Then I explained how each of these methods extends to give a step-by-step way of approximating solutions to a general first order ODE: Euler's method, Heun's method = improved Euler = 2nd order RK, and 4th order Runge Kutta. I pointed out that the middle two slopes (which I called m_2 and m_3) in RK4 were the same in the y'=g(x) case, so the two middle terms give the middle term in Simpson's rule.

Then I took the page of data from the back of the first version of PS2, and studied how well the three methods do, with various step sizes, in approximating solutions to y'=x-y^2. Generally, halving the stepsize improves Euler by a factor of 2, Heun by a factor of 4, and RK4 by a factor of 16. This is to be expected, since Euler uses one evaluation per step, Heun uses two, and RK4 uses four. However, the multiplier makes RK4 generally much the best method if you can afford the complication. This will be illustrated in the homework. (The data in the bottom table of the page is wrong, since to 6 digits y(1)=.4555445).

[Part II problem 8.5 is revised in a second version of PS2, handed out on Monday. Polking's routines don't work the same way under unix as they did for me at home, and besides the problems could have been better chosen and now have been (I hope).]


Back to Class 6. (Class 7 was the first exam.)
Forward to Class 9.
Return to Lecture Summaries.
Return to 18.03 Home Page.