The key is to pair off terms to cancel the complex exponential. By combining Euler's formula with the trig rules that , you can see that . Then you will be left with a summation of a constant.
I saw the 42 answer, but passed it off as that Hitchhiker's Guide to the Galaxy joke! I solved it on a spreadsheet, since it was so simple, and was pleasantly surprised that (1) the answer was actually 42, and (2) I still knew how to do this.
I've used Calculus twice i real life; once to verify to the Nuclear regulatory Commission some pour-and-measure dipstick volume marks on a cylindrical transformer fluid tank unevenly buried on its side; and one to determine the amount of fill dirt my sister needed to turn her above-ground basement into an underground one (max slope, peferred footprint, and size of rectangular cube NOT filled).
Uncle Fester, Maker & Fiction Science Writer
The Misadventures of the Electric Detention
The Revenge of the Electric Detention
The Curse of the Electric Detention
>> Three full-length adventures, 26 short stories and counting!