[关闭]
@355073677 2016-03-30T07:32:52.000000Z 字数 3256 阅读 1287

Chapter 1 Problem 1.6


Name: Feng Chen
Student number: 2013301020145
March 24, 2016

Abstract

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.

Introduction

Population growth prpblems often give rise to rate equations that are first-order. For example:


might describe how the number of indiciduals in a population, N, varies with time. Here the first term corresponds to birth of new members, while the second term corresponds to deaths. The death term is proportional to to allow for the fact that food will become harder to find when the population becomes large.

Nummerical Approach -- Euler method

Firstly, we do the Taylor expansion for the population


When Δt is small enough, the error terms can be negligible.
Thus, the growth rate equations of population becomes:

However, via changing the recursion equation, we can make use of more accurate numerical methods to solve this problems, which are showed in ODE solving package.

Analytical Approach

Firstly, we change the form of the equation and it becomes:


Making an integral of both sides of the equation, we get:

where
Therefore, giving the initial population , the population function becomes:

This is the analytical expression of this population model.

Data Analysis

When , the exact solution becomes:


Setting , time step = 0.01 , the result is:
figure_1
When , the result becomes:
figure_2
In this situation, death rate have a huge influence on the population, leading to a steady population at the end.

Sensitivity test of b

figure_3
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.

Error Analysis

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:


Thus, the recursion euqation becomes:

And the result becomes:
figure_4
which is much more accurate than before.

Conclusion

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.

Programme code

添加新批注
在作者公开此批注前,只有你和作者可见。
回复批注