Numerical methods for a system of coupled ODE

Click For Summary
The discussion centers on solving a system of coupled first-order ordinary differential equations with initial conditions specified at different points in the domain. The equations presented are:dy1/dz = y1 + y2 + 0.01dy2/dz = y1 + y2 + 0.01with initial conditions y1(0) = 0 and y2(10) = 0. The user expresses difficulty in updating values for both solutions due to the differing initial conditions, suggesting that a common starting point is necessary for iteration. Suggestions include using the Runge-Kutta method, but concerns are raised about how to address the boundary conditions effectively. The conversation also mentions the potential of combining the Runge-Kutta method with the Shooting method to tackle the boundary condition issue. The domain of z is confirmed to be between 0 and 10.
Telemachus
Messages
820
Reaction score
30
Hi there. I have to solve a system of coupled ordinary differential equations. I have some initial values, but in different points of the domain. The equations are all first order. Let's suppose the system looks like this:

##\displaystyle\frac{dy_1}{dz}=y_1+y_2+0.01##
##\displaystyle\frac{dy_2}{dz}=y_1+y_2+0.01##

with initial conditions: ##y_1(0)=0, y_2(10)=0##

So, I use some discretization in z, and get some iteration scheme that looks like

##y_{1,n+1}=f_1(y_{1,n},y_{2,n})##
##y_{2,n+1}=f_2(y_{1,n},y_{2,n})##

I don't give exactly the recursion formula I've arrivesd I just simplified it to discuss the important aspects, ##f_1## and ##f_2## are just some functions. The thing is, that as you can see, the forward value depends in the current one for both solutions. So, the only way I can get a formula which I can solve is by setting the initial condition at the same point (lets say ##y_1(0)=0## and ##y_2(0)=0##), otherwise, I lack the information necessary to update the values in both solutions.

Does anyone know where I can find some examples on how to solve coupled differential equations with arbitrary initial values?

Best regards.
 
Technology news on Phys.org
  • Like
Likes Telemachus
What is the domain of z?
 
  • Like
Likes Telemachus
Hi, thank you both for your feedback, ##z\in \{0,10\}##

Regarding runge kutta, I could use that, but how would it solve the issue with the boundary conditions?
 
Telemachus said:
Hi, thank you both for your feedback, ##z\in \{0,10\}##

Regarding runge kutta, I could use that, but how would it solve the issue with the boundary conditions?

We can combine it with the Shooting method.
 
  • Like
Likes Greg Bernhardt and DrClaude
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
Replies
10
Views
2K
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 15 ·
Replies
15
Views
2K
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K