3,676 reputation
1737
bio website
location China
age
visits member for 2 years
seen 22 mins ago

Feel free to correct the grammar mistakes in my posts.


Feb
5
comment Green's Function in Mathematica
Your first code sample doesn't work? It is solvable in v8.0.4.
Feb
5
comment Kinetic Friction in Mathematica, weird behaviour
I found it, see the 3rd approach in my answer.
Feb
4
comment refer to result of cell above current cell?
Yeah, the number depends on the evaluation order. If you need to use the output of a specified cell for times, it's better to give a name to it.
Feb
4
comment refer to result of cell above current cell?
You can use the index of the output to refer to it. For example, if it's Out[32] you can refer to it by %32.
Feb
4
comment Kinetic Friction in Mathematica, weird behaviour
In v8.0.4, MaxStepSize -> .01 doesn't work, but MaxStepSize -> .03 does. I think that a more strict control for the step is needed, though I don't know how to achieve that…
Feb
4
comment Error in using EventLocator in NDSolve
Without a complete code sample, it'll be hard for others to figure out the reason… If the original definitions of V and G are really long, you can provide a simplified version reproducing your problem. BTW, if you add @xzczd at the beginning of the comment, I'll get a remind.
Feb
1
comment How to choose MaxStepFraction for optimal speed of NDSolve
I just come to mention that all of your MaxStepFraction don't "converge" for L = 5 in v8.0.4. (Vista Home Basic 32bit. BTW, 2GB memory so it can't bear the L = 7.5 case 囧.) And according to my experience, warning messages of NDSolve isn't a big deal for many cases. With the method mentioned in this post your warning will disappear but in fact the result doesn't change much.
Jan
29
comment How to use Compile with NDSolve function for large no of differential equations?
I remembered once I read some material (probably in somewhere inside the document) that said NDSolve will use Compile automatically…
Jan
26
comment Extract the generating curves from a Graphics3d returned from RevolutionPlot3D
@belisarius You got it! It's called "母函数" in Chinese. (There exists a more straight translation "生成函数" though.)
Jan
26
comment Extract the generating curves from a Graphics3d returned from RevolutionPlot3D
@Mr.Wizard Well, I didn't expect it's so hard to find a detailed explanation for this word……Dictionaries (for example, this: thefreedictionary.com/generatrix) do include it though. This word can be found in the wiki page of cone.
Jan
26
comment Extract the generating curves from a Graphics3d returned from RevolutionPlot3D
@Mr.Wizard A equivalent of "generatrix", I believe. "Generatrix" is called 母(mother)线(line) in Chinese.
Jan
26
comment How to choose MaxStepFraction for optimal speed of NDSolve
……Where's your m?
Jan
25
comment Memory consumed by NMaximize with NDSolve
Have you tried it with a fresh kernel? This happens when I start a fresh kernel and run the following 3 lines of code: f[x_?NumericQ]:=……; memInit=……; ListPlot[……
Jan
24
comment Memory consumed by NMaximize with NDSolve
Furthermore, NMaximize seems not to play a role in the memory consuming. (ListPlot@Reap[Do[f[t]; Sow[MaxMemoryUsed[] - memInit], {t, 100}]][[2, 1]] shows similar result. ) Then, let's wait for someone else to answer your question :D (The memory management behind NDSolve is so complicated that it's beyond my reach. )
Jan
23
comment Why I need Evaluate for the Plot of the probability density function of PolyaAeppliDistribution?
Undone. Sorry, I seemed to be a little excited 囧.
Jan
23
comment Why I need Evaluate for the Plot of the probability density function of PolyaAeppliDistribution?
The WorkingPrecision -> 1 method is interesting! And I take the liberty to add some further exploration to your answer, feel free to undo it if you don't like it.
Jan
23
comment Why I need Evaluate for the Plot of the probability density function of PolyaAeppliDistribution?
@rasher Yeah, just enlarge it into an answer :)
Jan
23
comment Why I need Evaluate for the Plot of the probability density function of PolyaAeppliDistribution?
@rasher Oh, I see! Why not give an answer?
Jan
23
comment Add Piecewise functions expanding domains
……Where's your "graph below"?
Jan
21
comment How can I solve my system of differential equations?
@raj You want to use 20/(1 + Exp[2 x/10]) instead of x^2? It's still solvable for DSolve, and there seems to be no root (at least between 0 and 10) in this case!…… :D OK, I actually know you're asking for an approach without DSolve, and the best solution should be this answer together with ParametricNDSolveValue in v9, while I'm still in v8 so I feel unwilling to write an untested example for it. I believe it won't be a hard task, you can have a try. If you still find it difficult, I don't mind adding a v8 approach.