compute_expectations.BM function

Compute the expected states of a BM