Solving an ODE in the complex plane using a MatLab ODE solver In Matlab, I mostly use the solver ode45 and it seems that I cannot use complex numbers when specifying the interval of integration. An oversimple example would be if I wanted to solve numerically the initial value problem $$\frac{{\mbox{d}}y}{{\mbox{d}}t}=y,\;\;y(0)=3,$$ in the complex plane on the straight line between $t=0$ and $t=3+2i$. There does not seem to be a way to use an ODE solver in MatLab that would let me specify an interval in the complex plane. 
My question is: is there a way to use a Matlab ODE solver to solve an ODE in the complex plane? 
 A: To solve a ODE along a curve in the complex plane, you have to first transform it into an ODE on a real interval. Let me demonstrate this procedure using your example. We first parametrize the line from $0$ to
$3 + 2 \mathrm{i}$ by
$$
t = s \cdot (3 + 2 \mathrm{i})
\quad \text{for} \quad
s \in [0, 1]
$$
and introduce the function
$$
w(s) = y(t) = y(s \cdot (3 + 2 \mathrm{i}))
\,.
$$
The chain rule gives the relation that
$$
\frac{dw}{ds} = \frac{dy}{dt} \frac{dt}{ds}
= \frac{dy}{dt} (3 + 2\mathrm{i})
\,.
$$
Hence,
$$
\frac{dy}{dt} = \frac{1}{3 + 2\mathrm{i}} \frac{dw}{ds}
= \frac{3 - 2\mathrm{i}}{13} \frac{dw}{ds}
$$
Replacing $y(t)$ and $\frac{dy}{dt}$ by 
$w(s)$ and $\frac{3 - 2\mathrm{i}}{13} \frac{dw}{ds}$ 
in the ODE, we see that
$$
   \frac{3 - 2\mathrm{i}}{13} \frac{dw}{ds}
   = w
   \,, \quad
   w(0) = 0
   \,.
$$
This equation is now an ODE in a real variable. Hence, you can use Matlab to solve it. Since
$$
s = \frac{t}{3 + 2\mathrm{i}}
\,,
$$
you obtain your solution $y(t)$ by
$$
y(t) = w(s) = w(\frac{t}{3 + 2\mathrm{i}})
$$
for points $t$ on the line.
