I would like to understand the derivation that $$\phi(S)=\frac{\partial^2C}{\partial K^2}$$ from $$C(K) = \int_{0}^{\infty} max(S-K,0)\phi(S)dS$$ where $\phi$ is a probability density function.
(This equality is relevant for example to estimate transition densities for a European call from the prices of call options.)
Edit: the following does not work since the derivative of $max(S-K,0)$ is not continuous:
I see that I get this result by differentiating two times with respect to K, but only if I can exchange the differential operator with the integral operator ds:
$$\frac{\partial C}{\partial K}(\int_{0}^{\infty} max(S-K,0)\phi(S)dS$$ $$=\int_{0}^{\infty}\phi(S)\frac{\partial}{\partial K}( max(S-K,0))dS$$ $$=\int_{0}^{\infty}\phi(S)(-1)dS\quad\text{if } K<S, \quad 0 \text{ otherwise}$$ If I can do this, the desired result appears, since the dirac function has derivative 1 exactly at $K=S$.