Question: Write code that will use Euler's method to simulate the differential equation N = 0.2N (1 N ) with the initial condition N (0) =
Write code that will use Euler's method to simulate the differential equation N = 0.2N (1 N ) with the initial condition N (0) = 10 and a step
100
size of h = 0.1. You will probably want to follow the steps below.
- Write code that performs one step of Euler's method, without iteration.
- Iterate this procedure to find the population value at t = 100. (It should be approximately 99.99.) Your final program should store all the intermediate values of N in a list but, depending on your approach, you may find it easier to start without this. HINT: What parts of your code need to change from one step to the next? You may want to review Lab 3.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
