We consider random variables of the form F=f(V1, …, Vn), where f is a smooth function and Vi, i∈ℕ, are random variables with absolutely continuous law pi(y) dy. We assume that pi, i=1, …, n, are piecewise differentiable and we develop a differential calculus of Malliavin type based on ∂lnpi. This allows us to establish an integration by parts formula E(∂iϕ(F)G)=E(ϕ(F)Hi(F, G)), where Hi(F, G) is a random variable constructed using the differential operators acting on F and G. We use this formula in order to give numerical algorithms for sensitivity computations in a model driven by a Lévy process.