ok, So I have this question:
Gompertz used the following model do describe environmental pressure on the rate of growth of different groups of a given animal species.
$$\frac{\mathrm{d} x}{\mathrm{d} t} = -\lambda xln(\frac{x}{x_{m}})$$
x(t) is the number of animal species of the particular group. $${x_{m}}$$ is the maximum capacity of the environment, $$ \lambda $$ is a constant describing a fix rate of growth.
What I already have done:
- Solve the equation and substitute y(t) = ln(x(t))
- Using the data from this Table,I have estimated: $$ \frac{\mathrm{d} y}{\mathrm{d} t} $$
- Using Least squares i have managed to estimate the values for $$\lambda $$ and $${x_{m}}$$
The problem: I need to make an approximation of the whole function. What I mean by that is to use what i have estimated and solved until now and "plug it in" (said in simple terms "use everything i have" ) into the Improved Euler Method and draw the path of y(t). I know the formula for the Improved Euler Method, however I cannot seem to grasp how I am supposed to use the predefined $$ f\left [ x_{j+1}, y_{j+1}\right ]$$ Specifically, when I have both the values for t, x(t) and y(t) how do I know which ones should be "plugged in" the formula ? Should I use both X and Y values at t_n for predicting the next value or should I use only one of them ?
Question Simplified How to use this ? $$ y_{j+1} = y_{j} + \frac{h(k_{1} + k_{2})} {2} ; k_{1} = f(x_{j}, y_{j}); k_{2} = f(x_{j+1}, y_{j} + hk_{1}) $$
The $(x,y)$ in the method description correspond to the pair $(t,x)$ of independent and dependent variable in your problem, you just have to replace the variables that way in Karl Heun's 2nd order method to get a straightforward approximation method to the exact solution. \begin{align} k_1&=f(t_n,x_n)\\ k_2&=f(t_n+h,x_n+hk_1)\\ \hline x_{n+1}&=x_n+\frac h2(k_1+k_2) \end{align}
Why don't you want to use the exact solution? Setting $u=\ln(x/x_m)$ the equation reads $\dot u(t)=-λu(t)$, which is easily solvable.