Twin paradox in accelerating frames of reference In Brian Cox’s book "Why $E=mc^2$” I read an example about a twin acceleration from earth with "g" for 10 years, then deceleration with g for 10 years, then accelerating and deceleration the same way to get back to earth. Total of 40 years always with "g".
According to the book this 40 years of travel was 59000 years on earth.
Considering Einstein's equivalence  principle of acceleration and gravitation, should there sill be an age difference between the twin after 40 years?
What am I missing? 
 A: 
Considering Einstein's equivalence principle of acceleration and gravitation, should there sill be an age difference between the twin after 40 years? What am I missing?

You are missing two important things regarding the equivalence principle and gravitational time dilation. 
The first is that the equivalence principle only applies locally. It does not apply over regions of spacetime that are large enough for tidal gravity (curves spacetime) to be measurable. In particular, for this problem it will only apply locally for the rocket twin and not over the whole scenario. 
The second is that gravitational time dilation is not related to the gravitational acceleration but rather it is related to gravitational potential. So the fact that they have similar gravitational acceleration does not imply that they should have similar gravitational time dilation. 
A: The local constrain of the equivalence principle requires a small $\Delta X^{\mu}$. And that includes $X^0$. 40 years is not a small period of time.
The fact that frames with the same $g$ have different clock rates can also be seen if we take spherical celestial bodies with different densities. 
For the same $g = \frac{GM}{R^2}$, increasing $M$ results in decreasing the Schwartzschild factor $\left(1 - \frac{2GM}{c^2R}\right)$.
Staying on the "surface" of a large and massive spherical dust, results in aging slower than on the surface of a rocky planet, for the same $g$.   
