- #1
jackmell
- 1,807
- 54
Hi,
I'd like to numerically solve the IVP:
[tex]x^2 y y''+2x y y'+2 y^2+xy'-x^2 y^3-(x y')^2-y=0,\quad y(x_0)=1,y'(x_0)=0[/tex]
around the unit circle, [itex]x=e^{it}[/itex]. When I attempt to solve it around the entire circle, I think the integration is veering of course. I believe the solution is single-valued which means it should return to the starting point after a [itex]2\pi[/itex] route or at least be closer than in the figure below which shows the imaginary solution. And I'm pretty sure the large dip in the plot below is reflecting a loss of accuracy along the route. I've tried decreasing the step size and increasing working precision, trying a different method, but cannot get the the start and end points closer. I was wondering if someone here could suggest perhaps a better method to use or other NDSolve parameters that might help. Also, the code below reflects the change in variable [itex]x(t)=e^{it}[/itex]. There is always the possibility that the path is near a singular point and that would be causing the problem. However, even if I change the radius by letting [itex]x(t)=re^{it}[/itex], for any radius, I still run into the same problem.
Thanks,
Jack
Here's the code I'm using:
I'd like to numerically solve the IVP:
[tex]x^2 y y''+2x y y'+2 y^2+xy'-x^2 y^3-(x y')^2-y=0,\quad y(x_0)=1,y'(x_0)=0[/tex]
around the unit circle, [itex]x=e^{it}[/itex]. When I attempt to solve it around the entire circle, I think the integration is veering of course. I believe the solution is single-valued which means it should return to the starting point after a [itex]2\pi[/itex] route or at least be closer than in the figure below which shows the imaginary solution. And I'm pretty sure the large dip in the plot below is reflecting a loss of accuracy along the route. I've tried decreasing the step size and increasing working precision, trying a different method, but cannot get the the start and end points closer. I was wondering if someone here could suggest perhaps a better method to use or other NDSolve parameters that might help. Also, the code below reflects the change in variable [itex]x(t)=e^{it}[/itex]. There is always the possibility that the path is near a singular point and that would be causing the problem. However, even if I change the radius by letting [itex]x(t)=re^{it}[/itex], for any radius, I still run into the same problem.
Thanks,
Jack
Here's the code I'm using:
Code:
x = Exp[I t];
reim = Im;
tstart = 0;
tend = tstart + 2 \[Pi];
myeqn5 = -I x y[t] y''[t] - x y[t] y'[t] -
I y'[t] (2 y[t] + 1 + I y'[t]) + 2 y[t]^2 - x^2 y[t]^3 - y[t] == 0;
mysol5 = NDSolve[{myeqn5, y[tstart] == 1 , y'[tstart] == 0},
y, {t, tstart, tend}, WorkingPrecision -> 45, MaxStepSize -> 0.001,
MaxSteps -> 100000, AccuracyGoal -> 30, PrecisionGoal -> 30];
p1 = ParametricPlot3D[{Re[z], Im[z], reim[y[t] /. mysol5]} /.
z -> r Exp[I t], {t, tstart, tend}, BoxRatios -> {1, 1, 1},PlotRange->All]
Attachments
Last edited: