I have a question regarding an equation from the first chapter in "Financial Calculus: An Introduction to Derivative Pricing" by Martin Baxter and Andrew Rennie.
The background is the computation of an expected value of a stock $\mathbb{E} (S_t)$, which in the setup described is nothing else than $\mathbb{E} (S_0 \exp(X))$ (continuously compounded). X is assumed to follow a normal distribution with $\mu$ and $\sigma$.
Now the author on recalls the "law of the unconscious statistician", which states $\mathbb{E}(h(x)) = \int_{-\infty}^{\infty} h(x) \dot f(x) dx$. So far so good.
The problem lies in the combination of this law with the fact that $X$ follows a normal distribution with density $ f(x) = \frac{1}{\sqrt{2 \cdot \pi \cdot \sigma^2}} \cdot \exp(\frac{-(x - \mu)^2}{2 \cdot \sigma^2})$.
Now the expectation of the stock value derived out of the "law" is stated as $\mathbb{E} (S_t) = S_0 \cdot \exp(\mu + \frac{1}{2}\sigma^2).$
How can we deduce that out of the "law" and the integral? If I compute stuff inside the integral, I don't get anywhere. Undergrad here and my first question, would highly appreciate if you could tell me the trick applied here.
Grüße aus Deutschland.