Hi. Quick question: In Ubuntu 14.04 with Unity, when a window becomes unresponsive, it is grayed out and a dialog appears that asks me whether I want to kill the process.
(Reason: Mathematica seems to do something weird, because e.g. moving sliders will trigger this unresponsiveness warning after a few seconds. Very annoying)
@MichaelE2 Thank you for the very interesting answer. I did not manage to apply it yet to my problem (in dimension 7, with more complicated expressions). Anyway, my (basic) implementation of "pseudo arc-length continuation" works quite well. The initial point is found with FindRoot. For the initial direction, I do another FindRoot very close from the previous one. I am especially interested in getting all curves; your solution with NIntegrate seems smart.
It returned only a few point in my case. Btw, if think there's a typo in your answer: irst instead of First. Thank you again.
And if you have any ideas how to find efficiently the intersection of curves... That's probably the most tricky part with my algorithm (it cannot handle bifurcations).
@anderstood Thanks for pointing out the typo. I thought what might be helpful is that NDSolve already implements the projection/FindRoot step (in Method -> "Projection" and in solving DAEs). To get arc-length continuations, use x'[t].x'[t] == 1 and initialize x[0] == root, x'[0] == unittangent with the DAE method. One advantage ought to be that NDSolve will stop at a bifurcation, because the system should become stiff.
At a bifurcation, the rank of the derivative will be less than $n-1$, if $f \colon R^n -> R^(n-1)$. These points will be where the determinants of the $n$ square $(n-1) \times (n-1)$ submatrices of the derivative simultaneously vanish. I don't know if that's a good way to find the bifurcation points or not.
Searching for all roots in 7 dimensions is quite a task. One needs fine enough sampling to get a point in the basin of attraction for each solution. Increasing MaxRecursion might help.
@Öskå OK. So you have to write Java and there are many information available, but when it comes to specific details, you will always have to look at the IDEA code and how other plugins did it.
Although I have to say that there isn't much description about "why" you have to do something. It only shows you what you have to do to get basic functionality.
@Öskå You will have to know it very well, because all the nice features, that separate IDEA from a texteditor, only work because IDEA really parses the language.
The hardest part is to write a lexer and a parser. For the last part you can use a parser-generator, that reads a BNF for your language.
@Öskå Ansys should be a simple enough language to support w/ just some regexes (if good highlighting is all you want). Intelligent suggestions... now that's a beast.
@R.M. I had no doubt it represented a lot of them :)
Well thanks a lot to you two, I will try Sublime Text and if it's not good enough for Ansys I will get into it and try a few things based on halirutan job :)
@MichaelE2 I see. I am trying to use NSolve to compare with my function. I am not sure what ImageColorOperationsDump$wavelengths is supposed to do. I will input values manually to try. Btw, I think there's another unimportant typo in domainEvt: it has two "StopIntegration" and no "StartIntegration".
@J.M. Shame on me. Thanks. (When I said numerical continuation was not so complicated to understand, I did not mean the whole topic was easy, of course. It's a research topic in itself. I meant that understanding the pseudo arc-length continuation as described in wikipedia is certainly possible for belisarius - in view of his answers here).
@J.M. @MichaelE2 In this case, I can confirm that MichaelE2's suggestion is more efficient than my first implementation. I still have to work on it though. :)
@anderstood They're both supposed to be "StopIntegration". One of the things that confused me is that NDSolve "starts" integration at the initial condition, not at t1 in {t, t1, t2}, unless the initial condition happens to coincide with t1. When it the initial condition is in the middle, NDSolve does two integrations, one "Forward" and one "Backward". Basically I wanted NDSolve to stop integration whenever it exited the domain (out either side of the box).
@anderstood Just in case it's not clear: Image`ColorOperationsDump`$wavelengths[[{1,-1}]] are the limits {min, max} set by ChromaticityPloton the domain of the OP's interpolating functions. (The whole vector consists of the sample wavelengths used. I think I used it only for the endpoints, but I wrote some of the code so that the whole vector could be passed and only the endpoints would be used. Kinda sneaky, I suppose.)
@MichaelE2 "One of the things that confused me is that NDSolve "starts" integration at the initial condition" - yes, it's been a convenient feature for me thus far.
@J.M. It's perfectly fine, once I understood it. I think the docs assume it's obvious, but it's not the way ODEs are taught in a mathematical differential equations class (as opposed to a computational/numerical approach).
The most confusing thing is WhenEvent[x[t] < 0,...] in the backward vs. forward directions. They don't have the same meanings.
@xslittlegrass If $\delta$ is the Dirac "function" (distribution), the value in 0 is 0, while in the neighbourhood of 0 (excluding 0), you only get the cosine, which does not have any limit in $\infty$. So I don't think it is continuous. But that's not a proof.
@MichaelE2 I made a few experiments with NSolve and DAEs. I observed that sometimes, it founds solutions for the whole interval $[-500,500]$ (for example), and sometimes as expected it stops before reaching these values. I then calculate the rank of the derivatives (or the determinant of the jacobians or the square matrices) and it is sometimes less than n-1 (or =0), but usually not. I don't reasons for that. Would you?
@xslittlegrass "removing" w=0 is not enough: continuity implies that the function has to be equal to the limit of cos(1/w) in 0... but it does not have any limit. You might want to consider asking math.stackexchange.com.
I have a function
$$
f(\omega) = \exp\left(-\frac{\gamma}{\gamma^2+\omega^2}\right)\cos\left(\frac{\gamma}{\gamma^2+\omega^2}\right),
$$
and I'm trying to calculate its Fourier transform at the limit of $\gamma\rightarrow 0$:
$$
\mathcal{F}\left[\lim_{\gamma\rightarrow 0} \, f(\omega)\right]....
@anderstood Being close to a singular point (of the derivative) might not be close enough to get the rank to drop. The size of the determinant is not necessarily a safe indicator. At this point though we begin to step outside my limited background in numerical linear algebra. The condition number might be the thing to consider; see mathematica.stackexchange.com/questions/11131/…