Solution (source code)

= Solution

The likelihood is
$$
p(d\mid x)=\frac1{\sqrt{2\pi\sigma^2}}
\exp\left[-\frac{(d-x)^2}{2\sigma^2}\right].
$$
Using the conditional independence $d\perp m\mid x$ and the joint prior $p(x,m)$,
$$
p(m\mid d)=
\frac{\int p(d\mid x)p(x,m)\,dx}
{\iint p(d\mid x)p(x,m)\,dx\,dm},
$$
and
$$
\mathbb E[m\mid d]=
\frac{\iint m,p(d\mid x)p(x,m)\,dx\,dm}
{\iint p(d\mid x)p(x,m)\,dx\,dm}.
$$