Let $v(x, t) = \mathbb E [f(x + W\_t)]$ with a Brownian motion $W$. Then, Malliavin calculus leads to the sensitivity in $x$:
$$\partial\_x v(x, t) = \frac{1}{t} \mathbb E [ f(x + W\_t) W\_t ].$$
I am interested in $u'(x)$ with $u$ defined by
$$u(x) = \mathbb E \int\_0^T f(x + W\_t) dt$$
for some function $f$. First we can write
$$u'(x) = \int\_0^T \partial\_x v(x, t) dt = \int\_0^T \frac{1}{t} \mathbb E[f(x+W\_t) W\_t] dt$$
whenever the last integral exists.


[Question] What is the sufficient conditions on $f$ to have the $u'(x)$? In particular, when $f$ is not differentiable.


[Discussion] For instance, if $f$ is a constant, then $u'(x) = 0$; if $f$ is an identity, $u'(x) = T$. More generally, if $f'$ exists with polynomial growth, then $u'$ can be computed using the following alternative formula:
$$u'(x) = \mathbb E[ \int\_0^T f'(x+W\_t) dt].$$



Existence of the derivative of functionals of Brownian motion
$\newcommand{\ep}{\varepsilon}\newcommand{\R}{\mathbb R}\newcommand{\vpi}{\varphi}\newcommand{\De}{\Delta}\newcommand{\Om}{\Omega}$The derivative $u'(x)$ exists and the equality
\begin{equation\*}
 u'(x) =\int\_0^T \frac{dt}t\, Ef(x+W\_t)W\_t \tag{1}
\end{equation\*}
holds under very mild restrictions on $f$, just a bit stronger than the restrictions on $f$ needed for $u(x)$ itself to exist.


Indeed, suppose that the function $f\colon\R\to\R$ is Borel-measurable and such that  

\begin{equation\*}
 \int\_0^T dt\, E|f(x+W\_t)|<\infty; \tag{2}
\end{equation\*}
for (2) to hold, it is enough that
\begin{equation\*}
 |f(u)|\le Ce^{au^2}\quad\text{for some real $C$}, \\
 \text{some real $a<\frac1{2T}$, and all real $u$. } \tag{3}
\end{equation\*}
Then, by Fubini's theorem,
\begin{equation\*}
\begin{aligned}
 u(x)&=\int\_0^T dt\,Ef(x + W\_t) \\ 
 &=\int\_0^T dt\int\_\R dz\,f(x+z\sqrt t)\vpi(z) \\ 
 &=\int\_0^T \frac{dt}{\sqrt t}\int\_\R du\,f(u)\vpi\Big(\frac{x-u}{\sqrt t}\Big), 
\end{aligned}
\tag{4}
\end{equation\*}
where $\vpi$ is the standard normal density.


Let us show that **condition (3) is sufficient for (1)** as well:


For all real $s$, let
\begin{equation\*}
 \psi(s):=|\vpi'(s)|=|s|\vpi(s). 
\end{equation\*}


Take any real $x$, any $\ep\in(0,T/2]$, and any
\begin{equation\*}
 b\in\Big(a,\frac1{2T}\Big). \tag{4.5}
\end{equation\*}
Then
\begin{equation\*}
\begin{aligned}
\max\Big\{\psi\Big(\frac{y-u}{\sqrt t}\Big)\colon \ep\le t\le T,|y-x|\le1\Big\} 
 &\le C\_{\ep,x,b,T}e^{-bu^2}, 
\end{aligned}
\tag{5}
\end{equation\*}
where $C\_{\ep,x,b,T}$ is a real number depending only on $\ep,x,b,T$, but not on $(t,u)$. Also,
\begin{equation\*}
 \begin{aligned}
&\int\_\ep^T \frac{dt}{\sqrt t}\int\_\R du\,
\Big|\partial\_x\Big(f(u) \vpi\Big(\frac{x-u}{\sqrt t}\Big)\Big| \\ 
&=\int\_\ep^T \frac{dt}t\int\_\R du\,|f(u)|
 \psi\Big(\frac{x-u}{\sqrt t}\Big) 
\end{aligned} 
\tag{6}
\end{equation\*}
and
\begin{align\*}
\int\_\ep^T \frac{dt}t\int\_\R du\,|f(u)|e^{-bu^2}<\infty, \tag{7}
\end{align\*}
by (3) and (4.5).
Moreover, for $y\in[x-1,x+1]$, in view of (3) and the condition $\ep\in(0,T/2]$,
\begin{equation\*}
\begin{aligned}
&\int\_0^\ep \frac{dt}{\sqrt t}\int\_\R du\,
\Big|\partial\_y\Big(f(u) \vpi\Big(\frac{y-u}{\sqrt t}\Big)\Big| \\ 
&=\int\_0^\ep \frac{dt}{\sqrt t}\,\int\_\R dz\,\big|f(y+z\sqrt t)\big|\,|z|\,\vpi(z) \\ 
&\le CC\_{x,T}\int\_0^\ep \frac{dt}{\sqrt t}\,\int\_\R dz\,e^{z^2/3}\vpi(z) \to0
\end{aligned} 
\tag{8}
\end{equation\*}
as $\ep\downarrow0$, where $C\_{x,T}$ is a real number depending only on $x,T$, but not on $\ep$.


Now we can write
\begin{equation\*}
\begin{aligned}
& \int\_0^T \frac{dt}t\, Ef(x+W\_t)W\_t \\ 
 =&\int\_0^T \frac{dt}t\,\int\_\R dz\,f(x+z\sqrt t)z\sqrt t\,\vpi(z) \\ 
 =&\int\_0^T \frac{dt}t\int\_\R du\,f(u)
 \frac{u-x}{\sqrt t}\vpi\Big(\frac{x-u}{\sqrt t}\Big) \\ 
 =&\int\_0^T \frac{dt}{\sqrt t}\int\_\R du\,
 \partial\_x\Big(f(u)
 \vpi\Big(\frac{x-u}{\sqrt t}\Big)\Big) \\ 
 =& \partial\_x\int\_0^T dt\int\_\R du\,f(u)
\frac1{\sqrt t}\vpi\Big(\frac{x-u}{\sqrt t}\Big) \\ 
 =& \partial\_x\int\_0^T dt\, Ef(x+W\_t)=u'(x); 
\end{aligned}
 \tag{9}
\end{equation\*}
the interchange of the differentiation and integration (the fourth equality in display (9)) is possible by [Lemma 2.3](https://projecteuclid.org/journals/annals-of-probability/volume-43/issue-5/Exact-Rosenthal-type-bounds/10.1214/14-AOP942.full), in view of (5), (6), (7), and (8). The penultimate equality in (9) holds by (4).


Thus, it is proved that (3) is sufficient for (1).


