# Numerical Solutions for PIDE

I want to solve an exotic options of PIDE by Numerical Methods.I just focus on the integral part of PIDE and want to underestand some tips on numerical solution of how to numerically solve it. Exactly I just consider $$\int_{-\infty}^{\infty}(F(e^yS_{t^{-}},t)-F(S_{t^{-}},t))k(y)dy$$ I am going to solve numerically for the given Lévy density $$k(y)=\frac{e^{-\lambda_p y}}{v\,y}1_{y>0}+\frac{e^{-\lambda_n |y|}}{v\,|y|}1_{y<0}$$ Thanks.

Without loss of generality, we can assume $y>0$.let $x =\ln S_t$ and defining $\tilde{F}(x, t)=F(S, t)$ we have $$\int_{0}^{\infty}(\,{F}(e^yS_{t^{-}},t)-{F}(S_{t^{-}},t)\,)k(y)\,dy=\int_{0}^{\infty}(\,\tilde F(x+y,t)-\tilde F(x,t)\,)k(y)\,dy$$ Beginning,it is natural to look at the following interval first $$\int_{0}^{\Delta x}(\,\tilde{F}(x+y,t)-\tilde{F}(x,t)\,)\,k(y)dy$$ for some small $\Delta x > 0$. Using Taylor expansion, we can write $\tilde {F} (x + y, t)$ as follows: $$\tilde{F}(x+y,t)=\tilde{F}(x,t)+y\frac{\partial\tilde{F}}{\partial x}(x,t)+\frac{1}{2}y^2\frac{\partial^2\tilde{F}}{\partial x^2}(\xi,t)$$ or equivalently $$\tilde{F}(x+y,t)-\tilde{F}(x,t)=y\frac{\partial\tilde{F}}{\partial x}(x,t)+O(y^2)$$ Substituting and we get \begin{align} &\int_{0}^{\Delta x}(\,\tilde{F}(x+y,t)-\tilde{F}(x,t)\,)\,k(y)dy=\int_{0}^{\Delta x}y\frac{\partial\tilde{F}}{\partial x}(x,t)\,k(y)dy\\ &\\ &\hspace{7.25cm}=\frac{\partial\tilde{F}}{\partial x}(x,t) \int_{0}^{\Delta x}y\,\frac{e^{-\lambda_p y}}{v\,y}1_{y>0}\,dy\\ &\\ &\hspace{7.25cm}=\frac{1}{v}\frac{\partial\tilde{F}}{\partial x}(x,t) \int_{0}^{\Delta x}e^{-\lambda_p y}\,dy\\ &\\ &\hspace{7.25cm}=\frac{1}{v\,\lambda_p}\frac{\partial\tilde{F}}{\partial x}(x,t)(1-e^{-\lambda_p\Delta x}) \\ \end{align} Away from zero, we can look at some arbitrary small subinterval. For $y\in (k\Delta x\,, (k + 1)\Delta x)$, forsome integer k we should evaluate the following integral $$\int_{k\Delta x}^{(k + 1)\Delta x}(\,\tilde{F}(x+y,t)-\tilde{F}(x,t)\,)\,k(y)dy$$ Using linear approximation yields we can write $\tilde{F}(x+y,t)$ on $(k\Delta x \, (k + 1)\Delta x)$ as follow $$\tilde{F}(x+y,t)=\tilde{F}(x+k\Delta x,t)+(y-k\Delta x)\frac{\tilde{F}(x+(k+1)\Delta x,t)-\tilde{F}(x+k\Delta x,t)}{\Delta x}+O(\Delta x^2)$$ Substituting it would yield \begin{align} &\int_{k\Delta x}^{(k + 1)\Delta x}\left[\,\tilde{F}(x+k\Delta x,t)+(y-k\Delta x)\frac{\tilde{F}(x+(k+1)\Delta x,t)-\tilde{F}(x+k\Delta x,t)}{\Delta x}-\tilde{F}(x,t)\,\right]\frac{e^{-\lambda_p y}}{v\,y}1_{y>0}\,dy\\ &=\frac{(1-k)\tilde{F}(x+k\Delta x,t)-\tilde{F}(x,t)-k\tilde{F}(x+(k+1)\Delta x,t)}{v}\times\int_{k\Delta x}^{(k + 1)\Delta x}\frac{e^{-\lambda_py}}{y}dy+\frac{\tilde{F}(x+(k+1)\Delta x,t)-\tilde{F}(x+k\Delta x,t)}{\lambda_p\,v\,\Delta x}(e^{-\lambda_pk\Delta x}-e^{-\lambda_p(k+1)\Delta x}) \end{align} So the only thing you have to do is calculate $$\int_{k\Delta x}^{(k + 1)\Delta x}\frac{e^{-\lambda_py}}{y}dy$$ there are several Methods for fast calculation of it.