I tried to solve the following problem by the recursive method using the following code of the improved Euler’s method, but it returns me a message ‘‘Overflow occurred in computation’’
with initial conditions (X(0),Y(0),Z(0)=(1,2,3).
Where
X: interest rate
Υ:investment demand
Z: price index
\alpha: savings,
\beta: cost per investment,
\gamma: the absolute value of the elasticity of demand
I tried to solve by the recursive method using the following code of the improved Euler’s method
Q[a_, b_, h_, N_] := (u[0] = a; v[0] = b;
Do[{u[n + 1] =
u[n] + h*
F[u[n] + (h/2)*F[u[n], v[n]],
v[n] + (h/2)*
G[u[n], v[
n]]], \
v[n + 1] =
v[n] + h*
G[u[n] + (h/2)*F[u[n], v[n]], v[n] + (h/2)*G[u[n], v[n]]]}, {n,
0, N}])