I recently moved to ver 9, and found that an algorithm that has served me well for years in previous versions no longer works in this newest version. Solving this kind of algorithm is critical to my work, so version 9 is virtually useless to me without the capability to solve them. (I had to return to ver 8 well hopefully for now.)
Attached file is the result after evaluating it in ver 9 and you can find the error messages concerning the k(t). However, the identical code works perfectly in ver 8.
So please help me out and let me know how to fix this. Any help or suggestion would be appreciated.
Thanks in advance,
If you need some background information, read below.
It is about sovling 2x2 system of first-order differential equations such as...
dk/dt = Kdd[k(t),p(t)]
dp/dt = Pd [k(t), p(t)]
It can be shown that:
k(t) -> ks and p(t) ->ps as t -> infinity, i.e. transversality conditions.
K, ks, ps are all constants. (ks and ps are called steady states.)
As you see, this is a boundary value-type problem.
One can attack this problem by guessing the initial value of p(0) and trying repeatedly until a solution that meets transversality conditions are met. This method, called 'shooting', is conceptually as well as computationally inefficient.
The way to attack this kind of problem in my discipline is to view it as an initial value problem. That is, if the initial value of variable p corresponding to k(0)=K were known, then simply integrating these differential equations would yield the optimal solutions to k(t) and p(t) at each point in time.
By transforming a boundary-value problem into an initial-value problem, we can express p(t) as a function of k(t), instead of as a function of time. That is,
Attachment: NDSolve v9.nb, URL: ,