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
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 3K views
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.