Numerical methods provide a way to compute (approximate) values of solutions to differential equations, even when we cannot solve the equations exactly.  The drawback is the large number of numerical calculations required to obtain a desired value and level of precision.  In this project, you will use technology to implement the various numerical methods and use your technological solution to solve differential equations problems.

Assignment (Due Thursday, March 23).  Create a numerical methods calculator.  You can choose your technology tool for this job – use any one of the following:

  1. a spreadsheet (Excel, Google Sheets, or other spreadsheet)
    • if you choose to create a spreadsheet, you should have columns forx, y, f(x,y) , and so on, and each stage should appear in its own row
  2. a programming language (Java, Perl, or other programming language)
    • if you choose to write code, your program should output the values of x, y, f(x,y) and so on at each stage
  3. mathematical software (MatLab, Maple, Mathematica, or other mathematical software)
    • if you choose to use mathematical software, your program should output the values of x, y, f(x,y) and so on at each stage

How to submit. Part 2 of this project will talk about how to submit your project – you will be asked to upload your solution (spreadsheet, or code, or mathematical software document) and to write  about what you did.  For now, focus on getting your solution working.

Requirements:

  1. Your solution should allow you to solve problems of this type:

Example.  Given the differential equation dy/dx=x^2-0.5xy and initial condition y(1.5)=2.2, approximate the value of y(2.5) using step size h=0.05

  1. Your solution must be able to carry out Euler’s Method, Improved Euler’s Method, and Runge-Kutta (you may implement these as three separate spreadsheets or programs if you wish).
  2. Your solution should display all the points (x,y) found along the way, not just the final point.
  3. Your solution should also display other values found while carrying out each method:
    1. Euler’s Method: display the slope f(x,y) at each stage
    2. Improved Euler’s: display the values of k1, k2 at each stage
    3. Runge-Kutta: display the values of k1, k2, k3, k4 at each stage
    4. You can display other values as well, if you wish (for example, the intermediate y-value in the Improved Euler method that we refer to as z).
  4. Your solution may NOT use any built-in version of these methods (for example, most mathematical software contains a built-in command for Euler’s Method – you can use this to check your work, but you need to create your own solution).
  5. You should be able to relatively easily change the initial condition, step size, and target value.
  6. You should be able to relatively easily change the differential equation.

Test your project.  Solution data for the above example using Euler, Improved Euler, and Runge-Kutta will be posted this weekend so you can test your project.  You can also use examples from class to test your work, since you know what the solutions are.