Numerically calculating the solution for a non-homogeneous ODE system

Click For Summary

Discussion Overview

The discussion revolves around numerically solving a system of non-homogeneous ordinary differential equations (ODEs). Participants explore various numerical methods and their applicability to the given system, which includes constant non-homogeneous terms.

Discussion Character

  • Exploratory, Technical explanation, Debate/contested, Mathematical reasoning

Main Points Raised

  • One participant describes their experience using the Crank-Nicolson method for homogeneous ODEs and questions its applicability to non-homogeneous systems.
  • Another participant requests the specific equations being solved.
  • A participant provides the system of equations, highlighting the presence of constants a, b, and c as non-homogeneous terms.
  • There is a discussion about the Crank-Nicolson scheme's typical application to PDEs and its potential misapplication to ODEs, with a suggestion that averaging variables may lead to the trapezium rule method.
  • A participant expresses confusion about the placement of non-homogeneous terms on the diagonal of the discretization matrix and seeks clarification on matrix construction.
  • One participant suggests that the system might be solvable analytically using Laplace transforms, while also mentioning the trapezoidal rule as a viable numerical method.
  • Another participant recommends exploring Runge-Kutta methods, sharing their own experience with similar problems in gravitational dynamics.

Areas of Agreement / Disagreement

Participants express differing views on the appropriate numerical methods for solving the non-homogeneous ODE system. There is no consensus on the best approach, and multiple methods are proposed without agreement on their effectiveness.

Contextual Notes

Some participants note potential confusion regarding the application of the Crank-Nicolson method to ODEs versus its typical use in PDEs. There are also unresolved questions about the construction of the discretization matrix and the placement of non-homogeneous terms.

Who May Find This Useful

This discussion may be useful for individuals interested in numerical methods for solving ordinary differential equations, particularly those dealing with non-homogeneous systems and exploring various numerical techniques.

semc
Messages
364
Reaction score
5
I have been solving system of homogeneous ODE numerically using Crank-nicolson (CN) method but now I have a system of non-homogeneous ODE. It would seem that CN would not work since the rank of the matrix will be less than the dimension of the matrix. Is there any other method that can numerically calculate a system of non-homogeneous ODE?
 
Physics news on Phys.org
What are the equations?
 
  • Like
Likes   Reactions: jim mcnamara
It is like

\dot{x_1}=x_1-x_2+x_3+a
\dot{x_2}=x_1+2x_2+x_3 +b
\dot{x_3}=-x_1+x_2+x_3+c

where a,b and c are constants w.r.t. time
 
The Crank-Nicolson scheme is for PDE's, specifically for diffusion equations. How do you use it in a system of ODE's? If you just average x1,x2 and x3 over the current and next time step, you are actually applying the trapezium rule method. Anyway, if the nonhomogeneous terms are constants, they will simply appear on the diagonal of your discretization matrix.
 
Yes I just realized that it is called the trapezium method. I do not understand why they are on the diagonal. Using the case that I provided, how should I construct the matrix?
 
I may be wrong here, but I'm pretty sure this system can be solved analytically with Laplace transforms. If that's not what you're after, the trapezoidal rule should work too.
 
Have you tried runge-kutta methods? I've been using it to solve some classical gravitational dynamics which have this level of difficult.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K