If you know a bit of special relativity, probably you've heard of the twin paradox. I would like to know: what happens if we take acceleration into account in the paradox. Usually we consider an instantaneous change of velocity for the moving twin (before he was moving at, say, $\frac{c}{2}$, when coming back, he's suddenly moving at $-\frac{c}{2}$...)
My work on the problem:
Let Alice (the first twin) be still in an IS (coordinates $t,x,y,z$), and Bob (they're heterozygotes, obviously!) be moving. The coordinates system KS' of Bob ($t',x',y',z'$) is not inertial and satisfies: $$\left\{\begin{array}{l}t=t'\\x=x'+\sin(t')\\y=y'\\z=z'\end{array}\right.$$ so that Bob (located at the origin of KS') moves away from Alice for $0\le t\le\frac{\pi}{2}$, and comes back for $\frac{\pi}{2}\le t\le\pi$. We have: $$\begin{array}{l}dt = dt'\\dx = \cos(t')dt'+dx'\\dy=dy'\\dz=dz'\end{array}$$ and thus: $$\begin{array}{ll}ds^2 & = dt^2-dx^2-dy^2-dz^2 =\\ & =(1-\cos^2(t'))dt'^2-2\cos(t')dt'dx'-dx'^2-dy'^2-dz'^2\end{array}$$ By fixing a clock at constant $x',y',z'$ in KS' and looking at the proper time, we get: $$d\tau = \sqrt{1-\cos^2(t')}dt' = \sqrt{1-\cos^2(t)}dt = \sin(t)dt$$ (where we used $t=t'$ and $dt=dt'$). Integrating from $t=0$ to $t=\pi$ (the time Bob takes to go away and come back) we get the time a clock in KS' will mark when Bob is back home (where the clock marked $0$ when he went away): $$\int_0^\pi\sin(t)dt = 2$$ which looks weird... (Note: I expected this to give $\pi$, so that there would have been no paradox at all.) Can someone spot eventual mistakes I made?
Note: I followed the same procedure I found in these lecture notes at pages 18-19.