Question: dsolve vs. DEplot syntax; ugly complex function

I have a numerical procedure that reads data from a file and builds a composition of maps from the half-plane to the slit half-plane.  Maple does not deal with this very well symbolically.  I want to use the complex values from this function as a vector field and plot some integral curves.  The 'mystery' function below is a stand-in for the real thing*

I can get DEplot to at least show the vector field, but it fails mysteriously on drawing any curves, which is odd because it is about the most innocuous looking vector field possible.  Just to check, replacing 'z*(1+I)' with '1+I' in the mystery function gives the same errors.

Finally, I can't get dsolve to accept anything like the syntax that sort of works for DEplot.  See two of my attempts below.

Any hints?


mystery := proc (z) if not type(evalf(z), 'complex') then ('procname')(z) else evalf((1+I)*z) end if end proc:

with(DEtools):

F1 := proc (N, x, Y, YP) local tmp; tmp := evalf(mystery(Y[1]+I*Y[2])); YP[1] := Re(tmp); YP[2] := -Im(tmp) end proc;

proc (N, x, Y, YP) local tmp; tmp := evalf(mystery(Y[1]+I*Y[2])); YP[1] := Re(tmp); YP[2] := -Im(tmp) end proc

(1)

``

``

inits := [seq(seq([0, -.2+.4*k, .3*j], k = 0 .. 1), j = 1 .. 4)];

[[0, -.2, .3], [0, .2, .3], [0, -.2, .6], [0, .2, .6], [0, -.2, .9], [0, .2, .9], [0, -.2, 1.2], [0, .2, 1.2]]

 

Warning, plot may be incomplete, the following errors(s) were issued:
   solution becomes complex valued
Warning, plot may be incomplete, the following errors(s) were issued:
   solution becomes complex valued
Warning, plot may be incomplete, the following errors(s) were issued:
   solution becomes complex valued
Warning, plot may be incomplete, the following errors(s) were issued:
   solution becomes complex valued
Warning, plot may be incomplete, the following errors(s) were issued:
   solution becomes complex valued
Warning, plot may be incomplete, the following errors(s) were issued:
   solution becomes complex valued
Warning, plot may be incomplete, the following errors(s) were issued:
   solution becomes complex valued
Warning, plot may be incomplete, the following errors(s) were issued:
   solution becomes complex valued

 

 

curve := dsolve({F1, x(0) = x0, y(0) = y0}, numeric, parameters = [x0, y0])

Error, (in dsolve/numeric/process_input) system must be entered as a set/list of expressions/equations

 

curve := dsolve({diff(x(t), t) = Re(mystery(x(t)+I*y(t))), diff(y(t), t) = -Im(mystery(x(t)+I*y(t)))}, numeric)

Error, (in dsolve/numeric/process_input) input system must be an ODE system, got independent variables {t, x(t)+I*y(t)}

 

``



Download mystery.mw

Please Wait...