How to solve the $\min_x \int_c^d (u-x)^4 e^{-u^2/2} du$ How to solve the following equation 
 \begin{align}
\min_x  \int_c^d (u-x)^4 e^{-u^2/2} du
\end{align}
Observer, that by taking the derivative we get
\begin{align}
 \int_c^d -4(u-x)^3 e^{-u^2/2} du
\end{align} 
So,  if $c=-d$ then the solution is given by 
\begin{align}
x=0
\end{align}
However, what if $d$ and $c$ are any numbers? 

Hint: Denote $p(x)=\int\limits_{c}^{d}{(u-x)^4e^{-u^2/2}du}$
Now expand $(u-x)^4$ and split the integral in several integrals, where $x$ goes out of the integrals as it does not depend on the integration variable $u$. Now you should see that $p(x)$ is a polynomial of degree $4$ in $x$ with coefficients that you will find by computing all integrals. Finally, when you have the polynomial $p(x)$ you compute its global minimum in a standard way, for example by setting $p'(x)=0$ and using the necessary conditions for a local minimum.
