Answer:
The problem is amenable to some simple complex number analysis (you have to work in radian measure, note that 45∘=π4).
Each step can be characterised as a vector in the complex plane. The first step is 1=1ei0, the second is 12eiπ4, and the nth step is 1nei(n−1)π4. The final position is the infinite sum of all of these complex numbers.
Let z=eiπ4.
Then define a series sum S(z)=1+12z+13z2+14z3+...
Note that zS(z)=z+12z2+13z3+14z4+...
And now observe: (zS(z))′=1+z+z2+z3+z4+...=11−z, where convergence is assured for complex |z|<1.
By integrating and rearranging, we find, S(z)=−1zln(1−z). (The constant of integration is easily shown to be zero).
Now find |S(eiπ4)|, which is the distance of the final position of the ant from the origin.
|S(eiπ4)|=|−e−iπ4ln(1−eiπ4)|
Since |z1z2|=|z1||z2|, the above is equal to |−e−iπ4||ln(1−eiπ4)|=|ln(1−eiπ4)|
(since |−e−iπ4|=1)
To find |ln(1−eiπ4)|, we first express 1−eiπ4 in the form reiθ.
1−eiπ4=1−cosπ4−isinπ4
Now r=(1−cosπ4)2+(sinπ4)2−−−−−−−−−−−−−−−−−−√=2−2cosπ4−−−−−−−−−√=2−2–√−−−−−−√
and θ=arctansinπ41−cosπ4=arctan(2–√+1)
and ln(reiθ)=lnr+iθ, giving:
|ln(1−eiπ4)|=|12ln(2−2–√)+iarctan(2–√+1)|=[arctan(2–√+1)]2+14[ln(2−2–√)]2−−−−−−−−−−−−−−−−−−−−−−−−−−−−√=1.20806...
Explanation: