How do I reformulate my NDSolve program
- To: mathgroup at smc.vnet.net
- Subject: [mg86173] How do I reformulate my NDSolve program
- From: Alex Cloninger <acloninger at wustl.edu>
- Date: Tue, 4 Mar 2008 02:10:19 -0500 (EST)
So I am trying to run plots of the following coupled differential equations, specifically for epsilon=1/2: solution = NDSolve[{x'[t] == 2p[t], x[0] == 0, p'[t] == i*(2 + ϵ)(i*x[t])^(1 + ϵ), p[0] == 1}, {x, p}, {t,0,10}, WorkingPrecision -> 40, MaxSteps ->Infinity][[1]]; I then want to plot the p[t] in the complex plane: ParametricPlot[{Re[p[t]] /. solution, Im[p[t]] /. solution}, Evaluate[time],PlotRange -> {{-2, 2}, {-2, 2}}] The problem with this is that my plot has a sharp change in slope at (1,0) (t=5.6 or so). What should happen is that the line continues past p=1 and extends out into a small loop before coming back, crossing over itself, and continuing along the larger loop. I know that the reason the graph isn't appearing correct has to do with the fact that I'm raising x[t] to a fractional power (epsilon=1/2). Mathematica isn't realizing that it has hit a branch cut and is taking the wrong root. I have two questions. 1) How would I be able to identify these points of discontinuities in slope on a more complicated graph (I want to be able to do this for any positive rational epsilon)? 2) How would I go about fixing the problem so that Mathematica takes the correct root and continues in the correct direction? Thanks for your help, Alex PS. I have version 5.2, but I have access to a better version if there's something in it that would help me.