I am currently trying to numerically solve a first order system of ODES, of the form:
$$\frac{d\rho}{ds}(s)=f_1(\rho,\theta,k_1,k_2)$$ $$\frac{d\theta}{ds}(s)=f_2(\rho,\theta,k_1,k_2)$$ $$\frac{dk_1}{ds}(s)=f_3(\rho,\theta,k_1,k_2)$$ $$\frac{dk_2}{ds}(s)=f_4(\rho,\theta,k_1,k_2)$$
Where $f_i$ can be found here http://pastebin.com/yMnDq60C
I have inital conditions, $$(k_1,k_2)=(\frac{1}{\sqrt2},\frac{1}{\sqrt2})$$ and $k_3=0$ ($k_3$ is a constant). I have been solving for multiple $(x,y)$ conditions, namely, $$(x,y)=(-1,y),\quad \text{for}\quad y=-2,-1.9,...,1.9,2$$
However my problem is I have been getting extremely strange solutions, upon plotting the solutions for $(x,y)$ in the $(x,y)$ plane, I find only straight lines. I have thoroughly checked through all my code, however I cannot find any mistake that could be causing this.
If someone might be able to check the numerical solutions, say using a standard solver such as ode15s, to see if they also get straight line solutions I would be incredibly grateful! I am new to trying to numerically solve equations, so any help or advice here would be much appreciated.
Below you can see a comparison between the solutions I am getting and the sort of thing I am expecting.

Ah, so for the initial positions, effectively anywhere near the line stated should be fine. So $\theta$ ranging between $3\pi/4$ to $5\pi/4$ and $\rho=1$ should work.
So $\rho$ and $\theta$ are polar coordinates and $k_1$ and $k_2$ represent effectively 'velocity'.
There may be some imaginary results, but these don't seem to be causing any problems so far.
– Freeman Oct 28 '13 at 17:15