I want to calculate the following:
$$ \dfrac{\partial}{\partial x} \int_{\tilde{\tau}=t}^{\infty} \tilde{\tau}\dfrac{1}{\sqrt{2 \pi}\sigma}e^{-\frac{(\tilde{\tau}-x)^2}{2\sigma^2}} d \tilde{\tau} $$
where $t$ is a constant and $\tilde{\tau}$ is a random variable with mean $x$ and variance $\sigma^2$. I have that $\tilde{\tau} = x + \sigma \varepsilon$, so I use change of variables and redefine the integral with $u = \dfrac{\tilde{\tau}-x}{\sigma}$
$$ \dfrac{\partial}{\partial x} \int_{\tilde{\tau}=t}^{\infty} (u \sigma + x)\dfrac{1}{\sqrt{2 \pi}}e^{-\frac{u^2}{2}} d u $$
I break the derivative of the integral into two parts:
$$ \dfrac{\partial}{\partial x} \left( \sigma \int_{u \sigma + x=t}^{\infty}u\dfrac{1}{\sqrt{2 \pi}}e^{-\frac{u^2}{2}} d u + x\int_{u \sigma + x=t}^{\infty} \dfrac{1}{\sqrt{2 \pi}}e^{-\frac{u^2}{2}} d u \right)$$
$$ \dfrac{\partial}{\partial x} \sigma \int_{u \sigma + x=t}^{\infty}u\dfrac{1}{\sqrt{2 \pi}}e^{-\frac{u^2}{2}} d u + \dfrac{\partial}{\partial x} x(1-F(t)) $$
$$ \sigma \dfrac{\partial}{\partial x} \int_{u \sigma + x=t}^{\infty}u\dfrac{1}{\sqrt{2 \pi}}e^{-\frac{u^2}{2}} d u + 1-F(t) $$
According to a colleague the first term will vanish. The reason is that apparently after doing the substitution of variable I now have $u$ as a dummy variable and that taking the derivative with respect to $x$ will be zero. But I defined $u=\dfrac{\tilde{\tau}-x}{\sigma}$. How can the derivative with respect to x be zero?
If your bounds were constant your coworker would be correct (the integral is essentially $\int_a^b f(u)\mathrm{d}u$, which won't have dependence on $x$ for constant $a,b$.). They aren't constant though. We have the lower bound is $u\sigma+x = t$ for $t,\sigma$ constant. So, we can rewrite this as $u = \frac{t-x}{\sigma}$. So, your lower bound is a function of $x$, so the derivative isn't necessarily $0$.
As an easy example of how variable bounds can lead to nonzero derivative, consider: $$F(x) = \int_x^\infty e^{-t}\mathrm{d}t = e^{-x}$$ We get that $\frac{\partial}{\partial x}F(x) = -e^{-x}\neq 0$, with reasoning similar to why your derivative is likely nonzero.