Math 230, Spring 1999
Mathematica assignment 3
(due Monday, 3/1/99)

The following problems are taken from pages 101 to 107 of the Differential Equations with Mathematica book.  In problems requiring the use of Euler's method, feel free to use my
version of the EulerMethod command rather than the book's version.   The main difference is that my method returns a function whereas the book's returns a table of values.  You should also compare results obtained with Euler's method with results obtained using the Runge-Kutta method.

Problem 1.

Problem 4.

Problem 12.

Problem 15.

Bonus:  Quadratic Version of Euler's Method

Euler' s method for approximating solutions of
                     y' (x)  =  
          f (x, y),      y ((Subscript[x, 0]))  =  (Subscript[y, 0])
\(works\ by\ assuming\ that\ y\ is\ approximately\ linear\ on\ small\ intervals . Describe\ a\ variation\ on\) 
Euler's method that works by assuming that y is quadratic on small intervals .  Implement 
this new method as a Mathematica command called QuadMethod.  Use my EulerMethod
and (especially) RKMethod commands as models for syntax, etc .   When you get your 
QuadMethod command working, \(try\ to\ answer\ the\ following\ questions\  . 
	
\ \ \ \ \ \ \(\((a)\)\ How\ do\ local\ and\ global\ truncation\ errors\ depend\ on\ h?\ \ That\ is\)\), are they about 
	        \(equal\ to\ Ch?\ 
              to\ \(Ch\^2\)?\ \ etc . 
		
\ \ \ \ \ \ \((b)\)\ Does\ the\ new\ method\ work\ better\ or\ worse\ than\ Euler' 
            s\ \ \ method?\ \ than\ the\ Runge\)-
	         Kutta \(method?\ 
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ 
You\) can do this experimentally by applying  your QuadMethod command  in specific 
examples (e . g .  the y'  =  y,  
            y (0)  =  1 example);   also try y'  =  3  y/x,  
        with y (1)  =  1 to 
check that your method works for non - 
          autonomous ODE' s .   You can also try to 
\(answer\ the\ questions\ \((especially\ the\ one\ about\ local\ error)\)\ from\ a\ more\ theoretical\) 
standpoint.