Solve General Relativity "Paradox" w/ Automatic Diff. ODE Solver

In summary, the software uses Python3 and matplotlib to plot a function of alpha and r1. It is still in the process of being tested for accuracy.
  • #1
m4r35n357
654
148
After making a couple of comments on this StackExchange question, and pointing yet again to this article, a thought occurred to me.

I have been working on an Automatic Differentiation based ODE solver and equation analyzer, mentioned in this thread. Why not use it to solve equation (7) in the article, and plug in my answer to equation (8)? All I have to do is write a test client containing the appropriate equations ;)

Well, I had to do a bit of work to extract the equation solver results programmatically rather than just printing them out, but I did get it working! Here's what it looks like in the console (the ratio is of the proper times of the radial to circular paths):
Python:
$ ./grtwins.py 2 -2 2 1001 0 1e-9 1e-9 | ./plotMany.py 2 300 >/dev/null
taylor module loaded
series module loaded
playground module loaded
Newton's method
ResultType(count=4, sense='-', mode='ROOT', x=1.5843306502838275, f=-7.105427357601002e-15, dx=-1.0310205845716116e-16)
(4.932330448527358, 1.3413587820012287)
n = 1
alpha = 1.5843306502838275
r1 = 4.932330448527358
r2 = 10.0
ratio = 1.3413587820012287
A plot of the alpha function in the article is attached (function value is black, the rest are the first six derivatives). I am still in the process of testing for accuracy, but thought I'd post while I was motivated ;) If anyone wants to join in the fun, the software (which uses Python3 and matplotlib) is here.
 

Attachments

  • Figure_1-3.png
    Figure_1-3.png
    15.9 KB · Views: 370
  • Like
Likes Dale
Physics news on Phys.org
  • #3
m4r35n357 said:
I had to do a bit of work to extract the equation solver results programmatically rather than just printing them out, but I did get it working
Excellent!
 
  • #4
Dale said:
Excellent!
Cheers ;)

I'm now scratching my head wondering how I can check against the table following eq(8). I am starting with r2, working out q, then alpha, then r1. How to go the other way round is not particularly obvious . . . I can only think of brute-force evaluating lots of r2 and alpha values, inverting using eq(6), and then interpolating (not nice at all!).
 
Last edited:

1. What is General Relativity?

General Relativity is a theory of gravity developed by Albert Einstein in the early 20th century. It describes the relationship between mass, energy, and the curvature of space and time.

2. What is a paradox in General Relativity?

A paradox in General Relativity occurs when there is a contradiction between its principles and the laws of physics. This can happen when trying to apply the theory to extreme situations, such as near a black hole, where the effects of gravity are very strong.

3. How does an Automatic Differential ODE Solver help solve General Relativity paradoxes?

An Automatic Differential ODE Solver is a computer program that can solve complex equations, such as those involved in General Relativity, automatically. This allows scientists to input the parameters of a paradox and quickly find a solution without having to manually calculate it.

4. What are some common paradoxes in General Relativity that can be solved with an Automatic Diff. ODE Solver?

Some common paradoxes in General Relativity that can be solved with an Automatic Diff. ODE Solver include the Twin Paradox, the Black Hole Information Paradox, and the Grandfather Paradox. These all involve situations where the laws of physics seem to contradict each other, and an Automatic Diff. ODE Solver can help find a resolution.

5. Are there any limitations to using an Automatic Diff. ODE Solver to solve General Relativity paradoxes?

While an Automatic Diff. ODE Solver can greatly assist in solving General Relativity paradoxes, it is not a perfect solution. Some paradoxes may still require further analysis and manual calculations to fully understand. Additionally, the accuracy of the solution depends on the accuracy of the input parameters and equations, so it is important to ensure these are as precise as possible.

Similar threads

  • Special and General Relativity
2
Replies
40
Views
2K
  • Special and General Relativity
3
Replies
75
Views
3K
  • Special and General Relativity
Replies
11
Views
184
Replies
2
Views
3K
  • Special and General Relativity
Replies
29
Views
1K
  • Programming and Computer Science
Replies
18
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
7
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
1
Views
2K
Back
Top