Confused with square root ODE

  • Thread starter nocks
  • Start date
  • #1
24
0

Main Question or Discussion Point

hi there,
I'm trying to plot r against [tex]\phi[/tex] 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.
[tex]
V^2(r) = \left(1 - \frac{2M}{r} \right)\frac{L^2}{r^2}
[/tex]
[tex]
\frac{d \phi}{d \lambda} &= \frac{L}{r^2}
[/tex]
[tex]
\frac{dr}{d\lambda} &= \pm\sqrt{E^2 - V^2(r)}
[/tex]

Thanks
 
Last edited:

Answers and Replies

  • #2
[itex]\pm[/itex] sign shouldn't be there in the first place. You have to decide whether it is positive or negative sign. Just look back at your model again.
 
  • #3
24
0
[itex]\pm[/itex] sign shouldn't be there in the first place. You have to decide whether it is positive or negative sign. Just look back at your model again.
The model is of a photon's path around a black hole. The [tex]\pm[/tex] is due to the fact that the photons distance from the blackhole can increase and decrease in the same orbit.

I've been advised to differentiate dr/d[tex]\lambda[/tex] to get around the [tex]\pm[/tex] but I am unsure as to how this will solve my problem.

I have the [tex]d^2r/d \lambda ^2[/tex] as [tex]\frac{d^2r}{d\lambda^2} &= \frac{L^2(r - 3M)}{r^4}[/tex]
 

Related Threads on Confused with square root ODE

  • Last Post
Replies
11
Views
2K
Replies
5
Views
4K
Replies
8
Views
4K
  • Last Post
Replies
1
Views
965
Replies
3
Views
4K
  • Last Post
Replies
5
Views
2K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
3
Views
2K
  • Last Post
Replies
4
Views
2K
Top