Assignment 4 - Due: Friday July 30, 1999


Numerical Solutions of Differential Equations


The purpose of this assignment is to familiarize you with the concepts of numerical solutions of differential equations. You are to implement the 4th order Runge-Kutta method for the solution of the differential equation dy/dx=x2y3 and y=y0 when x=x0 to approximate the value of y1 when x=x1.

You will prompt the user for

  1. x0, y0, and x1.

  2. The step size, n, to use.

You will output

  1. The approximation for yi+1.

Recall the procedure of the 4th order Runge-Kutta method for a particular subinterval, [xi,xi+1].

      1.

      2.

      3.

      4.

      5.

      6.

      7.

      8.

You will break the interval [x0,x1] up into n equal length subintervals. For each subinterval, [xi,xi+1], use the 4th order Runge-Kutta method to approximate the value of yi+1 which you will then use in the next subinterval.

We discussed in class a simple algorithm for Euler's Method that you can adapt for the 4th order Runge-Kutta Method.


Keith Lynn
Thu Jul 22 11:18:22 CDT 1999