TITLE: Using Ito Formula to compute $E[cos(B_t)]$
QUESTION [0 upvotes]: During the semester my prof (for a basic Mathematical Finance course) gave us some more challenging type questions to think about if we plan to take future courses on the topic.  One of the questions he told us to look at was $E[cos(B_t)]$. 
He said to do this by using Ito's formula to compute this expectation.  Where would one even begin a question like this? I believe this would fall into the Ito formula stating that 
$df(B_t) = f'(B_t)dB_t + {1\over 2}f''(B_t)dt$
Would that be correct or no?  How would any of you go about solving this question? Does Euler's formula come into play here somewhere?

REPLY [0 votes]: $B_t$ is $N(0,t)$.  So
$$ g(t) := E(\cos(B_t)) = \int_{-\infty}^\infty \frac1{\sqrt{2\pi t}} \cos(x) \exp(-x^2/2t) \, dx.$$
How to compute the integral?  From Ito's formula
$$ g'(t) = -\tfrac12 g(t), \qquad g(0) = 1 .$$
{"set_name": "stack_exchange", "score": 0, "question_id": 610922}