Mean square numerical solution of stochastic differential equations by fourth order Runge-Kutta method and its application in the electric circuits with noise
Mean square numerical solution of stochastic differential equations by fourth order Runge-Kutta method and its application in the electric circuits with noise
We consider numerical solutions of stochastic initial value problems via the random Runge-Kutta method of the fourth order. A random mean value theorem is established and the mean square convergence of these methods is proved. The expectation and variance of the solution are derived. We supplement this method by plotting computational errors.
1 Introduction
Stochastic differential equations (SDEs) have many applications in economics, ecology, and finance [1–3]. In recent years, the development of numerical methods for the approximation of SDEs has become a field of increasing interest; see e.g. [4–10] and references therein. For example in [11], a numerical solution of SDEs is given by a random Euler method and in [12–15], we obtain the expectation and variance of a numerical solution of these equations by a random Runge-Kutta method of the second order that have good accuracy, with respect to the Euler method [11], and in this paper we obtain the expectation and variance of numerical solution of these equations by a random Runge-Kutta method of the fourth order.
where \(X_{0}\) is a random variable, and the unknown \(X(t)\) as well as the right-hand side \(f(X(t),t)\) are stochastic processes defined on the same probability space \((\Omega,\digamma,P)\), are powerful tools to model real problems with uncertainty. The authors of [16] treated the numerical solution of stochastic initial value problems based on a sample treatment of the right-hand side of the differential equations. The sample treatment approach developed in [16] has the advantage that conclusions remain true in the deterministic case, but in many situations the hypotheses assumed in [16] are not satisfied. This fact motivates research for alternative conditions under which good numerical approximations could be constructed. Here we do not assume any trajectorial condition but mean square change information of \(f(X(t),t)\) is expressed in terms of its mean square modulus of continuity. Other numerical schemes for stochastic differential equations may be found in [4, 6, 12, 16].
This paper is organized as follows: Section 2 deals with some preliminaries addressed to clarify the presentation of concepts and results used later. A mean value theorem for stochastic processes is given in Section 3 and in Section 4 the mean square convergence of a random fourth order Runge-Kutta method is established. In Section 5 some examples of [11, 12] illustrate the accuracy of the presented results. Finally, Section 6 gives some brief conclusions.
2 Preliminaries
Definition 1
We are interested in second order random variables X, having a density function \(f_{X}\),
where E denotes the expectation operator, and it allows the introduction of the Banach space \(L_{2}\) of all the second order random variables endowed with the norm
$$\|X\|=\sqrt{E\bigl[X^{2}\bigr]}. $$
Definition 2
A stochastic process \(X(t)\) defined on the same probability space \((\Omega,\digamma, P)\) is called a second order stochastic process if for each t, \(X(t)\) is a second order random variable. Hence the meaning of \(\dot{X}(t)\) in (1) is the mean square limit in \(L_{2}\) of the expression
Let\({X_{n}}\)and\({Y_{n}}\)be two sequences of second order random variables mean square convergent to the second order random variableX, Y, respectively, i.e.,
$$X_{n}\rightarrow X \quad \textit{and}\quad Y_{n} \rightarrow Y \quad \textit{as } n \rightarrow\infty, $$
then
$$E[X_{n}Y_{n}]\rightarrow E[XY] \quad \textit{as } n \rightarrow\infty, $$
Let \(\{N_{t}\}_{t\geq0}\) be an increasing family of σ-algebras of sub-sets of Ω. A process \(g(t,\omega)\) from \([0,\infty) \times\Omega\) to \(R^{n}\) is called \(N_{t}\)-adapted if for each \(t\geq0\) the function \(\omega \rightarrow g(t,\omega)\) is \(N_{t}\)-measurable, [17].
Definition 7
Let \(\nu= \nu(S,T)\) be the class of functions \(f(t,\omega):[0,\infty)\times\Omega\rightarrow R\) such that:
(i)
\((t,\omega)\rightarrow f(t,\omega)\) is \(B\times\mathcal {F}\)-measurable, where B denotes the Borel σ-algebra on \([0,\infty)\) and ℱ is the σ-algebra on Ω,
(ii)
\(f(t,\omega)\) is \(\mathcal{F}_{t}\)-adapted, where \(\mathcal{F}_{t}\) is the σ-algebra generated by the random variables \(B_{s}\); \(s\leq t\),
Let \(B_{t}\) be 1-dimensional Brownian motion on \((\Omega,\mathcal{F},P)\). A (1-dimensional) Itô process (or stochastic integral) is a stochastic process \(X_{t}\) on \((\Omega,\mathcal{F},P)\) of the form
The purpose of the theorem below is to establish a relationship between the increment \(X(t)-X(t_{0})\) of a second order stochastic process, and its mean square derivative \(\dot{X}(\eta)\) for some η in \([t_{0},t]\) for \(t>t_{0}\). The result will be used to prove the convergence of the random Runge-Kutta method.
Theorem 3
Let\(X(t)\)be a mean square differentiable second order stochastic process in\(I=[t_{0},T]\)and mean square continuous in it. Then there exists\(\eta\in I\)such that
since \(\omega(h)\rightarrow0\) as \(h\rightarrow0\), by condition (C1) and inequality (24) we can deduce that the sequence \({e_{n}}\) is mean square convergent to zero as \(h\rightarrow0\). Thus we have established the theorem. □
4 Numerical examples
Here we present some examples. Since these examples can be found in [1, 2], we can compare the results.
where \(B(t)\) is a Brownian motion process and \(X_{0}\) is a normal random variable, \(X_{0}\sim N(\frac{1}{2},\frac{1}{12})\) independent of \(B(t)\) for each \(t\in[0,1]\).
For computing the exact solution of the problem, by multiplying the equation by \(\exp(-t^{2})\) and using \(W(t)=\frac{dB(t)}{dt}\), we have
The absolute error of the expectation and variance of \(X(t)\) with the Euler, RK2 and RK4 methods and \(h=\frac{1}{20}\), \(h=\frac{1}{50}\) are shown in Tables 1, 2. In Figure 1, the expectation and variance of the exact and numerical solutions of Example 1 with the RK4 method and \(h=\frac{1}{20}\) are compared. They show that the numerical values of \(E[X_{n}]\) and \(\operatorname{Var}[X_{n}]\) are closer to the theoretical values \(E[X(t_{n})]\) and \(\operatorname{Var}[X(t_{n})]\) when the parameter h decreases.
Figure 1
Expectations and variances of\(\pmb{X(t)}\)and\(\pmb{X_{n}}\)with the RK4 method and\(\pmb{h=\frac{1}{20}}\).
where \(W(t)\) is a Gaussian white noise process with mean zero and \(X_{0}\) is an exponential random variable with parameter \(\lambda=\frac{1}{2}\), independent of \(W(t)\) for each \(t\in [0,1]\). Here \(f(X(t),t)\) involves the white noise process with mean zero \(W(t)\), i.e.\(f(X(t),t)=t^{2}X(t)+W(t)\).
where \(\delta(t)\) is the delta generalized function. A convolution with the delta function always exists, see [18], and the delta function plays the same role for the convolution as unity does for multiplication,
$$\delta\ast g=g. $$
So, taking \(g(s)=h(s)\chi_{[0,t]}(s)\), where \(h(s)\) is a \(C^{\infty}\) function and \(\chi_{[0,t]}(s)\) denotes the characteristic function on the interval \([0,t]\), from (36) it follows that
For computing the exact solution of the problem, by multiplying both sides of (35) by \(\exp (\frac{-t^{3}}{3} )\), and using \(W(t)=\frac{dB(t)}{dt}\), we have
The absolute errors of the expectation and variance of \(X(t)\) with the Euler, RK2, and RK4 methods and \(h=\frac{1}{20}\), \(h=\frac{1}{50}\) are shown in Tables 3, 4. In Figure 2, the expectation and variance of the exact and numerical solutions of Example 2 with the RK4 method and \(h=\frac{1}{20}\) are compared.
Figure 2
Expectations and variances of\(\pmb{X(t)}\)and\(\pmb{X_{n}}\)with the RK4 method and\(\pmb{h=\frac{1}{20}}\).
Figures 1, 2 show that \(E[X_{n}]\) and \(\operatorname{Var}[X_{n}]\) of the numerical solutions of stochastic initial value problems via random Runge-Kutta methods of the fourth order are close to \(E[X(t)]\) and \(\operatorname{Var}[X(t)]\), respectively, as \(h \rightarrow0\).
5 Applications in the electric circuits with noise
Consider the following RC circuit with constant parameters:
where \(Q(t)\) is the electric charge at time t and \(Q_{0}\) is an exponential random variable with parameter \(\lambda=\frac{1}{3}\), independent of \(W(t)\) for each \(t\in[0,1]\), which means the initial charge at time \(t=0\), and \(V(t)\) are nonrandom functions of time variable, which means the voltage at time t and \(W(t)=\frac{dB(t)}{dt}\) is a 1-dimensional white noise process and \(B(t)\) is a 1-dimensional Brownian motion and \(\alpha(t)\) is a nonrandom function that shows the infirmity and intensity of noise at time t.
Now, solving this stochastic differential equation, we have
The absolute error of the expectation and variance of \(Q_{n}\) with \(V(t)=\exp(t)\), \(\alpha(t)=\frac{\sin(t)}{25}\), \(R=1\), \(C=2\) are shown in Table 5.
Table 5
Absolute error of the expectation and variance of\(\pmb{Q_{n}}\)with\(\pmb{h=\frac{1}{20}}\)
The absolute error of the expectation and variance of \(Q_{n}\) with \(V(t)=\exp(t)\), \(\alpha(t)=\frac{\sin(t)}{25}\), \(R=1\), \(C=2\) are shown in Figure 3.
Figure 3
Expectations and variances of\(\pmb{Q(t)}\)and\(\pmb{Q_{n}}\)with\(\pmb{h=\frac{1}{20}}\).
In this paper, the numerical solution of a stochastic differential equation is discussed by fourth order Runge-Kutta methods in detail. The results can be compared with [1, 2]. Our comparison showed that this method has more accuracy than the Euler method and the second order Runge-Kutta methods in [1, 2].
References
Cortés, JC, Jódar, L, Villafuerte, L: Numerical solution of random differential equations: a mean square approach. Math. Comput. Model. 45, 757-765 (2007)
Khodabin, M, Maleknejad, K, Rostami, M, Nouri, M: Numerical solution of stochastic differential equations by second order Runge-Kutta methods. Math. Comput. Model. 53, 1910-1920 (2011)
Koskodan, R, Allen, E: Construction of consistent discrete and continuous stochastic models for multiple assets with application to option valuation. Math. Comput. Model. 48, 1775-1786 (2008)
Maleknejad, K, Khodabin, M, Rostami, M: Numerical solution of stochastic Volterra integral equations by stochastic operational matrix based on block pulse functions. Math. Comput. Model. 55, 791-800 (2012)
The authors would like to thank Islamic Azad University of Karaj Branch for partially financially supporting this research and providing facilities and encouraging this work.
Author information
Authors and Affiliations
Department of Mathematics, College of Basic Sciences, Karaj Branch, Islamic Azad University, Alborz, Iran
Morteza Khodabin
Department of Mathematics, Naragh Branch, Islamic Azad University, Naragh, Iran
The authors declare that they have no competing interests.
Authors’ contributions
All authors contributed equally to the writing of this paper. All authors read and approved the final manuscript.
Rights and permissions
Open Access This is an Open Access article distributed under the terms of the Creative Commons Attribution License (http://creativecommons.org/licenses/by/4.0), which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly credited.
Khodabin, M., Rostami, M. Mean square numerical solution of stochastic differential equations by fourth order Runge-Kutta method and its application in the electric circuits with noise.
Adv Differ Equ2015, 62 (2015). https://doi.org/10.1186/s13662-015-0398-6