# How to substitute by NDSolve solution to plot a new function

Assume I got some function by NDSolve , like y(t)

ysol = NDSolve[{y'[t] == y[t], y[0] == 1}, y, {t, 0, 10}]

How can I plot another new function defined by

ycomp = ysol + I ysol ?

where t is time. So I think the problem is that, the true independent parameter is t and it's real, but when I plot ycomp versus ysol in the complex plane , ysol will be the independent parameter .

For example, if ComplexPlot3D is used, it's simple in forward solutions , like:

ComplexPlot3D[y, {y, 0 + 0 I, 1 + I}]

But in my case , how to embed NDSolve solution in the plot of a new function ?

Hope my argument is clear enough. And any help to do that is appreciated!

## 1 Answer

Clear["Global*"]

ysol = NDSolve[{y'[t] == y[t], y[0] == 1}, y, {t, 0, 10}][[1]]


Plot[y[t] /. ysol, {t, 0, 1}]


y[t] is only defined for a real arguments.

ycompAbs[t_] = y[Abs[t]] + I y[Abs[t]] /. ysol;

ycompRe[t_] = y[Re[t]] + I y[Re[t]] /. ysol;

ycompIm[t_] = y[Im[t]] + I y[Im[t]] /. ysol;

Column[ComplexPlot3D[#, {t, 0 + 0 I, 1 + I},
ImageSize -> 360] & /@ {ycompAbs[t], ycompRe[t], ycompIm[t]}]
`