- Research
- Open access
- Published:
Mean square numerical solution of stochastic differential equations by fourth order Runge-Kutta method and its application in the electric circuits with noise
Advances in Difference Equations volume 2015, Article number: 62 (2015)
Abstract
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.
A stochastic differential equation of the form
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
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
Lemma 1
Let \({X_{n}}\) and \({Y_{n}}\) be two sequences of second order random variables mean square convergent to the second order random variable X, Y, respectively, i.e.,
then
and so
Definition 3
Let \(g:I\longrightarrow L_{2}\) be a mean square bounded function and let \(h>0\), then the mean square modulus of continuity of g is the function
Definition 4
The function g is said to be mean square uniformly continuous in I, if
Definition 5
Let \(f(X,t)\) be defined on \(S \times I\) where S is a bounded set in \(L_{2}\). We say that f is randomly bounded uniformly continuous in S, if
uniformly for \(X\in S\), and finally we have
Definition 6
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\),
-
(iii)
\(E [\int_{S}^{T} f^{2}(t,\omega)\,dt]<\infty\), [17].
Definition 8
(The Itô integral), [17]
Let \(f\in \nu(S,T)\), then the Itô integral of f (from S to T) is defined by
where \({\phi_{n}}\) is a sequence of elementary functions such that
Theorem 1
(The Itô isometry), [17]
Let \(f\in\nu(S,T)\), then
Definition 9
(1-dimensional Itô processes), [17]
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
where
The Itô processes \(X_{t}\) is sometimes written in the shorter differential form
Theorem 2
(The 1-dimensional Itô formula), [17]
Let \(X_{t}\) be an Itô process given by (2) and \(g(t,x)\in C^{2}([0,\infty)\times R)\), then
is again an Itô process, and
where \((dX_{t})^{2}=(dX_{t})(dX_{t})\) is computed according to the rules
Lemma 2
[1]
Let \(X(t)\) be a second order stochastic process, mean square continuous on \(I=[t_{0},T]\), then there exists \(\eta\in I\) such that
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
Proof
See [1]. □
3 Convergence of random fourth order Runge-Kutta method
A random fourth order Runge-Kutta method will have the following form:
where
Theorem 4
Let \(f(X(t),t)\) be defined on \(S \times I\) to \(L_{2}\), where S is a bounded set in \(L_{2}\). If \(f(X(t),t)\) satisfies the conditions (C1) and (C2),
-
(C1)
\(f(X,t)\) is randomly bounded uniformly continuous,
-
(C2)
\(f(X,t)\) satisfies the mean square Lipschitz condition, that is,
$$ \bigl\| f(X,t)-f(Y,t) \bigr\| \leq k(t) \| X-Y\|, $$(7)where \(\int_{t_{0}}^{T}k(t)\,dt<\infty\),
then the random fourth order Runge-Kutta scheme (5) is mean square convergent.
Proof
Note that under hypotheses (C1) and (C2), we are interested in the mean square convergence to zero of the error
where \(X(t)\) is the theoretical solution of the fourth order stochastic process of the problem (1).
From Theorem 3 it follows that
By (5), (6), (8), and (9) it follows that
By assumption
and using (C1), (C2), and Theorem 3 we have
and
So, from substituting (12), (13), (14), and (15) in (10), one gets
and by setting
the inequality (16) gets the following form:
and by successive substitution, (19) will become
by (17) we can write
and by (21) and geometrical progression we conclude
Finally, from (18) and substituting (21) and (22) in (20), we obtain the following error bound:
by assumption \(e_{0}=0\) and \(nh=T-t_{0}\), the above inequality can be written as
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.
Example 1
Consider the following problem:
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
using the Itô formula [17], we deduce
and so
If \(f(X(t),t)=2tX(t)+\exp(-t)+B(t)\), we have
so \(f(X,t)\) is randomly bounded uniformly continuous in any bounded set \(S\subset L\).
Now, from the random fourth order Runge-Kutta method we have
where
and by setting
we have
and so
From (26) and (30), we obtain the expectations and variances of \(X(t)\) and \(X_{n}\).
where
and
where
where
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.
Example 2
Consider the following initial value problem:
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)\).
The covariance of \(W(t)\) is
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,
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
using the Itô formula, [17], we conclude
and so
Now, we compute \(X_{n}\) from the random fourth order Runge-Kutta method,
where
and by setting
we have
and so
From (37) and (39) we obtain the expectation and variance of \(X(t)\) and \(X_{n}\):
and
where
where
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.
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
Now, by assuming \(g(t,x)=e^{\frac{t}{RC}}x\) and using Theorem 2, we conclude
Now, we compute \(Q_{n}\) from the random fourth order Runge-Kutta method,
where
and by setting
we have
and so
From (47) and (49), we obtain the expectation and variance of \(Q(t)\) and \(Q_{n}\).
and
where
where
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.
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.
6 Conclusion
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)
Khodabin, M, Maleknejad, K, Rostami, M, Nouri, M: Interpolation solution in generalized stochastic exponential population growth model. Appl. Math. Model. 36, 1023-1033 (2012)
Soboleva, TK, Pleasants, AB: Population growth as a nonlinear stochastic process. Math. Comput. Model. 38, 1437-1442 (2003)
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)
Cortés, JC, Jódar, L, Villafuerte, L: Random linear-quadratic mathematical models: computing explicit solutions and applications. Math. Comput. Simul. 79, 2076-2090 (2009)
Kloeden, PE, Platen, E: Numerical Solution of Stochastic Differential Equations. Applications of Mathematics. Springer, Berlin (1999)
Milstein, GN: Numerical Integration of Stochastic Differential Equations. Kluwer Academic, Dordrecht (1995)
Calbo, G, Cortés, JC, Jódar, L: Random analytic solution of coupled differential models with uncertain initial condition and source term. Comput. Math. Appl. 56, 785-798 (2008)
Cortés, JC, Jódar, L, Camacho, F, Villafuerte, L: Random Airy type differential equations: mean square exact and numerical solutions. Comput. Math. Appl. 60, 1237-1244 (2010)
Cortés, JC, Jódar, L, Villafuerte, L, Company, R: Numerical solution of random differential models. Math. Comput. Model. 54, 1846-1851 (2011)
Cortés, JC, Jódar, L, Villafuerte, L, Villanueva, RJ: Computing mean square approximations of random diffusion models with source term. Math. Comput. Simul. 76, 44-48 (2007)
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)
Cortés, JC, Jódar, L, Villafuerte, L: Mean square numerical solution of random differential equations: facts and possibilities. Comput. Math. Appl. 53, 1098-1106 (2007)
Soong, TT: Random Differential Equations in Science and Engineering. Academic Press, New York (1973)
Calbo, G, Cortés, JC, Jódar, L, Villafuerte, L: Analytic stochastic process solutions of second-order random differential equations. Appl. Math. Lett. 23, 1421-1424 (2010)
Oksendal, B: Stochastic Differential Equations: An Introduction with Applications, 5th edn. Springer, New York (1998)
Lighthill, MJ: An Introduction to Fourier Analysis and Generalised Functions. Cambridge University Press, Cambridge (1996)
Acknowledgements
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
Corresponding author
Additional information
Competing interests
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.
About this article
Cite this article
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 Equ 2015, 62 (2015). https://doi.org/10.1186/s13662-015-0398-6
Received:
Accepted:
Published:
DOI: https://doi.org/10.1186/s13662-015-0398-6