Euler's method for coupled ODE's

Click For Summary
SUMMARY

This discussion focuses on applying Euler's method to solve a pair of coupled first-order ordinary differential equations (ODEs): \(\dot{y_{1}} = y_{2}\) with \(y_{1}(0) = 1\) and \(\dot{y_{2}} = -y_{1}\) with \(y_{2}(0) = 1\). The Euler integration method is utilized with a step-size \(h = 1\). The resulting values for the table are calculated as follows: \(y_{1}(0) = 1\), \(y_{2}(0) = 1\), \(y_{1}(1) = 2\), \(y_{2}(1) = 0\), \(y_{1}(2) = 2\), \(y_{2}(2) = -2\), \(y_{1}(3) = 0\), and \(y_{2}(3) = -4\). The process involves iterating through the equations while treating the variables as vectors.

PREREQUISITES
  • Understanding of first-order ordinary differential equations (ODEs)
  • Familiarity with Euler's method for numerical integration
  • Basic knowledge of vector calculus
  • Ability to perform matrix operations
NEXT STEPS
  • Study the implementation of Euler's method for higher-order ODEs
  • Explore alternative numerical methods such as Runge-Kutta for solving ODEs
  • Learn about stability analysis in numerical methods for ODEs
  • Investigate the use of software tools like MATLAB or Python's SciPy for numerical integration
USEFUL FOR

Students and professionals in mathematics, engineering, and physics who are working with numerical methods for solving ordinary differential equations, particularly those dealing with coupled systems.

gfd43tg
Gold Member
Messages
949
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:

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 18 ·
Replies
18
Views
3K
Replies
7
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
4
Views
5K
  • · Replies 3 ·
Replies
3
Views
2K