Reputation
5,958
Next privilege 10,000 Rep.
Access moderator tools
Badges
2 10 72
Impact
~59k people reached

Apr
1
comment Poisson PDE in a rectangular domain
"I would like it for any geometry" - 如果这就是你的终级目标的话,那么,我在你的第一个问题里给出的代码本来就是适用于任何二维直角坐标系下的泊松方程的,你只需要把开头用于指定区域的部分稍微改改就行——‌​‌​‌​你要是看不懂我的答案那你完全可以在下面追问。Translation: If this is your ultimate goal, then the code in my answer for your first question is completely suited for the task, you just need to modify the part defining the region i.e. rulei and ruleo. If you have any difficulty in understanding, feel free to continue to ask in the comment under my answer.
Mar
29
comment 4th-order Runge-Kutta method to solve a system of coupled ODEs
@Prasanta NDSolve does stop at 0.9576, but have you noticed that it begins from 1 because your initial condition is given at η = 1? BTW, what's your first language?
Mar
29
comment 4th-order Runge-Kutta method to solve a system of coupled ODEs
@Prasanta Since I'm the author of this post, you don't need to add "@xzczd" to remind me. In my view the most vital part of your problem is, you haven't even find a way to solve your nonlinear ODE. It's easy to create nonlinear ODE, but solving it can be really hard. I suggest you to first make sure if your equations are correct (incorrect translation for the real problem isn't rare!), and consider carefully if you really need your equations to be so complicated. Simplify your model if possible. Diving into the hell of looking for proper combination of options of NDSolve is the last choice.
Mar
28
comment 4th-order Runge-Kutta method to solve a system of coupled ODEs
If RunnyKine doesn't appear in the comment under this question, then the "@" won't work. And why are you still adding whitespace between "@" and the name?
Mar
28
comment 4th-order Runge-Kutta method to solve a system of coupled ODEs
(Sigh…) Just found your code in the edit history. This time I've done the edit for you, please check what I've done carefully.
Mar
28
comment 4th-order Runge-Kutta method to solve a system of coupled ODEs
After pasting your code here, select them and press Ctrl+K, or add four whitespaces before each line of code. Things like \[Eta] isn't unreadable for Mathematica user, when pasting back to the notebook, it'll get back to the normal greek letters, and if you want to make your code look better in this site (of course it's encouraged), use the link I gave above to convert those "unreadable" symbol to greek letters!
Mar
28
comment 4th-order Runge-Kutta method to solve a system of coupled ODEs
Just copy and paste (Ctrl+C and Ctrl+V under Windows), as you copy and paste any thing. BTW, if you add a white space before "@" and "xzczd", the reminder won't work. It should be "@xzczd".
Mar
28
comment 4th-order Runge-Kutta method to solve a system of coupled ODEs
Select your code and press Ctrl+Shift+I before copying. And you can also use this to convert your code to make it look better.
Mar
26
comment How to modify a PDE inside NDSolve according to an if condition
Well, I still suggest you to add the missing b.c.s, though NDSolve gives an answer currently, it's not that clear what boundary is added.
Mar
26
comment Delete duplicates by a criteria
And your syntax for DeleteDuplicates is even incorrect.
Mar
26
comment How to modify a PDE inside NDSolve according to an if condition
Is the function f[t, y, x] or f[t, x] or f[y, x]? And you still miss 2 boundary conditions. (A rule of thumb for the necessary number of i.c. or b.c. is that it should be usually equal to the highest order of the corresponding derivative.)
Mar
26
comment Complete definition of special functions in Mathematica
I prefer pressing F1.
Mar
23
comment How to accelerate my code?
@Purboo "I think I need to learn Compile first." - Before that, I suggest you to read the last paragraph of this answer. "Sometimes it is not easy to write code using functions like Apply, Map and Thread. " - Yeah, sometimes, but quite rare in my opinion, in most cases, it's just because you're not familiar enough with the coding style of Mathematica.
Mar
22
comment Coupled non-linear differential equations
@Ricoleto As mentioned above, it's just a result of trial and error. Sadly it seems not to be able to handle Tmax=10, and I haven't think out a corresponding solution yet. I think it might help if you add some background information about your equations to your question. BTW, I just noticed that the b.c. in your code is different from what you claimed in the text i.e. $m(0,t)=m(\pi L,t)=v(0,t)=v(\pi L,t)$, is it intended?
Mar
21
comment Coupled non-linear differential equations
Seems that this hasn't been done yet: Hello, welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign!
Mar
21
comment I have several functions and how I know which one is the maximum in a certain range?
Please post your code instead of the picture so we can test it easily.
Mar
21
comment Protected tag in DSolve
Seems this hasn't been done: Hello, welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign!
Mar
20
comment Solving for flow speed?
"Is there some reason why this approach shouldn't work?" - Because it's a transcendental equation?
Mar
19
comment Very slow mathematica finite differences
@Jinxed When compiled to C, this is probably not true, see this and this for example.
Mar
19
comment Very slow mathematica finite differences
You may find this post interesting.