TITLE: The mystik spiral(challenge)
QUESTION [8 upvotes]: Still one of my favorite problems.
Feel free to attempt to solve it.

Start at a 0,0
Travel along the x axis in the positive direction a distance of 1
Turn 90 degrees counterclockwise
go forward 1/2 of the distance of the previous step
Repeat steps 3 and 4 forever.
how far from the origin to you end up?

Bonus points for finding an equation for
1.Start at a 0,0
2.travel along the x axis in the positive direction a distance of A

Turn θ degrees counterclockwise
go forward B times the previous distance walked
Repeat steps 3 and 4 forever.
how far from the origin to you end up?

REPLY [10 votes]: Use complex numbers.
The final position is, supposing $1>B\ge 0$,
$$A+ABe^{i\theta}+AB^2e^{2i\theta}+\cdots$$
$$=A(1+Be^{i\theta}+B^2e^{2i\theta}+\cdots)$$
$$=A\frac{1}{1-Be^{i\theta}}$$
The distance is
$$\left|\frac{A}{1-Be^{i\theta}}\right|=\frac{A}{\sqrt{1-2B\cos\theta+B^2}}$$
For $A=1$, $B=1/2$, $\theta=\pi/2$, the distance is
$$\left|\frac{1}{1-\frac{i}{2}}\right|=\frac{2}{\sqrt{5}}$$