-1
$\begingroup$

I have a system of three equations I am trying to solve using Runge-Kutta method. Here are the equations and the boundary conditions. I want to find $X(t), Y(t) and Z(t)$ in $t=[t_0,t_f]$ interval. I only have the initial value of $X(t)$ and the relation between $Y(t)$ and $Z(t)$ at the boundaries. the other constants such as $A, a, a_1, b, b_1, c, c_3, d ...$ are all known values. How can I solve them?

The equations:

$X'(t)=\frac{a \times X(t) (-a_1-(A \times b_1 - b \times c_3 \times (Z(t) + Y(t)))}{(A + c \times X(t) + d (Z(t) + Y(t))))};$

$Y'(t)=\frac{b \times Y(t) (-a_2-(A\times b_2 + a \times c_3 \times X(t))}{(A + c \times X(t) + d (Z(t) + Y(t))))};$

$Z'(t)=\frac{b \times Z(t)( a_2+(A \times b_2 + a \times c_3 \times X(t))}{(A + c \times X(t) + d (Z(t) + Y(t))))};$

Boundary conditions:

$X(t_0)=10\times 10^{-3};$

$Y(t_0)=0.9\times Z(t_0);$

$Z(t_f)=0.8\times Y(t_f);$

  • 0
    t_0 and t_f are the limits of the interval I want to solve the equations for. (t=[t_0,t_f])2017-01-04
  • 0
    I think you need an initial condition for $Z$. Do you know $Z(t_0)$?2017-01-04
  • 0
    $Y(t_0)$, $Y(t_f)$, $Z(t_0)$ and $Z(t_f)$ are all unknown.2017-01-04
  • 0
    Do you know $t_0$ and $t_f$? It would suffice to know $t_f-t_0$...2017-01-04
  • 0
    yes, it can be [0,50] for example. I want to solve for $X(t)$, $Y(t)$ and $Z(t)$ and I only know the initial value for $X(t)$ which is $X_0=10*10^{-3}$ for example and I also know the relation between $Y(t)$ and $Z(t)$ at the boundaries.2017-01-04

1 Answers 1

0

Set up a spreadsheet with column headings $t$, $X$, $Y$, $Z$, $X'$, $Y'$ and $Z'$

In the first row enter $t=0$, $X=10 \times 10^{-3}$, $Z=0$. I'm not sure about $Z=0$, but you can alter this value later on to try to make things better...

Also in the first row set up formulae so that the values of $Y$, $X'$, $Y'$ and $Z'$ can all be evaluated.

You will need to decide on a small value $\delta t$. I suggest setting $\delta t=0.1$ to start with.

In the next row you can now set up a formula so that the value of $t$ is the value above added to $\delta t$.

Set up a formula for $X$ so that it is equal to the value of $X$ above added to $X' \delta t$.

Set up a formula for $Y$ so that it is equal to the value of $Y$ above added to $Y' \delta t$.

Set up a formula for $Z$ so that it is equal to the value of $Z$ above added to $Z' \delta t$.

Copy down your old formulae for $X'$, $Y'$ and $Z'$ (but not $Y$ because it is only for $t=0$ that $Y=0.9Z$).

Copy this row down until $t=t_f$.

Make a note of the values you get for $X$, $Y$ and $Z$. Is it true that $Z=0.8Y$? Don't worry if not (yet).

Change $\delta t$ to a smaller value - perhaps $\delta t=0.01$

You will need to make your spreadsheet ten times longer. Look at the new values you get for $X$, $Y$ and $Z$. Are they very different to what they were before? Is it true that $Z=0.8Y$?

If you do this repeatedly with $\delta t=0.1$, $\delta t=0.01$, $\delta t=0.001$, $\delta t=0.0001$ you should begin to see the values converging. Hopefully you will also get $Z=0.8Y$.

If not, then you will need to start tinkering with the value of $Z(t_0)$

  • 0
    Thanks! Is this the same as the shooting method where I am trying to find an answer by guessing the initial values? Is there any way to implement this method in Matlab or Mathematica?2017-01-04
  • 0
    Sorry I'm not used to either of those environments.2017-01-04