# Malliavin Derivative with Mathematica is it possible?

**URL:** <https://community.wolfram.com/t/malliavin-derivative-with-mathematica-is-it-possible/3897>\
**Category:** Questions\
**Tags:** packages-and-paclets\
**Created:** [November 5, 2014, 2:58am UTC](https://community.wolfram.com/t/malliavin-derivative-with-mathematica-is-it-possible/3897 "2014-11-05T02:58:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![labairabdelkader](https://avatars.discourse-cdn.com/v4/letter/l/7ba0ec/32.png) [@labairabdelkader](https://community.wolfram.com/u/labairabdelkader)\
**Post date:** [November 5, 2014, 2:58am UTC](https://community.wolfram.com/t/malliavin-derivative-with-mathematica-is-it-possible/3897/1 "2014-11-05T02:58:50Z")

</div>

Is it possible to define a [Malliavin calculus](http://en.wikipedia.org/wiki/Malliavin_calculus) with \*Mathematica?

Consider a random variables on the Wiener-space \Omega=\mathcal{C}([0,1]) of the form

F=F(\omega)=\displaystyle\int\_{0}^{T}h\_{t}dW\_{t}

for some deterministic h(.) in L^{2}[0,T].  
Here, \omega is a path in the Wiener-space, \omega \in \Omega.

We define the Malliavin derivative by

DF=h,\text{ and }D\_{t}F=h\_{t}.

Let say `MalliavinDer` is this derivative. We have the following rules

1. `MalliavinDer[F_ + G_] := MalliavinDer[F]+MalliavinDer[G]`;

2. `MalliavinDer[F_G_]:=MalliavinDer[F]G+ MalliavinDer[G]F`

3. `MalliavinDer[f(F)]:=f'[F]MalliavinDer[F]`.

On the other hand, we have for example:

1. `MalliavinDer[\int_0^T h(t)dWt] := h(t)`

2. `MalliavinDer[W_s] := Piecewise[{{1, s <t}, {0, s >t}}]`

3. `MalliavinDer[f(W_s] := f'[W_s])Piecewise[{{1, s <t}, {0, s >t}}]`
