@355073677
2016-03-30T07:32:52.000000Z
字数 3256
阅读 1305
Name: Feng Chen
Student number: 2013301020145
March 24, 2016
This is a programme to solve a specific first order ODE system via Euler method in the ODE solving package and store the datas in a .txt file. Finally, I plot the datas and compare this result to the analytical result and other numerical method via ODE solving package.
Population growth prpblems often give rise to rate equations that are first-order. For example:
Firstly, we do the Taylor expansion for the population
Firstly, we change the form of the equation and it becomes:
When , the exact solution becomes:
In this part, I consider the effect of the magnitude of b.
As the magnitude of b increased, the population growth rate decreases dramatically, which is we expect.
As the figures showed above, 3rd Runge-Kutta method is much more accurate than simple euler method in the same time step.
In the simple euler method, we only consider the contribution of first-order derivative, leading to huge errors which are proportional to the value of higher-order derivatives. Thus, when the time step is given, the larger higher-order derivatives become, the huger errors will be made.
In this section, I try to consider the contribution of the second-order in order to approach the exact soultion without diminishing time step .
First of all, I calculate the second-order derivative of the population:
In this project, we can learn how to use Euler method and other numerical methods to solve simple first order ordinary differential equation. On the other hand, it offers us a way to improve the precision of simple euler method.