Euler's method for coupled ODE's

gfd43tg
Gold Member
Messages
947
Reaction score
48

Homework Statement


Consider the following pair of coupled first order ODEs

\dot{y_{1}} = y_{2} with ##y_{1}(0) = 1##
\dot{y_{2}} = -y_{1} with ##y_{2}(0) = 1##

Use the Euler integration method with a step-size ##h = 1## and fill out the entries in the table below

\begin{bmatrix}<br /> t_{k}&amp;y_{1}(t_{k})&amp;y_{2}(t_{k})\\<br /> 0 &amp; &amp;\\<br /> 1 &amp; &amp;\\<br /> 2 &amp; &amp;\\<br /> 3 &amp; &amp; -4\\<br /> \end{bmatrix}

Homework Equations


The Attempt at a Solution


Normally I understand how to do Euler's method, but of course now it's a coupled ODE so I am very confused how to do it. I know in general you do

##y_{k+1} = y_{k} + f(t_{k},y_{k})h##

But with the coupled ODE I am lost
 
Last edited:
Physics news on Phys.org
Maylis said:

Homework Statement


Consider the following pair of coupled first order ODEs

\dot{y_{1}} = y_{2} with ##y_{1}(0) = 1##
\dot{y_{2}} = -y_{1} with ##y_{2}(0) = 1##

Use the Euler integration method with a step-size ##h = 1## and fill out the entries in the table below

\begin{bmatrix}<br /> t_{k}&amp;y_{1}(t_{k})&amp;y_{2}(t_{k})\\<br /> 0 &amp; &amp;\\<br /> 1 &amp; &amp;\\<br /> 2 &amp; &amp;\\<br /> 3 &amp; &amp; -4\\<br /> \end{bmatrix}

Homework Equations





The Attempt at a Solution


Normally I understand how to do Euler's method, but of course now it's a coupled ODE so I am very confused how to do it. I know in general you do

In this equation:
##y_{k+1} = y_{k} + f(t_{k},y_{k})h##
y can be (and normally is) a vector, and f can be (and normally is) a vector-valued function.
 
How does it look?

\begin{bmatrix}<br /> t_{k}&amp;y_{1}(t_{k})&amp;y_{2}(t_{k})\\<br /> 0 &amp; 1 &amp;1\\<br /> 1 &amp; 2 &amp;0\\<br /> 2 &amp; 2 &amp; -2\\<br /> 3 &amp; 0 &amp; -4\\<br /> \end{bmatrix}

\begin{bmatrix} y_{{1},t_{k}=1} \\ y_{{2},t_{k}=1}\\ \end{bmatrix} = \begin{bmatrix} 1 \\ 1 \\ \end{bmatrix} + \begin{bmatrix}1\\-1\\ \end{bmatrix}*1 = \begin{bmatrix} 2 \\ 0 \\ \end{bmatrix}

\begin{bmatrix} y_{{1},t_{k}=2} \\ y_{{2},t_{k}=2}\\ \end{bmatrix} = \begin{bmatrix} 2 \\ 0 \\ \end{bmatrix} + \begin{bmatrix}0\\-2\\ \end{bmatrix}*1 = \begin{bmatrix} 2\\ -2 \\ \end{bmatrix}

\begin{bmatrix} y_{{1},t_{k}=3} \\ y_{{2},t_{k}=3}\\ \end{bmatrix} = \begin{bmatrix} 2 \\ -2 \\ \end{bmatrix} + \begin{bmatrix}-2\\-2\\ \end{bmatrix}*1 = \begin{bmatrix} 0\\ -4 \\ \end{bmatrix}
 
Last edited:
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...

Similar threads

Back
Top