Bacterial growth

Similar to the procreation problem of most organisms, bacterial growth depends on the size of the population in a complicated fashion. Intuitively, the growth rate should increase with increasing population size, as there are more individuals capable of procreating. On the other hand, size population can have the opposite effect, as an excessive number of individuals may encounter difficulties living side by side; feed may become a limiting factor for population growth, while excessive pollution generated by the existing population can cause increased death rates.

In this exercise we will investigate the effect of the step size on the numerical results obtained for differential models. To this end, we will use several models and test at which point numerical calculations yield results that can no longer be distinguished from the exact (analytical) solutions.

Procedure

We can go through the following routine many times until we are satisfied with the result:

1. Initiate a variable YY:

YY = f(0) % set a numerical value calculated by choosing values for all necessary constants and setting t = 0.

2. Operate on YY to give many entries of YY:

for j = 1:calculate some appropriate number

YY = [YY; YY(end) + stepsize*YY’(end)];

end

t = (linspace(0,j*stepsize,j+1))’;

The expressions for YY’ are given in Table 1. You should run the calculation up until the time variable t is equal to values given in Table 1.

3. Plot YY on top on the analytical solution. If you are not satisfied with the fit, start again from step 1 and decrease the step size until you are satisfied with the fit. Note the value of the step size at which the fit becomes acceptable. If you are satisfied with the initial fit, work in the opposite direction: start again from step 1 and increase the step size until you are NOT satisfied with the fit. Note the step size at which that happens.

To plot, use the following:

ezplot(Y,0,%some appropriate value from Table 1%); hold; plot(t,YY,’--‘)

Where instead of Y you write the analytical expression from Table 1 for one of the three models. Use only one variable, t (you must choose numerical values for all other parameters) and enclose the entire expression within apostrophes‼!

An example:

ezplot(‘t – 5*exp(-t)’, 0, 12); hold; plot(t,YY,’--‘)

Table 1. Different models for bacterial growth in analytical and differential forms.

Model name / Analytical form / Differential form / Upper value of calc.
Gompertz / / / 2k/r
Logistic / / / (b+2)/c
Richards / / / τ + 5/k

Make a table tabulating the values of all variables used (make as many combinations as possible!) and the value of the step size at which the fit becomes reliable. Give some comments on your results.