Solving two systems of DEs using the ode45 function.
Show older comments
I am trying to solve two systems of differential equations in variables x1, x2, x3 using the ode45 function. The equations are given below:
dx1=-2*lambda*beta*x1+2*lambda*alpha*x2+lambda^2*sigma^2;
dx2=beta*x1-(alpha+lambda*beta)*x2+lambda*alpha*x3;
dx3=2*beta*x2-2*alpha*x3;
where alpha=alpha0+alpha1*t and beta=beta0+beta1*t and alpha0, alpha1, beta0, beta1, sigma, lambda are known constants.
The values I am trying to find are X1, X2 and X3. The derivatives of these desired values are given by:
dX1=beta*x1;
dX2=alpha*x2;
dX3=x3;
I am having difficulties implementing the above using the ode45 function given that the problem is defined by two sets of simultaneous differential equations. Any suggestions as to how this can be solved would be much appreciated. Thanks.
Accepted Answer
More Answers (0)
Categories
Find more on Numerical Integration and Differential Equations in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!