How to solve complex 1st order ODEs in octave/Matlab

  • Context: MATLAB 
  • Thread starter Thread starter alan_liu
  • Start date Start date
  • Tags Tags
    Complex Odes
Click For Summary
SUMMARY

This discussion focuses on solving complex first-order ordinary differential equations (ODEs) using Octave/Matlab. The key method involves separating the complex ODEs into their real and imaginary components, as Octave/Matlab's "isode" function only handles real ODEs. By defining new variables for the real and imaginary parts, users can transform the original complex ODEs into a system of four real ODEs, facilitating their solution.

PREREQUISITES
  • Understanding of first-order ordinary differential equations (ODEs)
  • Familiarity with complex numbers and their properties
  • Experience using Octave or Matlab, specifically the "isode" function
  • Basic knowledge of variable substitution techniques in differential equations
NEXT STEPS
  • Research the implementation of the "isode" function in Octave/Matlab
  • Study variable substitution methods for transforming complex ODEs
  • Learn about numerical methods for solving systems of ODEs
  • Explore additional resources on complex analysis and its applications in differential equations
USEFUL FOR

This discussion is beneficial for mathematicians, engineers, and students who are working with complex ODEs and require practical solutions using Octave or Matlab.

alan_liu
Messages
1
Reaction score
0
I am stuck with the issue quite sometimes already.
The question is to solve a 2 complex 1st order complex ODEs.
The hints that given by the professor is to separate the ODEs into the real and imaginary part as ocatve/matlab only capable of handling real ODEs with “ isode “ function.


So how to decompose a complex ODEs into real and imaginary part? For instance, a real complex ODEs can be decomposed into 2 functions, 1 with all the real part, and other one with all the imaginary part.
Please do let me know if i am not stated the problems clearly as well.

Any hints and reference materials will be truly appreciated.
 
Physics news on Phys.org
Hi Alan, welcome to PF!

If you have two complex ODEs for variables ##y_1## and ##y_2##, define a new system of variables
$$
\begin{align}
u_1 &= \Re (y_1) \\
u_2 &= \Im (y_1) \\
u_3 &= \Re (y_2) \\
u_4 &= \Im (y_2)
\end{align}
$$
substitute the ##u##'s for the ##y##'s in your ODEs, and this should give you a system of 4 ODEs for the ##u##'s.
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
7K
  • · Replies 1 ·
Replies
1
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 20 ·
Replies
20
Views
3K