# Gil-Palaez Inversion Formula in Black Scholes world

I am trying to calculate numerically the price of a plain vanilla call through Fourier Transform, by applying the Gil-Pelaez formula. More precisely, we have that

$$C(K) = S_0 \Pi_1 - K e^{-r T} \Pi_2,$$

where

\begin{eqnarray} \Pi_1 & = & \frac{1}{2} + \frac{1}{\pi} \int_0^\infty \mathfrak{Re} \left\{ \frac{\phi(u-i) e^{-\mathrm{i} u \ln(K)}}{\phi(-\mathrm{i}) \mathrm{i}u} \right\} \mathrm{d}u,\\ \Pi_2 & = & \frac{1}{2} + \frac{1}{\pi} \int_0^\infty \mathfrak{Re} \left\{ \frac{\phi(u) e^{-\mathrm{i} u \ln (K)}}{\mathrm{i} u} \right\} \mathrm{d}u \end{eqnarray}

and where

$$\phi(u) = \exp \left\{ \mathrm{i} \left( \ln \left( S_0 \right) + \left( r - \frac{1}{2} \sigma^2 \right) T \right) u - \frac{1}{2} \sigma^2 u^2 T \right\}.$$

Although I do the algebra, it seems that that the integrands I get inside $\Pi_1$ and $\Pi_2$ are the same, something which is obviously false. Although I know it's a stupid question, could you please help me on which are the real parts of the integrands? You help is highly appreciated since I have tried calculating them several times.

• Could you please use latex? – Richard Oct 12 '15 at 18:18