« first day (1409 days earlier)      last day (3085 days later) » 

2:10 AM
Ended up integrating many times around the limit cycle, sowing the time and then using the differences.
 
 
2 hours later…
3:45 AM
@Pickett How about something like this?
psol = ParametricNDSolveValue[
   {x'[t] == y[t], y'[t] == -1.5 (x[t]^2 - 1) y[t] - x[t], x[0] == x0,
     y[0] == y0,
    WhenEvent[y[t] < 0 && t > 0.001, "StopIntegration"]}, {x, y},
   {t, 0, 20}, {x0, y0}];

NestWhile[
 psol @@ Last /@ Through[#["ValuesOnGrid"]] &,
 psol[0.5, 0.],
 With[{p1 = foo = Last /@ Through[#1["ValuesOnGrid"]],
    p2 = Last /@ Through[#2["ValuesOnGrid"]]},
   EuclideanDistance[p1, p2]/Norm[p2] > 2 $MachineEpsilon] &,
 2, 1000]
The exit criterion 2 $MachineEpsilon might need to be increased in cases where the solution is not computed accurately.
 
 
2 hours later…
5:35 AM
Hi, can someone help testing this piece of code, in either version?:
Clear@a
a /: (b : Except[a])[c__, a[d_]] := a[b[c, d]]
{x, a[1]}
In my v9.0.1, win 64bit, it outputs a[a[{x, 1}]]
but I just tested it in Wolfram Cloud, it outputs a[{x, 1}] as expected.
"in either version" <- Oh, I mean "in any version"
 
 
3 hours later…
8:18 AM
@xzczd 10.3 gives a[a[{x, 1}]]
@xzczd There should be a duplicate topic, or closely related, there will be more heads in {x, a[1]} than you (I) think
a /: (b : Except[a | CompoundExpression])[c__, a[d_]] := (Print[b];
a[b[c, d]])
and it still prints additional IF :)
 
8:38 AM
@Kuba Yeah, I have a feeling that I used to read a post related to this issue, but failed to find it. Let's wait for a moment to see if anyone can find it out.
 
Hi, everyone, did somebody own a copy of this paper: The insertion algorithm
The library of our university doesn't buy that paper, so I cannot download that paper:(
 
@ShutaoTANG 现在没在校园网里,所以帮不上忙……你试过小木虫了吗?
 
I need that paper to understand the following algorithm.
@xzczd 谢谢,我发现Elsevier 1993年以前的文章,全国高校都没有买。我试了我们学校的图书馆联盟,没有找到。小木虫我平时没用过:)
@xzczd please see the following screenshot
 
8:54 AM
@ShutaoTANG OK, so the output in Wolfram Cloud is a exception.
 
 
3 hours later…
11:28 AM
@MichaelE2 I like that solution, thank you!
 
@Pickett You're welcome!
 

« first day (1409 days earlier)      last day (3085 days later) »