chinglu1998 said:
Rest frame
t = r/c.
Moving frame.
Length contraction
ct' = r/γ + (-vt').
t' = r/(γ(c+v))
This is not time dilation. But if do 2 way, can prove time dilation.
This is only comparing what each frame views of their own clocks only, what the rest frame views of the rest frame's own clocks and what the moving frame views of the moving frame's own clocks, so is not the time dilation. The time dilation is what an observer in one frame views of the time passing upon a clock in
the other frame as compared to the time that passes upon a clock in the observer's own frame.
Let's place clocks A and B at either end of the length r. According to the rest frame, between the two events of the light pulse leaving clock A and arriving at clock B, we have = tB - tA = Δt = r / c, as you had. From the perspective of the moving frame, with clock B traveling behind clock A, we have c (tB' - tA') = c Δt' = r/γ - v Δt', Δt' = (r/γ) / (c+v), also as you had. But these are just the times that each frame sees passing between the events according to their own clocks.
To find what the moving frame measures passing between the rest frame's clocks in terms of the time dilation involved, we must also include simultaneity of relativity. The moving frame says that with clock B behind clock A, clock B is set a time of tl = r v / c^2 ahead of clock A. According to the moving frame, then, the light pulse leaves clock A when clock A reads TA = 0 and clock B reads TB = r v / c^2. The light pulse travels from clock A to clock B in a time of Δt' = (r/γ) / (c+v) according to the moving frame as you have shown. During this time, the moving frame observes clocks A and B to be time dilating by some factor z, so that when the light pulse reaches B, only z Δt' has passed upon each of the rest frame's clocks according to the moving frame, and the rest frame's clocks now read TA' = z Δt' and TB' = z Δt' + r v / c^2.
The moving frame, then, says that the difference in readings between the rest frame's clocks when the pulse departs clock A and arrives at clock B is TB' - TA = z Δt' + r v / c^2. Observers in all frames must agree with this difference in readings upon the clocks for each event since each clock coincides in the same place as the event. The rest frame says that the difference between the readings upon the rest frame's own clocks for the events is TB - TA = r / c. So since the moving frame must agree with this same difference in readings between the same two clocks for the same two events, then
TB' - TA = tB - tA
z Δt' + r v / c^2 = r / c, where Δt' = (r / γ) / (c + v), so
z (r / γ) / (c + v) + r v / c^2 = r / c, and dividing out r,
z (1 / γ) / (c + v) + v / c^2 = 1 / c
z (1 / γ) / (c + v ) = 1 / c - v / c^2
z = γ (c + v) (1 / c - v / c^2)
= γ (c + v) (c - v) / c^2
= γ (1 - (v / c)^2), and since the length contraction is r / γ = sqrt(1 - (v / c)^2) r,
then γ = 1 / sqrt(1 - (v / c)^2) and
z = (1 - (v / c)^2) / sqrt(1 - (v / c)^2)
= sqrt(1 - (v / c)^2) = 1 / γ
z is the time dilation that the moving observer measures passing upon each of the rest frame's clocks as compared to the moving observer's own clocks, which is 1 / γ as it should be, even with the light pulse traveling only one way.