9,771 reputation
1644
bio website
location
age
visits member for 2 years, 9 months
seen 8 hours ago

Sep
27
comment Mathematica integration failure - new or old?
@IgorRivin: there is WRI personal participating on this site, but I don't think they officially speak/act for WRI here and there most probably is not a well defined automatic process to create a bug report from errors reported to this site. So it does always make sense to report the bug to their support. It might even help to increase priority if it is sent more than once from different sources :-)
Sep
27
comment Smoothing a single rectangular pulse in NDSolve
how about the sum of two Tanh? I think the proper parametrization (how steep you make them) needs some information about your problem...
Sep
27
comment Save associations to a file and reload
thanks, that's very useful, wouldn't hav had "ExpressionList" on my mind. You might want to add that that problem hasn't anything to do with the fact that the OP is saving associations, he'd have had the very same problem with PutAppend lists or even just numbers...
Sep
27
comment A femme is a wife is a Frau
@eldo: you probably have noticed it by now, but the point is that you don't have to "find" that form for a given WA call but just click on the small + icon in the "pod cell" of your choice and select the "computable data" entry. That will insert a new input cell with exatly that arcane code. That's explained also in one of the ansers (currently that is the last one) to the questions kguler refered to...
Sep
17
comment Second order differential equation
... so you probably are best off to try what your professor suggested (another wellknown method to approach such problems). I would also think that it might be worth to rethink what problem that equation originated from and probably understand whether that singularity has a meaning in that context. Maybe you then can reformulate the problem in a way that is less problematic for numeric solvers...
Sep
17
comment Second order differential equation
@Marco: when you change eps you solve a different problem: if eps is > 0.75567 the solution to your problem will have w'[x]<0 for 0.75567 < x < 1 and there is no problem with the singularity. If eps gets about 0.75567, then the solution (at least the one Mathematica finds/tries with the shooting methods) will have w'[1]==0 and hits the singularity. It could be that there are other solutions which the shooting method as implemented in Mathematica just doesn't find (or you have to give it an initial guess). I don't think this will work here...
Sep
16
comment Second order differential equation
@xzczd: I absolutely aggree that one shouldn't trust results of numeric algorithms in such situations (known potential singularities) blindly, and I have admittedly not made any tests about the quality of what NDSolve returns (and yes, only v10 will return a result at all). In this case I have also seen what you have seen, but I think that is because the current formulation is suboptimal in how it handles the eps parameter. I will update to show a more reliable way...
Sep
14
comment Why I can not get the plot when I use NDSolve`ProcessSolutions?
I have added some more variants to extract the solutions and some explanations. For these I'm making use of some slightly "advanced" features of Mathematicas pattern matching functionality, but as pattern matching is the very core of Mathematica it might be a good idea to learn at least some of it if you want to make good use of Mathematica...
Sep
13
comment How do I plot x[t] vs. x'[t] (where x[t] and x'[t] are solutions to NDSolve)?
I just have edited (just) the formatting of your answer, because to me it looks like a very good solution to the question. One thing you might want to change is the naming of the variables which hold the solution, it usually is recommended to not use variable names which start with uppercase letters to stay out of conflicts with internal symbols.
Sep
13
comment Parallel computation of a system of differential equation
@GregoryRut: I see, that is of course a difference that I didn't have in mind: if you reinitialize you'll loose previous points, if you don't ProcessSolution will do the interpolation. I can't remember exactly but I think in older versions there was no way to get avoid the interpolation but in newer version it might be possible to extract results from StateData without building the full interpolation (or maybe it was just planned?) and continue without reinitialization. Anyway, fortunately there are also these other possibilities that I did mention...
Sep
12
comment Parallel computation of a system of differential equation
@GregoryRut: Why do you think the answer given there was not a solution? I think it basically does what was asked for and also what you are intersted in: run NDSolve and only store the solutions at some points, you could of course also only store at one point, the end point. Neverthless you might find the additional answer that I just posted for that question also of interest, it gives a solution which is somewhat simpler if you really only are interested in the final value.
Sep
11
comment Save output of NDSolve to a file
Have you seen this question?
Jul
30
comment TimeConstrained for Table?
it probably would better to create an extra question for such a followup. But in this case I'm sure that you would create a duplicate as that has been answered before. You might search for SyntaxInformation. This should roughly do what you want: SyntaxInformation[TimeConstrainedTable] = {"LocalVariables" -> {"Table", {2, Infinity}},"ArgumentsPattern" -> {_, {_, _, _., _.} .., _}}
Jul
29
comment Mathematica9: NDSolve slows down after repeated calls
just tried it and it looks like the problem still exists in version 10
Jul
15
comment Controlling quality of discretized region meshes
good to see you back alive, user21 :-). Is it possible to refine the grid only near the edge, in one way or another?
Jul
6
comment Why are functions called first-class objects in Mathematica?
@Eric: one more remark about 3=9: for a term rewriting system this might not be that meaningless at all, e.g. it would work perfectly well in a local replace rule: (a+3) /. {3->9}. As far as I understand, the only reason why defining such a rule globally with Set wouldn't work is that Mathematica demands a global replace rule to be attached to a symbol, which in this case isn't possible as the LHS is just an atomic integer ...
Jul
6
comment Why are functions called first-class objects in Mathematica?
@Eric: as has been explained the "miracle" of Set is that it has the HoldFirst attribute. This will make Set see the unevaluated LHS. What the code within Set does with that unev. LHS is up to the programmers at WRI who wrote that code. Obviously it does analyze that LHS-expr. and for some special cases does "the right thing". There is nothing to be understood at the language level here, it really is just an implementation detail which even could change between versions. Unfortunately the documentation of what such functions actually implement is often somewhat vague or incomplete...
Jul
5
comment Why are functions called first-class objects in Mathematica?
I think the statement "{g,h,j}[[1]] = 6 can never work" is not correct. As Set has HoldFirst it would very well be able to extract the (held) symbol g and change its OwnValues, just as it is able to do in something like {g,h}={1,2}. Unlike the latter the former has not been implemented, probably for good reasons, probably just because nobody at WRI bothered about that specific case...
Jul
4
comment Why are functions called first-class objects in Mathematica?
I think that this statement might have had in mind "pure functions" like (#^2)& or Function[x,(1+x)^3]. These quite obviously are normal expressions and functions. "function definitions" like f[x_]:=... in Mathematica are actually definitions for global rewrite rules (as others have explained in more detail) which just happen to have an intuitive interpretation as functions but conceptually are not different from rules which e.g. define variable values.
May
28
comment Cell with no form using NotebookWrite
yes, my porposal was that you explain in your answer what exactly it is that you refer to with "text cell". I guess you call a "text cell" one that has a string or TextData as content as opposed to an expression cell which has BoxData as content, which -- as you mentioned -- hasn't anything to do with its style, which can be "Text" or not. It probably also is worth mentioning that some functions (e.g. CellPrint and NotebookWrite) expect low level Cell expression as arguments while others (like CreateDocument) accept higher level stuff like TextCell...