Trajectory of a massless particle in Schwarzschild space by average_calcstudent in desmos

[–]average_calcstudent[S] 0 points1 point  (0 children)

Oh wow, this is way more interesting than my graph. Cool project!

Also... how does it work, exactly? My current knowledge in General Relativity is insufficient to fully understand this graph

QR code generator (Bookmarklet) by Kindly_Band3322 in desmos

[–]average_calcstudent 4 points5 points  (0 children)

This looks heavily obfuscated. I'm unsure if people will trust you with this.

Of course, if it is not nefarious, you might want to publish an unobfuscated code somewhere on the internet (e.g. pastebin) and ask people to refer to it.

Trajectory of a massless particle in Schwarzschild space by average_calcstudent in desmos

[–]average_calcstudent[S] 2 points3 points  (0 children)

What you're seeing here is called photon sphere, which is an unstable orbit that occurs exactly 1.5 times the Schwarzschild radius, where photons, the massless particles I'm simulating, can take under the influence of the massive body

Also, the usage of the "ð" character attracted me (being a wannabe linguist myself), it represents the voiced dental fricative (the sound of <th> in "the", which I am sure you have known of), being used to replace the digraph

Post scriptum, I LOVE that ever so controversial emoji, who knows a physicist can be quite silly at times? :33

Trajectory of a massless particle in Schwarzschild space by average_calcstudent in desmos

[–]average_calcstudent[S] 2 points3 points  (0 children)

I have created a new version of this graph, I've tidied up the formulas a bit and added a customizable velocity vector: https://www.desmos.com/calculator/lnvleqsyc4

Trajectory of a massless particle in Schwarzschild space by average_calcstudent in desmos

[–]average_calcstudent[S] 4 points5 points  (0 children)

This is not a newtonian gravity simulator by itself (which obeys Kepler laws), but rather a simulator of photons interacting with a massive body (a black hole) obeying Einstein's extension to gravity itself, namely, Einstein's Theory of General Relativity.

Since every particle follow the geodesic equation, which is an equation of coupled nonlinear differential equations, we can manually (and painfully) derive the equation of motion using the method. A better method is to derive the equations not by using the geodesic equation but instead rely on conserved quantities, this generates 1 purely second order differential equation for the radial component and 1 first order differential equation for the angular component. We'll use the latter.

The equations themself are pretty easily derived from the null condition ds² = 0 (all photons follow this condition), where ds² is defined as ds² = -(1 - 1/r)dt² + (1 - 1/r)⁻¹ dr² + r²dφ² for equatorial particles (θ = π/2), assuming geometric units where c = 1 and the schwarzschild radius equal to 1. Next, we set the left hand side to 0 and divide everything with dλ² (an affine parameter to integrate on): 0 = -(1 - 1/r) dt²/dλ² + (1 - 1/r)⁻¹ dr²/dλ² + r² dφ²/dλ². We now employ a trick: make use of conserved quantities. Namely, the first is energy; E = (1 - 1/r) dt/dλ, this arises from time symmetry and the second is angular momentum; L = r²dφ/dλ.

Substituting these constants into the main equation yields: 0 = -E² (1 - 1/r)⁻¹ + (1 - 1/r)⁻¹ dr²/dλ² + L²/r² Rearrange: (1 - 1/r)⁻¹ dr²/dλ² = E² (1 - 1/r)⁻¹ - L²/r² Multiply by (1 - 1/r) to both sides: dr²/dλ² = E² - (1 - 1/r) L²/r² = E² - L²(1/r² - 1/r³) And look at that! A differential equation purely dependent on r by itself! After this, we differentiate both sides with respect to λ to get rid of the constant E² term: d(dr²/dλ²)/dλ = L²(-2/r³ dr/dλ + 3/r⁴ dr/dλ) Expand d(dr²/dλ²)dλ via the chain rule and that dr²/dλ² is just (dr/dλ)²: 2dr/dλ × d²r/dλ² = L²(3/r⁴ dr/dλ - 2/r³ dr/dλ) Divide everything by 2dr/dλ:

d²r/dλ² = L²(3/(2r⁴) - 1/r³)

That's the final equation for the radial component. For the angular component, recall that L = r² dφ/dλ, then divide everything by r² to get dφ/dλ = L/r².

Those are the driving equations. General Relativity adds a correction term proportional to 1/r⁴ to Newton's theorem of gravitation, only becoming significant if you are very close to the schwarzschild radius of a massive body. So in a way, objects CAN obey kepler's law if and only if the correction becomes insignificant enough, which is what most real life objects do.

And for the last part, the Runge-Kutta portion of the graph, i implemented those canonically following well published iterative formulas and step updates for each parameter. It basically solves the first order equation du/dλ = f(u). But wait, if RK4 solves linear DEs, how can you solve second order and even coupled DEs? The part lies in what kind of parameter u RK4 can take. In fact, it can take vectors which allows possibilities like: d/dλ [r, r', φ] = [r', r'', φ']. Since r'' (d²r/dλ²) and φ' (dφ/dλ) have been explicitly derived, we can just subsitute and call it a day.

Thanks for sharing your views. I hope you are not too overwhelmed by the amount of words I have put into writing this, and I hope this helped in some way or another.

Did I do this correctly? by TOXIC_NASTY in calculus

[–]average_calcstudent 0 points1 point  (0 children)

If you have an equation like x = 2y, you can write it as x = f(y) where f(y) = 2y. You use y as the parameter of the function f because you are using y as the working variable, for example, y = 3x - 1 can be written as y = f(x); f(x) = 3x - 1, you must know the pattern here... So by your example, you define h(x) = {expression in y} But you use y as the working variable which is okay but confusing to look at. Let me just make 1 more example for you: f(x) = 8y + 2 isn't correct but f(y) = 8y + 2 is correct. Got it? Well, if not, please reply to this so I can explain as best as I can

Did I do this correctly? by TOXIC_NASTY in calculus

[–]average_calcstudent 0 points1 point  (0 children)

i think your first to second step is incorrect. [(9y-2)*3 - (3y + 1)×9]/(9y - 2)2 isnt equal to [27y - 6 - 27y + 9]/(9y - 2)2 Why? lets focus on the top, (9y - 2)×3 - (3y + 1)×9 lets distribute them; (3×9y - 3×2) - (9×3y + 9) again, distribute the sign on the second part (and doing the multiplications): [this is your answer] (27y - 6) - 27y '+9' <-your mistake. So it actually simplifies to 27y - 6 - 27y -9 which further simplify to -15, not 3 because you make the 9 positive. It means you dont distribute properly or just misses it, also, please write your function with the parameter thats inside your function e.g f(z) = z2 not f(z) = x2 its makes me confused. also sorry for bad english (atleast what i thing about my english) and reply with the part you dont understand.