Introduction

The purpose of this article is to put forward some analytical and numerical solutions to solve the Itô stochastic differential equation (SDE):

$$\begin{aligned} {\left\{ \begin{array}{ll}\hbox {d}X(t)=\mathcal{A}(X(t),t)\hbox {d}t+\mathcal {B}(X(t),t)\hbox {d}W_{t},\\ X(0)=X_0,\end{array}\right. } \end{aligned}$$
(1)

where \(W(t)\) is a Wiener process and triple \((\Omega , \mathcal {F} , \mathbb {P})\) is a probability space under some conditions and special relations between drift and volatility.

Both the drift vector \(\mathcal {A} : \mathbb {R}\times [0,T]\longrightarrow \mathbb {R}\) and the diffusion matrix \(a:= \mathcal {B}\mathcal {B}^{T} : \mathbb {R}\times [0,T]\longrightarrow \mathbb {R}\) are considered Borel measurable and locally bounded functions. It is assumed that \(X_{0}\) is a non-random vector. As usual, \(\mathcal {A}\) and \(\mathcal {B}\) are globally Lipschitz in \(\mathbb {R}\) that is:

$$\begin{aligned} |\mathcal {A}(X,t)-\mathcal {A}(Y,t)|+|\mathcal {B}(X,t)-\mathcal {B}(Y,t)|\le D|X-Y|,\quad X,Y\in \mathbb {R}\quad \hbox {and}\quad t\in [0,T], \end{aligned}$$

and result in the linear growth condition:

$$\begin{aligned} |\mathcal {A}(X,t)|+|\mathcal {B}(X,t)|\le C(1+|X|). \end{aligned}$$

These conditions guarantee (see [1, 2]) the Eq. (1) has a unique \(t\)-continuous solution adapted to the filtration \({{\mathcal {F}}_{t}}{t\ge 0}\) generated by \(W(t)\) and

$$\begin{aligned} E\left[ \int _{0}^{T}|X(s)|^2\,\hbox {d}s\right] <\infty . \end{aligned}$$
(2)

It is generally accepted that, analytical solutions of partial and ordinary differential equations are so important particularly in physics and engineering, whereas most of them do not have an exact solution and even a limited number of these equations, (e.g., in classical form), have implicit solutions. Analytical methods and solutions, especially in stochastic differential equations, could be excessive fundamental in some cases therefore we draw to take a comparison and analyze computation error between them and different numerical methods. Numerous numerical methods can be applied to solve stochastic differential equations like Monte Carlo simulation method, finite elements and finite differences [2, 3]. On the other hand, due to the importance of Martingale processes and finding their representation according to Martingale representation theorem, it is struggled to express arbitrary stochastic processes as a function of Martingale processes and found numerical methods so as to solve drift-free SDEs [4].

In this paper, we resolve to represent analytical methods for stochastic differential equations, specially reputed and famous equations in pricing and investment rate models, based on Martingale processes with various examples about them which we have found in a couple of papers like [2, 57]. There are two main reasons for this approach. Firstly, the each solutions of these kind of equations are Martingale processes or analytic function of Martingale Processes. Thus, due to drift-free property, it will be caused computational error less than numerical computations with existing classic methods. Secondly, for each Martingale process (especially differentiable process), there exists a spectral expansion of two-dimensional Hermite polynomials with constant coefficients [8]. Therefore, it could be made higher the strong order of convergence with increasing the number of polynomials in this expansion. Equations are just obtained with diffusion part or drift free, by making Martingale process from other process. This method can be done by Itô product formula on initial process and an appropriate Martingale process. Another suitable method to convert SDEs into ODEs that we try is to omit the diffusion part of the stochastic equation.

This article is organized as follows. In Sect. 2, it is verified the making of Martingales processes by exponential Martingale process. In Sect. 3, we solve equations as a function of Martingales with prominent analytical solution, by applying change of appropriate variables method on drift-free SDEs. In Sect. 5, some analytical and numerical examples of expressed methods are demonstrated. Finally, the conclusions and remarks are brought in last section.

Change of measure and Martingale process

In this section under some conditions, we intend to make a Martingale process from a random one in \(\mathbb {L}^2(\mathbb {R}\times [0,T])\), where \(T\) is called maturity time. The exponential Martingale process associated with \(\lambda (t)\) is defined as follows:

$$\begin{aligned} \mathcal {Z}_t^{\lambda }=\exp \left( \int _0^t\lambda (s)\,\hbox {d}W_s-\frac{1}{2}\int _0^t\lambda ^2(s)\,\hbox {d}s\right) . \end{aligned}$$
(3)

It can be indicated by Itô formula that \(\mathcal {Z}_t^{\lambda }\) is a Martingale due to the drift-free property:

$$\begin{aligned} \hbox {d}\mathcal {Z}_t^{\lambda }=\lambda \mathcal {Z}_t^{\lambda } \hbox {d}W_{t},\quad \mathcal {Z}_t^{\lambda }(0)=1. \end{aligned}$$
(4)

Theorem 1

Suppose that stochastic processes \(X_{t}\) verify in differential equation:

$$\begin{aligned} \mathrm{d}X_{t}=\mu (X_{t},t)\mathrm{d}t+\sigma (X_{t},t) \mathrm{d}W_{t}, \end{aligned}$$
(5)

and let \(\lambda (t):=-\mu (X_{t},t)/\sigma (X_{t},t).\) Therefore, \(X\mathcal {Z}_t^{\lambda }\) is a Martingale process.

Proof

With attention to real function \(\lambda (t)\), we have:

$$\begin{aligned}&{\left\{ \begin{array}{ll}\hbox {d}X=\mu (X,t) \hbox {d}t+\sigma (X,t) \hbox {d}W_{t}=-\lambda (t)\sigma (X,t) \hbox {d}t+\sigma (X,t)\hbox {d}W_{t},\\ \hbox {d}\mathcal {Z}_t^{\lambda }=\mathcal {Z}_t^{\lambda }\lambda \hbox {d}W_{t}.\end{array}\right. } \end{aligned}$$

By utilizing Itô product formula, we get:

$$\begin{aligned} \hbox {d}(X\mathcal {Z}_t^{\lambda })&=X\hbox {d}(\mathcal {Z}_t^{\lambda })+\mathcal {Z}_t^{\lambda }\hbox {d}X+\hbox {d}X\hbox {d}(\mathcal {Z}_t^{\lambda })\\&=\lambda X\mathcal {Z}_t^{\lambda }\hbox {d}W_{t}+\mu (X,t) \mathcal {Z}_t^{\lambda }\hbox {d}t+\sigma (X,t)\mathcal {Z}_t^{\lambda }\hbox {d}W_{t}+\lambda \sigma (X,t) \mathcal {Z}_t^{\lambda }\hbox {d}t. \end{aligned}$$

According to theorem assumption, we obtain:

$$\begin{aligned} \hbox {d}(X\mathcal {Z}_t^{\lambda })=\mathcal {Z}_t^{\lambda }(X\lambda +\sigma (X,t))\hbox {d}W_{t}. \end{aligned}$$
(6)

It emphasizes that \(X\mathcal {Z}_t^{\lambda }\) is a \(P\)-Martingale. \(\square \)

Therefore, \(\lambda (t)=\frac{-\mu (X,t)}{\sigma (X,t)}\) is the sufficient condition for following SDEs equivalence:

$$\begin{aligned} \hbox {d}X=\mu (X,t)\hbox {d}t+\sigma (X,t)\hbox {d}W_{t} \Leftrightarrow \hbox {d}(X\mathcal {Z}_t^{\lambda })=\mathcal {Z}_t^{\lambda }(X\lambda (t)+\sigma (X,t))\hbox {d}W_{t}. \end{aligned}$$
(7)

Consequently, by solving the obtained equation in Eq. (6), we obtain the following result when \(\mathcal {Z}_0^{\lambda }=1\):

$$\begin{aligned} X\mathcal {Z}_t^{\lambda }&=\int _0^t\mathcal {Z}_t^{\lambda }(X\lambda (s)+\sigma (X,t))\,\hbox {d}W_{t}+X_0. \end{aligned}$$
(8)

By taking mathematical expectation from both sides of Eq. (8):

$$\begin{aligned} E^P[X\mathcal {Z}_t^{\lambda }]&=X_0 \Rightarrow E^P[X]=X_0(\mathcal {Z}_t^{\lambda })^{-1}. \end{aligned}$$
(9)

In addition, to compute the variance of this stochastic process:

$$\begin{aligned} E^P[(X\mathcal {Z}_t^{\lambda })^2]&=X_0^2+E\left[ \int _0^t(\mathcal {Z}_s^{\lambda })^2(X\lambda (s)+\sigma (X,t))^2\,\hbox {d}s\right] \quad (\text{ by }\,\,\hbox {It}\check{\hbox {o}}\,\,\text{ isometry })\nonumber \\&=X_0^2+\int _0^t(\mathcal {Z}_s^{\lambda })^2E\left( \left[ (X\lambda (s)+\sigma (X,t))^2\right] \right) \,\hbox {d}s.\nonumber \\ \text{ var }(X\mathcal {Z}_t^{\lambda })&=(\mathcal {Z}_t^{\lambda })^2\text{ var }(X)=\int _0^t(\mathcal {Z}_s^{\lambda })^2E\left( \left[ (X\lambda (s) +\sigma (X,t))^2\right] \right) \,\hbox {d}s. \end{aligned}$$
(10)

Applying (6) and using numerical approximation by EM method, we have:

$$\begin{aligned}\Delta X_i\mathcal {Z}_{t_i}^{\lambda }&=\mathcal {Z}_{t_i}^{\lambda }(X_i\lambda (t_i)+\sigma _i)\Delta W_i.\\X_{t_{i+1}}\mathcal {Z}_{t_{i+1}}^{\lambda }&=X_{t_i}\mathcal {Z}_{t_i}^{\lambda }+\mathcal {Z}_{t_i}^{\lambda }(X_{t_i}\lambda (t_i)+\sigma _i)\Delta W_i.\\X_{t_{i+1}}&=(\mathcal {Z}_{t_{i+1}}^{\lambda })^{-1}\mathcal {Z}_{t_i}^{\lambda }(X_{t_i}+(X_{t_i}\lambda (t_i)+\sigma _i)\Delta W_i). \end{aligned}$$

Direct calculations would lead to the conclusion that:

$$\begin{aligned} R_{t_i}&=(\mathcal {Z}_{t_{i+1}}^{\lambda })^{-1}\mathcal {Z}_{t_i}^{\lambda }=\exp \left( -\int _{t_i}^{t_{i+1}}\lambda (s) \,\hbox {d}W_s+\frac{1}{2}\int _{t_i}^{t_{i+1}}|\lambda ^2(s)|\,\hbox {d}s\right) . \end{aligned}$$

So the following Milstein recursive method is inferred as a good numerical method to find \(X(t_{i+1})\):

$$\begin{aligned} X_{t_{i+1}}=R_{t_i}(X_{t_i}+(X_{t_i}\lambda (t_i)+ \sigma _i)\Delta W_i) + \frac{1}{2}R_{t_i}^2\lambda (t_i)\left( X_{t_i}\lambda (t_i)+ \sigma _i\right) (\Delta ^2 W_i -\Delta t_{i}). \end{aligned}$$
(11)

In example 1, we compare this method with usual Milstein method in the case that a stochastic differential equation contains drift and volatility both parts and indicate that this method could be better in some cases.

Change of variable method

This section intends to analyze the change of variable method like [9], to get explicitly the solution of arbitrary SDE:

$$\begin{aligned} \hbox {d}X=\mathcal {A}(X,t) \hbox {d}t+ \mathcal {B}(X,t) \hbox {d}W_{t}, \quad X(0)=x. \end{aligned}$$

By finding appropriate variables \(u(Y)=X\) and their conditions so that \(Y\) is the answer of a well-known SDEs related to Martingale processes.

$$\begin{aligned} \hbox {d}Y=f(X,t) \hbox {d}t+ g(X,t) \hbox {d}W_{t}, \quad y(0)=y. \end{aligned}$$

For more explanation and different conditions under which they are possible, we could see [5, 10]. Now we consider following various cases.

Case 1

Consider the following SDE:

$$\begin{aligned} \hbox {d}Y=a(t)\hbox {d}t+b(t)\hbox {d}W_{t}. \end{aligned}$$
(12)

Applying Itô formula for \(u(Y)=X\), to (12), we get:

$$\begin{aligned} {\left\{ \begin{array}{ll}u' (a(t))+\frac{1}{2}u'' b^2(t)=\mathcal {A}(u(Y),t),\\ u'b(t)=\mathcal {B}(u(Y),t).\end{array}\right. } \end{aligned}$$
(13)

Thus, it concludes that:

$$\begin{aligned} \frac{a(t)}{b(t)}\mathcal {B}+\frac{1}{2}\mathcal {B} \mathcal {B}'=\mathcal {A}\Rightarrow \frac{\mathcal {A}}{\mathcal {B}}-\frac{1}{2}\mathcal {B}'=\frac{a(t)}{b(t)}. \end{aligned}$$
(14)

Finally, the equation \(\frac{\partial }{\partial Y}\left( \frac{\mathcal {A}}{\mathcal {B}}-\frac{1}{2}\mathcal {B}'\right) =0\) is necessary condition to solve an equation via change of variable in (12) \(\left( \mathcal {B}'=\frac{\partial \mathcal {B}}{\partial X}\right) \).

Case 2

Consider the exponential Martingale process SDE (3):

$$\begin{aligned} {\left\{ \begin{array}{ll} \hbox {d}Y=\lambda (t)Y\hbox {d}W_{t},\\ Y(0)=Y_0.\end{array}\right. } \end{aligned}$$
(15)

Applying Itô formula for \(u(Y)=X\), to (15), we acquire:

$$\begin{aligned} {\left\{ \begin{array}{ll}u'\lambda Y=\mathcal {B}(u,t)=\lambda (t) Y \hat{\mathcal {B}}(u) \;\; \text{ or } \;\; u'=\hat{\mathcal {B}}(u),&{}\\ \frac{1}{2}u''\lambda ^2 Y^2=\mathcal {A}(u,t). \end{array}\right. } \end{aligned}$$
(16)

So from the last equality, we have \(\frac{\mathcal {B}'}{\lambda (t)}-\frac{2\mathcal {A}}{\mathcal {B}}=\lambda (t)\). Therefore, \(\frac{\partial }{\partial u}\left( \mathcal {B}'_u-\frac{2\lambda (t)\mathcal {A}}{\mathcal {B}}\right) =0\) is necessary condition to solve SDE, with this change of variable.

Case 3

Consider the well-known equation:

$$\begin{aligned} {\left\{ \begin{array}{ll}\hbox {d}Y=a(t) Y\hbox {d}t+ b(t) Y \hbox {d}W_{t},\\ Y(0)=Y_0.\end{array}\right. } \end{aligned}$$
(17)

Which is Black–Scholes equation with exact solution

$$\begin{aligned} Y_0=\exp {\left( \int _0^t b(s)\hbox {d}W_s+\int _0^t\left( a(s)-\frac{1}{2}b^{2}(s)\right) \,\hbox {d}s\right) }. \end{aligned}$$

Applying Itô formula for \(u(Y)=X\), to (17), we get:

$$\begin{aligned} {\left\{ \begin{array}{ll}u' a(t) Y+\frac{1}{2}u'' b^2(t) Y^2=\mathcal {A}(u,t),\\ u'Y b(t)=\mathcal {B}(u,t)=b(t) Y \hat{\mathcal {B}}(u).\end{array}\right. } \end{aligned}$$
(18)

For this reason, \(u'=\hat{\mathcal {B}}(u)\) and we have:

$$\begin{aligned} \frac{a(t)}{b(t)}=\frac{\mathcal {A}}{\mathcal {B}}-\frac{1}{2}(\mathcal {B}'_u-b(t))=\gamma (u,t). \end{aligned}$$
(19)

It means that \(\frac{\partial }{\partial u}\gamma (u,t)=0\), is a necessary condition to solve the initial stochastic differential equation by this change of variable.

Case 4

Another appropriate and prominent case is as follows:

$$\begin{aligned} {\left\{ \begin{array}{ll}\hbox {d}Y_{t}=f(Y_{t},t)\hbox {d}t+c(t)Y_{t}\hbox {d}W_{t},\\ Y(0)=Y_0.\end{array}\right. } \end{aligned}$$
(20)

This kind of equations, applying Itô formula on \(X_{t}=Y_{t}\mathcal {Z}_t^c(t)^{-1}\), is converted to a ordinary differential equations.

Theorem 2

The stochastic differential equations in (20) given by continuous functions \(f:\mathbb {R}\times \mathbb {R}\rightarrow \mathbb {R}\) and \(C:\mathbb {R}\rightarrow \mathbb {R}\) can be written as:

$$\begin{aligned} \mathrm{d}(Y_{t}(\mathcal {Z}_t^c(t))^{-1})=(\mathcal {Z}_t^c(t))^{-1}f(Y_{t},t)\mathrm{d}t, \end{aligned}$$
(21)

where \(\mathcal {Z}_t^c(t)\) is an exponential Martingale process.

(See Oksendal [1], Chapter 5, Exercise 17]). To be more precise, using change of variable \(V=X (\mathcal {Z}_t^{c(t)})^{-1}\), it is enough to solve

$$\begin{aligned} {\left\{ \begin{array}{ll}X_{t}'=(\mathcal {Z}_t^{c(t)})^{-1}f(X_{t}\mathcal {Z}_t^{c(t)}),\\ X(0)=X_0.\end{array}\right. } \end{aligned}$$
(22)

Applying Itô formula for \(u(Y)=M_{t}\), in (20) we get:

$$\begin{aligned}&\hbox {d}M_{t}=M_{t}'\hbox {d}Y+\frac{1}{2}M_{t}''(\hbox {d}Y)^2.\nonumber \\&{\left\{ \begin{array}{ll}f(Y,t) M_{t}'+\frac{1}{2}M_{t}''c^2(t)Y^2=\mathcal {A}(M_{t},t), &{} (1) \\ c(t) Y M_{t}'=\mathcal {B}(M_{t},t),\; u(Y_0)=M_0.&{} (2)\end{array}\right. } \end{aligned}$$
(23)

According to (23), we have \(\mathcal {B}(M_{t},t)=c(t)\hat{\mathcal {B}}(M_{t})\). Besides, if the new stochastic differential equation is related to a Martingale process, we have \(\mathcal {A}(M_{t},t) =0 \) and:

$$\begin{aligned} f(Y,t)=-\frac{c^2(t)Y}{2}(\hat{\mathcal {B}}(M_{t})'-1). \end{aligned}$$
(24)

Again, applying Itô formula for \(\phi (M_{t})=V_{t}\) to Martingale equation contributes to

$$\begin{aligned} \hbox {d}M_{t}= \mathcal {B}(M_{t},t)\hbox {d}W_{t}=c(t)\hat{\mathcal {B}}(M_{t})\hbox {d}W_{t}, \end{aligned}$$

we can achieve to a novel group of stochastic differential equation that its solution is as a function of a Martingale process.

Examples

Example 1

Consider the following SDE

$$\begin{aligned} {\left\{ \begin{array}{ll}\hbox {d}X=(a(t)\sqrt{X})\hbox {d}t+(b(t)\sqrt{X})\hbox {d}W_{t},\\ X(0)=X_0.\end{array}\right. } \end{aligned}$$
(25)

from (9), we can get immediately \(E[X]=X_0(\mathcal {Z}_t^{\lambda })^{-1}\) such that \(\lambda =\frac{a(t)}{b(t)}.\) The graphs of various numerical solutions of this example by Milstein method, proposed formula (11) that is drift free and Taylor method of order \(2\) introduced as exact solution.

Example 2

Consider the following SDE that is named Black–Scholes equation.

$$\begin{aligned} \hbox {d}X=\mu (t) X \hbox {d}t+\sigma (t) X \hbox {d}W_{t}. \end{aligned}$$

Using (6), we have:

$$\begin{aligned} \hbox {d}(X\mathcal {Z}_t^{\lambda })=\mathcal {Z}_t^{\lambda }(X\lambda +\sigma (t))\hbox {d}W_{t}=\mathcal {Z}_t^{\lambda }(X\lambda +X\sigma (t))\hbox {d}W_{t}=X\mathcal {Z}_t^{\lambda }(\lambda +\sigma (t))\hbox {d}W_{t}. \end{aligned}$$

From this equality we could conclude that \(X\mathcal {Z}_t^{\lambda }\), is the exponential Martingale \(\mathcal {Z}_t^{\lambda +\sigma }\). Finally, \(X=(\mathcal {Z}_t^{\lambda })^{-1}\mathcal {Z}_t^{\lambda +\sigma }=\exp \left( {\int _0^t\sigma (t)\,\hbox {d}W_{s}+\int _0^t(\mu (t)-\sigma ^{2})\,\hbox {d}s}\right) \). This is the exact solution of Black–Scholes equation.

Fig. 1
figure 1

a The graphs of the numerical solutions of Example 1 by Milstein method, proposed formula (11) and Taylor method of order 2 introduced as exact solution. In this example, it is considered that drift, volatility and initial condition respectively are: \(a(t)=-0.2, b(t)=-1.0\), \(X_{0}=1.5\), maturity time \(T=2\) and number of points \(N=30\). b The graphs of absolute error

Example 3

Consider the following stochastic model

$$\begin{aligned} {\left\{ \begin{array}{ll}\hbox {d} X=\frac{3}{4}t^2 X^2 \hbox {d}t+t X^{3/2} \hbox {d}W_{t},\\ X(0)=0.\end{array}\right. } \end{aligned}$$

It can be checked that for this equation the necessary condition holds for this equation. According to (13), we have \(u' b(t)=t u^{3/2}\). Since \(u\) is just a function of \(Y\), we should get \(b(t)=t\), \(u=\frac{4}{Y^2}\) and \(\frac{a(t)}{b(t)}=0\) (or \(a(t)=0\)). Thus, \(dY=tdW_{t}\) and \(Y=\int _0^t sdW_s+Y(0)\), and ultimately \(X=u(Y)=4\left( \int _0^tsdW_s+Y(0)\right) ^{-2}\), is the exact solution (Fig.  1).

Example 4

Consider the following SDE model

$$\begin{aligned} {\left\{ \begin{array}{ll}\hbox {d}X=\frac{1}{2}(c^2(t) r X^{2r-1}-c^2(t) X^r)\hbox {d}t+c(t) X^r \hbox {d}W_{t}, \quad (r\ne -1)\\ X(0)=0.\end{array}\right. } \end{aligned}$$

First of all, we check the necessary condition in case \(2\):

$$\begin{aligned} \mathcal {B}'_u-\frac{2\mathcal {A}}{\mathcal {B}}=c(t) r u^{r-1}-\frac{c^2(t) r u^{2r-1}-c^2(t) u^r}{c(t) u^r}=c(t)=\lambda (t). \end{aligned}$$

Utilizing the first equation in Eq. (16), \(u'\lambda (t) Y=c(t) u^r\). Hence, \(\ln Y=\frac{u^{-r+1}}{-r+1}\), that \(r\ne -1\), \(Y(0)=1\) and \(u(1)=0\). Therefore, the exact solution is as follows:

$$\begin{aligned} X=u(Y)=\left( (1-r)\left( \int _0^tc(s), \hbox {d}W_{t}-\frac{1}{2}\int _0^tc^2(s)\hbox {d}s\right) \right) ^{\tfrac{1}{1-r}}. \end{aligned}$$

In a particular case, if \(r=\frac{1}{2}\), we reach the following model:

$$\begin{aligned} \hbox {d}X&=\left( \frac{c^2(t)}{4}-c^2(t)\sqrt{X}\right) \hbox {d}t+\left( c(t)\sqrt{X}\right) \hbox {d}W_{t},\\ X&=\frac{1}{4}\left( \int _0^tc(t)\hbox {d}W_{t}-\frac{1}{2}\int _0^tc^2(s)\hbox {d}s\right) ^2. \end{aligned}$$

Example 5

Consider the following SDE model:

$$\begin{aligned} {\left\{ \begin{array}{ll}\hbox {d}X=X^3\hbox {d}t+ X^2\hbox {d}W_{t},\\ X(0)=1.\end{array}\right. } \end{aligned}$$
(26)

First of all, we check the necessary condition in Case 3:

$$\begin{aligned} \gamma (u,t)=u-\frac{1}{2}(2u-b(t))=\frac{a(t)}{b(t)}=\frac{b(t)}{2}. \end{aligned}$$

From (18), we should have \(u'b(t) Y=u^2\). Therefore, if \(b(t)=1\), we can get immediately \(u=\frac{-1}{\ln Y}\) and \(a(t)=\frac{b^2(t)}{2}=\frac{1}{2}\), so that \(Y\) is the solution of following equation.

$$\begin{aligned} {\left\{ \begin{array}{ll}\hbox {d}Y=\frac{1}{2}Y\hbox {d}t+Y\hbox {d}W_{t},\\ Y(0)=\frac{1}{e}.\end{array}\right. } \end{aligned}$$

Therefore, according to geometric Brownian motion process, the exact solution is determined \(Y=\frac{1}{e}\exp \left( \int _0^t \hbox {d}W_{t}\right) =\hbox {e}^{W(t)-1}\), and finally exact solution is equal to \(X=\frac{1}{1-W(t)}\).

Example 6

Consider the stochastic model as follows:

$$\begin{aligned} {\left\{ \begin{array}{ll}\hbox {d}\mathcal {Z}_{t}=\frac{-Z^2_{t}}{2}-(\ln 2)\mathcal {Z}_{t} \hbox {d}t+(\ln 2+\mathcal {Z}_{t}) \hbox {d}W_{t},\\ \mathcal {Z}_{t}(0)=0.\end{array}\right. } \end{aligned}$$
(27)

First, by applying Girsanov theorem so that \(W^Q_{t}= W_{t}+\frac{(\ln 2)^2}{2}t\), we reach the following equation:

$$\begin{aligned} {\left\{ \begin{array}{ll}\hbox {d}\mathcal {Z}_{t}=-\frac{(\ln 2)^2}{2}+\frac{-Z^2_{t}}{2}-(\ln 2)\mathcal {Z}_{t} \hbox {d}t+(\ln 2+\mathcal {Z}_{t}) \hbox {d}W^Q_{t},\\ \mathcal {Z}_{t}(0)=0.\end{array}\right. } \end{aligned}$$
(28)

Applying Itô formula for \(X_{t}= \hbox {e}^{{\mathcal {Z}}_{t}}\), to the last equation, we obtain the following drift-free stochastic equation:

$$\begin{aligned} {\left\{ \begin{array}{ll}\hbox {d}X_{t}=X_{t}\ln (2X_{t}) \hbox {d}W^Q_{t},\\ X_{t}(0)=1.\end{array}\right. } \end{aligned}$$
(29)

according to (23), we have \(Y u'=u \ln (2u)\). Consequently, \(Y=\frac{\ln (2X)}{2}\), \(X=u(Y)=\frac{1}{2} \hbox {e}^{2Y}\).

From (24), we have \(f=-Y^2\) and consequently, the exact solution of corresponding SDE is \(X=\frac{1}{2} \hbox {e}^{2Y}\) such that its related stochastic equation is:

$$\begin{aligned} {\left\{ \begin{array}{ll}\hbox {d}Y=-Y_{t} \hbox {d}t+Y_{t} \hbox {d}W^Q_{t},\\ Y(0)=\frac{\ln (2)}{2}.\end{array}\right. } \end{aligned}$$

As we know, the exact solution of this linear stochastic differential equation is as follows:

$$\begin{aligned} Y_{t}=\frac{\ln (2)}{2}\exp \left( W^Q_{t}-\frac{3t}{2} \right) . \end{aligned}$$
(30)

Finally, the exact solution of this example is:

$$\begin{aligned} \mathcal {Z}_{t}=\ln (X_{t})=\ln \left( \frac{1}{2} \hbox {e}^{2Y_{t}}\right) =2Y_{t}-\ln 2=\ln 2\left( \exp \left( W^Q_{t}-\frac{3t}{2} \right) -1\right) . \end{aligned}$$
(31)

Conclusions and remarks

In this paper, a couple of analytical solutions of some determined set of stochastic differential equations was indicated via making the Martingale process from a stochastic process. Converting stochastic differential equations to ordinary ones as another suitable method was posed. Indeed, it is tried to omit diffusion part of stochastic equation by applying Martingale processes. In addition, change of variable method on SDEs related to Martingale processes was discussed. Last of all with some examples, we analyzed and obtained its exact solutions and in some cases their solutions compared with other numerical methods.