Total time taken for an accelerating frame in special relativity How does one derive the equation for the total time traveled in a constantly accelerating frame? I found some help at this question: Special Relativity and Constant Acceleration
But the information pertains to the measured time at a specific time along the way. I have taken the scenario from the question above, but am asking different questions:  
A rocket is constantly accelerating at 1g to reach Andromeda (2.4 x 10^22 m) . Assume travel is in only one direction and no external forces act on the rocket, like gravity. The frames are in standard configuration.
Halfway there, it begins to constantly decelerate at 1 g and the change takes no time or energy.
Find:
- the maximum speed
- the total time of the journey measured in the rocket's frame
- the total time of the journey measured by someone on Earth
I have tried to do some work on the matter and have derived the following equations so far:
$$  
v_i ' = c^2 - \sqrt{\frac{(c^2-v_i^2)}{\gamma^2(1-v_x\frac{v}{c^2})^2}}
$$
Where $v_i'$ is the instantaneous velocity as measured by the rocket, $v_i$ is the instantaneous velocity as measured by Earth, and $v_x$ is the velocity of travel along the x-axis as measured from Earth (the rocket travels in a straight line along the x-axis). And I have:
$$
\frac{\gamma(v_i')}{\gamma(v_i)}= \gamma(v)\frac{c^2-v_xv}{c^2}
$$
Where $\gamma$ is the Lorentz factor as a function. I am completely stuck here however! I do not know how to move forward with deriving the necessary equations to answer the questions above. I assume it has something to do with the rapidity functions, but I am not entirely well-versed in their use. I do have a working knowledge of calculus, which I assume is necessary.
 A: If $g$ is the constant proper acceleration of the rocket, and $t$ the coordinate time measured by an observer on Earth, then the velocity of the rocket in the Earth frame is (during the first half of the trip)
$$
v = \frac{gt}{\sqrt{1 + g^2t^2/c^2}},
$$
assuming that the initial velocity is zero. See this post for a derivation, and this post for more info about proper acceleration. Integrating this gives us the travelled distance $x$, measured by an observer on Earth:
$$
x = \frac{c^2}{g}\left(\sqrt{1 + g^2t^2/c^2}-1\right).
$$
Insert $x=D/2$ and you find the time needed for half the trip, and the velocity at that time.
The corresponding proper time $\tau$ on board the rocket is found by integrating
$$
\text{d}\tau = \sqrt{1 - v^2/c^2}\text{d}t = \frac{\text{d}t}{\sqrt{1 + g^2t^2/c^2}},
$$
so that, for the first half of the trip,
$$
\tau = \frac{c}{g}\ln\left(gt/c + \sqrt{1 + g^2t^2/c^2}\right).
$$
The equations need some adjustments for the second half of the trip (see also the first link), but the situation is symmetrical.
A: Note. The following holds if the acceleration to which the question refers is acceleration as measured by an inertial observer external to the rocket.
Let $d$ denote the distance to Andromeda.  Note that as measured in an inertial frame $S$, the rocket is accelerating at $1 \, g$ for a distance $d/2$, and then decelerating at $1\, g$ for the same distance $d/2$.  Determining the maximum speed and travel time $T$ as measured in $S$ is just a regular kinematics problem.  Let's assume this has been done.  The velocity as a function of time as measured in $S$ will be
\begin{align}
  v(t) =\bigg\{
\begin{array}{cc}
  gt, & 0<t<T/2\\
  -gt,& T/2<t<T
\end{array}
\end{align}
As mentioned in my answer to the your question Special Relativity and Constant Acceleration that you linked above, we can calculate the travel time $T'$ as measured by an observer in the rocket frame $S'$ via the following integral:
\begin{align}
  T' = \int_0^T \frac{dt}{\gamma} = \int_0^{T/2}dt\left(1-\frac{(gt)^2}{c^2}\right)^{1/2}+\int_{T/2}^{T}dt\left(1-\frac{(-gt)^2}{c^2}\right)^{1/2}
\end{align}
I'll let you take it from here.
