# MATLAB Solving Coupled Differential Equations (in Matlab)

#### ksmanis

Hi,

I have the following problem to solve. My system can be defined as a set of coupled differential equations as described below:

dy/dt = -a*y(t) + b*x(t) + (m-y(t))*r;
dx/dt = a*y(t) - b*x(t) + (n-x(t))*r;

where m,n and r are constants. I have the values of y(t) and x(t) for different values of t. The above dy/dt and dx/dt are based on theoretical interpretation (and I do not have their values). For the given set of x(t), y(t), I would like to find the coefficients 'a' and 'b' fitting the above system.

Appreciate your help in solving this problem in any package (preferably matlab)

Kind Regards
Subbu

Related MATLAB, Maple, Mathematica, LaTeX, Etc News on Phys.org

#### pasmith

Homework Helper
The ODE is linear with constant coefficients, so can be solved analytically to obtain $(x,y)(t)$ expressly. One could then attempt to minimize the square error $\sum_i \|(x,y)(t_i) - (x_i,y_i)\|^2$ in the usual way.

"Solving Coupled Differential Equations (in Matlab)"

### Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving