Problem: During a recent campaign for office, a candidate made a tour of a country which we assume lies in a plane. On the first day of the tour he went east, on the second day he went north, on the third day west, on the fourth day south, on the fifth day east, etc. If the candidate went $\frac{n^{2}}{2}$ miles on the $n^{\mbox{th}}_{}$ day of this tour, how many miles was he from his starting point at the end of the $40^{\mbox{th}}_{}$ day?
Solution: After drawing this out, we get a spiral that the candidate is forming as he travels to new destinations. To find the total miles the candidate is away from where he started, we can treat each movement north as an addition to the $y$ displacement and each movement south as a subtraction to the $y$ displacement. Similarly, we can treat each movement east as an addition to the $x$ displacement and each movement west as a subtraction to the $x$ displacement. If $x_f$ and $y_f$ are the final $x,y$ displacements respectively, then we know that $dist = \sqrt{x_f^2 + y_f^2}.$ Furthermore, we have that $x_f = \left( -\frac{40^2}{2}+\frac{38^2}{2}\right)+ \left( - \frac{36^2}{2}+\frac{34^2}{2}\right) +... +\left( - \frac{4^2}{2}+ \frac{2^2}{2}\right) = -78-70-...-6 = -10\cdot \frac{84}{2} = -420$
and we also know that $x_f = \left( -\frac{39^2}{2}+\frac{37^2}{2}\right)+ \left( - \frac{35^2}{2}+\frac{33^2}{2}\right) +... +\left( - \frac{3^2}{2}+ \frac{1^2}{2}\right) = -76-68-...-4 = -10 \cdot \frac{80}{2} = -400$
So in total, we get that $dist = \sqrt{420^2+400^2} = 10\sqrt{42^2+40^2} = 580$