Professor Kate Poirier | D067 | Fall 2022

Project #2: Numerical Methods

Due Wednesday, October 12

Numerical methods provide us a way to approximate solutions of initial value problems without actually having to solve them. In Chapter 3, we see three of these methods for initial value problems of the form $y’=f(x,y)$, $y(x_0)=y_0$:

  • Euler’s method
  • Improved Euler’s method
  • Runge-Kutta method

For Part 1 of Project 2, you will create your own calculator to approximate the solution of one initial value problem using all four of these methods, each with different step sizes. You will not perform your calculations by hand; instead you should use spreadsheet software like Excel or Google Sheets. You may write your own computer program instead of using a spreadsheet if you prefer.

Here is an example of the type of spreadsheet you will create (though this spreadsheet does not conform to all the instructions below).

Instructions

This is not a group project. You may help each other, but each student must submit their own work.

  1. Choose one of the problems below and submit a comment on this post with the number corresponding to your choice (no more than three people may choose the same problem).
  2. Solve the problem using each of the three methods. Use a spreadsheet or write your own computer program to perform these calculations. If using a spreadsheet, include calculations for the different methods on different sheets. Make sure to organize your work and indicate clearly the calculations for different step sizes. Your solution must also display any intermediate values found while carrying out each method:
    • Euler’s Method: display the slope $f(x,y)$ as well as $x$ and $y$ values at each stage,
    • Improved Euler’s: also display the values of $k_1$ and $k_2$ at each stage
    • Runge-Kutta: also display the values of $k_1$, $k_2$, $k_3$ and $k_4$ at each stage
    • You can display other values as well, if you wish.
  3. Email your finished product (Excel spreadsheet, link to Google sheet, link to computer program, etc) by the deadline to your professor.

Problem choices

  1. Use step sizes $h = 0.1, h=0.05, h=0.025$ to find approximate values of the solution of the initial value problem at $x=0,0.1, 0.2, 0.3, \dots, 1.0$. \[(3y^2+4y)y’ + 2x + \cos(x) = 0, y(0)=1\]
  2. Use step sizes $h = 0.1, h=0.05, h=0.025$ to find approximate values of the solution of the initial value problem at $x=1.0,1.1, 1.2, 1.3, \dots, 2.0$. \[ y’+ \frac{(y+1)(y-1)(y-2)}{x+1} = 0, y(1)=0\]
  3. Use step sizes $h = 0.1, h=0.05, h=0.025$ to find approximate values of the solution of the initial value problem at $x=0, 0.1, 0.2, 0.3, \dots, 1.0$. \[y’+3y=7e^{-3x}, y(0)=6 \]
  4. Use step sizes $h = 0.1, h=0.05, h=0.025$ to find approximate values of the solution of the initial value problem at equally spaced points in the interval $[2,3]$ \[y’-2y = \frac{1}{1+x^2}, y(2)=2\]
  5. Use step sizes $h = 0.2, h=0.1, h=0.05$ to find approximate values of the solution of the initial value problem at equally spaced points in the interval $[0, 2]$ \[y’-2xy = x^2, y(0)=3\]
  6. Use step sizes $h = 0.2, h=0.1, h=0.05$ to find approximate values of the solution of the initial value problem at equally spaced points in the interval $[1, 3]$ \[y’+ \frac{1}{x}y = \frac{\sin(x)}{x^2}, y(1)=2\]
  7. Use step sizes $h = 0.05, h=0.025, h=0.0125$ to find approximate values of the solution of the initial value problem at equally spaced points in the interval $[0, 1.5]$ \[y’+y=\frac{e^{-x}\tan(x)}{x}, y(1)=0\]
  8. Use step sizes $h = 0.2, h=0.1, h=0.05$ to find approximate values of the solution of the initial value problem at equally spaced points in the interval $[0, 2]$ \[y’+ \frac{2x}{1+x^2}y = \frac{e^x}{(1+x^2)^2}, y(0)=1\]
  9. Use step sizes $h = 0.05, h=0.025, h=0.0125$ to find approximate values of the solution of the initial value problem at equally spaced points in the interval $[1, 1.5]$ \[xy’+(x+1)y=e^{x^2}, y(1)=2\]
  10. Use step sizes $h = 0.1, h=0.05, h=0.025$ to find approximate values of the solution of the initial value problem at equally spaced points in the interval $[0,1]$ \[y’+3y=xy^2(y+1), y(0)=1\]
  11. Use step sizes $h = 0.1, h=0.05, h=0.025$ to find approximate values of the solution of the initial value problem at equally spaced points in the interval $[0,1]$ \[y’-4y = \frac{x}{y^2(y+1)}, y(0)=1\]
  12. Use step sizes $h = 0.1, h=0.05, h=0.025$ to find approximate values of the solution of the initial value problem at equally spaced points in the interval $[2,3]$ \[y’+2y = \frac{x^2}{1+y^2}, y(2)=1\]

Grading

To receive full credit, your submission must include:

  • functioning solutions for all three methods,
  • all appropriate intermediate values at each stage,
  • answers that are correct up to 5 decimal places at each stage,
  • work that is clearly labelled and organized.

Technical help

The Atrium Learning Center offers free self-paced instruction in Microsoft Office (which includes Excel). Information is here:

12 Comments

  1. Timothy Khan

    #5

  2. Al Jallow

    #4

  3. Opemipo Odugbemi

    #3

  4. Imerson Memko

    #10

  5. Joel Pena

    #9

  6. Nelson F.

    #12

  7. Luyanda

    #1

  8. Rafaeldiaz2435

    #5

  9. Freddy P

    #2

  10. Account Deleted

    #10

  11. Clifford

    #3

  12. Frank

    #1

Leave a Reply

Your email address will not be published. Required fields are marked *