Fun Geometric Series Puzzle
I recently was reminded of a puzzle I solved in college and thought I'd give it a shot again. However, being distanced from college math, I am having a harder time remembering how I arrived at the solution.
The problem is as follows: Imagine you are standing in the middle of an open field. You walk forward 16 feet, turn right and walk 8 feet, turn right and walk 4 feet, and so on. This continues indefinitely. When you finally reach an infinite number of turns, how far will you be from your original starting point (as the crow flies)? Generalized, here is what the problem looks like:
I did manage to find the original solution that I came up with for the problem. However, I did not show my work so the process is lost. After attempting to resolve this without any luck, I thought I would toss this out to the community to solve as a fun puzzle.
For reference, this is what I believe to be the solution:
$$\frac{a}{\sqrt{r^2 + 1}}$$
We can describe this walk in the complex plane. Starting at $z=0$ we add in sequence $$a,-i r a, -r^2 a, ir^3 a,\cdots, (-i r)^k a,\cdots$$ This is simply the geometric series $$\sum_{k=0}^\infty (-i r)^k a = \frac a{1+ir}$$ which is at a distance of $$\left|\frac a{1+ir}\right|=\frac a{\sqrt{1+r^2}}$$ from the origin.
Additionally :
An immediate generalization is that if we turn an angle of $\phi$ to the right rather than $\dfrac\pi2$, we have the series $$\sum_{k=0}^\infty a\ (r e^{-i\phi})^k = \frac a{1-r e^{-i\phi}}$$ and thus a displacement of $$\frac a{\sqrt{1-2r\cos\phi+r^2}}$$ from the origin.
The horizontal displacement will be $$L_x=a-r^2a+r^4a-\ldots\;=\frac{a}{1+r^2},$$ and the vertical one $$\;L_y=ra-r^3a+r^5a-\ldots=\frac{ra}{1+r^2}.$$ The result then follows from the Pythagorean theorem: $$L=\sqrt{L_x^2+L_y^2}=\frac{a}{\sqrt{1+r^2}}$$
It is immediately obvious that a transformation consisting of a clockwise rotation of $\pi/2$ radians and a contraction by a factor of $r$ about the limiting endpoint of the path will map the black path to a proper subset of itself; therefore, if we enumerate the vertices starting from the outermost vertex, the red line segment is a subset of a single line passing through all odd vertices, and the endpoint is the intersection of this line with the (perpendicular) line passing through all even vertices. Therefore $d$ satisfies $d^2 + (rd)^2 = a^2$, or $d = a/\sqrt{1+r^2}.$
A symmetry argument not requiring any geometric/infinite series summation.
Consider just one "turnaround": just after he makes an "up" move of $r^3 a$.
He will next make a step of $r^4 a$ to the right, parallel to the first right, as part of the second "turnaround".
He is now at a distance $D_1 = \sqrt{(a-r^2a)^2 + (ra - r^3a)^2} = a(1-r^2)\sqrt{1+r^2}$ from the original point.
Now if for initial step $a$, the total distance moved after infinite "turnarounds" is $f(a)$ then we must have that
$$f(a) = D_1 + f(r^4a) = f(a) + D_1 + r^4f(a) \implies f(a) = \frac{D_1}{1-r^4}$$
This is because if $D$ is the distance for $a$, then $cD$ is the distance for $ca$, and all the "turnaround" points are co-linear.
Thus the distance moved is
$$\frac{a(1-r^2)\sqrt{1+r^2}}{1-r^4} = \frac{a}{\sqrt{1+r^2}} $$