How could I generate a vector field to mimic the graph in the picture below?

45 Views Asked by At

for educational purposes I want to generate a vector field starting from a graph found in my book*.

Would anyone of you be so kind as to suggest a function that approximates the graph in this picture?

Many thanks in advance.

dynamics of the RCK model in Economics, source: Romer textbook

*Advanced Macroeconomics, David Romer, McGraw-Hill, 4th ed.

1

There are 1 best solutions below

4
On BEST ANSWER

Let's call $f(k)$ the boundary where $\dot k=0$. For a given $(k,c)$ pair, the horizontal component is positive if $c<f(k)$, is zero if $c=f(k)$ and is negative if $c>f(k)$. You can use the sign function for example $$\textrm{sgn}(x)=\cases{1,x>0\\0, x=0\\ -1,x<0}$$ to write the horizontal component as $\textrm{sgn}(f(k)-c)$. Similarly, the vertical component will be $\textrm{sgn}(k^*-k)$, So your vector field is $$\vec v=\left(\textrm{sgn}(f(k)-c),\textrm{sgn}(k^*-k)\right)$$ If you want a smooth function (no jumps), just use any odd function instead of the sign function. For example $$\vec v=\left(f(k)-c,k^*-k\right)$$