Bidirectional ODE Hello all,
Could you please help with the following problem? I have a set of two coupled ODE for $a$ and $b$ waves [wave is a general form of solution $a(z)=A(z)\exp(\imath \beta z)$]. The equations in question are as follows:
$a_z(z) = \imath \beta a(z) + f[a(z),b(z)]$
$b_z(z) = - \imath \beta b(z) + g[(a(z),b(z)]$
$z$ is a direction of propagation, wave $a$ propagates from left to right (from $z=0$ to $z=L$) and wave $b$ propagates from right to left (from $z=L$ to $z=0$). $\beta$ is a complex constant with positive real and imaginary parts. $f[a(z),b(z)]$ and $g[a(z),b(z)]$ are lightly perturbing polynomial functions (i.e. $|f[a(z),b(z)]| < |\beta a(z)|$ and $|g[a(z),b(z)]| < |\beta b(z)|$). $a$ is defined at the left boundary $a(0)=a_0$ and freely goes through the right boundary, and $b$ is defined at the right boundary $b(L)=b_0$ and freely goes through the left boundary.
Could you advice how to solve this system numerically? Especially how to make sure the $a$ and $b$ waves do not get reflected from the boundaries and go through them freely?
Thank you in advance!
Alex
 A: This is a typical problem for time-dependent Schroedinger equation. Firstly, let us consider the unperturbed problem. We can write the free solutions as
$$
  \tilde a=a_0e^{i\beta z} \qquad \tilde b=b_0e^{i\beta(L-z)}.
$$
Now, redefine $a$ and $b$ in you system as
$$
  a(z)=\bar a(z)e^{i\beta z} \qquad b(z)=\bar b(z)e^{-i\beta z}
$$
and, by direct substitution, you will get
$$
  \bar a(z)=e^{-i\beta z}f\left[\bar a(z)e^{i\beta z},\bar b(z)e^{-i\beta z}\right]
$$
$$
  \bar b(z)=e^{i\beta z}g\left[\bar a(z)e^{i\beta z},\bar b(z)e^{-i\beta z}\right]
$$
and you can integrate this immediately to get
$$
  \bar a(z)=a_0+\int_{0}^zdz'e^{-i\beta z'}f\left[\bar a(z')e^{i\beta z'},\bar b(z')e^{-i\beta z'}\right]
$$
$$
  \bar b(z)=b_0e^{i\beta L}+\int_{0}^zdz'e^{i\beta z'}g\left[\bar a(z')e^{i\beta z'},\bar b(z')e^{-i\beta z'}\right].
$$
These equations can be solved iteratively and you will get at first order
$$
  \bar a(z)=a_0+\int_{0}^zdz'e^{-i\beta z'}f\left[a_0e^{i\beta z'},b_0e^{i\beta (L-z')}\right]+\ldots
$$
$$
  \bar b(z)=b_0e^{i\beta L}+\int_{0}^zdz'e^{i\beta z'}g\left[a_0e^{i\beta z'},b_0e^{i\beta (L-z')}\right]+\ldots
$$
You will recognize that we are iterating using the free solutions and this is nothing else than standard perturbation theory. This gives your solution in a closed form and if $f$ and $g$ are not too involved, the integrals can be easily worked out.
