0
$\begingroup$

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!

$\endgroup$
1
$\begingroup$
Clear["Global`*"]

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

enter image description here

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

enter image description here

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]}]

enter image description here

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.