- #1
DaleSwanson
- 352
- 2
I wasn't sure if this should go here, but I guess it falls under independent study.
Ok, so I'm making a javascript calculator to find the travel time if you accelerate at 1 g. The point of this was to help me learn JS and a bit of physics and math. The possible variables are:
a - acceleration
T - ship time
t - Earth time
d - distance
v - final speed
I wanted to make it so that you could provide whichever variable you knew and it would solve for the rest. So far this has gone well, but I'm having trouble getting the other variables from velocity alone.
I've been using the equations from this page:
http://math.ucr.edu/home/baez/physics/Relativity/SR/rocket.html
In particular I was trying to start with this one and solve for t:
[tex]v = \frac{at}{\sqrt{1 + (at/c)^{2}}}[/tex]
I've spent quite a while trying to solve for t and this is as far as I've gotten:
t2 - c-2t2v2 = a-2v2
I wanted to get rid of all those exponents by finding the square root of both sides, but apparently I can't do this (I've been plugging in known variables and seeing if the equation is still correct). At first I thought this was just because of the minus, which would become i if I square rooted it. However, I then tried x2 + y2 = 41 where x = 4, y = 5. Simply finding the square root of both sides gave 4 + 5 = 6.4, so I guess you can't do square root when there is addition in the equation at all.
Is there any way to get t by itself here?
Homework Statement
Ok, so I'm making a javascript calculator to find the travel time if you accelerate at 1 g. The point of this was to help me learn JS and a bit of physics and math. The possible variables are:
a - acceleration
T - ship time
t - Earth time
d - distance
v - final speed
I wanted to make it so that you could provide whichever variable you knew and it would solve for the rest. So far this has gone well, but I'm having trouble getting the other variables from velocity alone.
Homework Equations
I've been using the equations from this page:
http://math.ucr.edu/home/baez/physics/Relativity/SR/rocket.html
In particular I was trying to start with this one and solve for t:
[tex]v = \frac{at}{\sqrt{1 + (at/c)^{2}}}[/tex]
The Attempt at a Solution
I've spent quite a while trying to solve for t and this is as far as I've gotten:
t2 - c-2t2v2 = a-2v2
I wanted to get rid of all those exponents by finding the square root of both sides, but apparently I can't do this (I've been plugging in known variables and seeing if the equation is still correct). At first I thought this was just because of the minus, which would become i if I square rooted it. However, I then tried x2 + y2 = 41 where x = 4, y = 5. Simply finding the square root of both sides gave 4 + 5 = 6.4, so I guess you can't do square root when there is addition in the equation at all.
Is there any way to get t by itself here?
Last edited by a moderator: