# Orbit of a star in a sherical potential

1. Sep 8, 2009

### florian

1. The problem statement, all variables and given/known data
A star is at radius r = 10kpc with v_t=100km/s and v_r=50km/s. The spherical potential is
\phi = V^2ln(r) with V=200km/s
1. what is r_min r_max?
2. Integrate the orbit numerically

3. The attempt at a solution

1.
at r_min and r_max v_r is 0 therefore I can write

E_min = E_max = L^2/(2r^2) + V^2ln(r) = E

but how can I solve this to r = ??

I thought actually I can use angular momentum conservation and say L^2/(2r_min^2) = L^2/(2r^2) which does not really work out? But I think I have to include angular momentum conservation somehow...

2.
I tried numerical integration with the following equation

dr/dt = sqrt(2*(E-\phi) - L^2/(2r^2))

but the value below the root is negative ???

I also found

(dr/r^2d\theta)^2 = 2E/L^2 - 1/r^2 + 2V^2ln(r)/L^2

but here I have a very similar problem.
So my question concerning the numerical integration is actually which equation should I use and how to integrate it. I would like to do the integration in a C/C++ for loop by myself instead of using mathematica or other tools... is that possible?
thanks and best regards
florian