nocks
- 24
- 0
hi there,
I'm trying to plot r against \phi by solving the following ODEs using runge-kutta. The problem I'm having is with the square root. How do I know when it will be positive and when it will be negative? If this is a simple question I apologise I'm not that great with the maths :).
E and L and M are constants.
r>0.
<br /> V^2(r) = \left(1 - \frac{2M}{r} \right)\frac{L^2}{r^2}<br />
<br /> \frac{d \phi}{d \lambda} &= \frac{L}{r^2} <br />
<br /> \frac{dr}{d\lambda} &= \pm\sqrt{E^2 - V^2(r)}<br />
Thanks
I'm trying to plot r against \phi by solving the following ODEs using runge-kutta. The problem I'm having is with the square root. How do I know when it will be positive and when it will be negative? If this is a simple question I apologise I'm not that great with the maths :).
E and L and M are constants.
r>0.
<br /> V^2(r) = \left(1 - \frac{2M}{r} \right)\frac{L^2}{r^2}<br />
<br /> \frac{d \phi}{d \lambda} &= \frac{L}{r^2} <br />
<br /> \frac{dr}{d\lambda} &= \pm\sqrt{E^2 - V^2(r)}<br />
Thanks
Last edited: