3,646 reputation
1636
bio website
location China
age
visits member for 1 year, 11 months
seen 5 hours ago

Feel free to correct the grammar mistakes in my posts.


Apr
29
comment NDSolve - sampling for result during the computation
@drN OP has chosen method "FixedStep", so the step size can be controlled by StartingStepSize, I think MaxStepFraction and MaxStepSize will also work (haven't tested yet), but I don't know how to control time step size in more general cases (for example PDEs), too.
Apr
25
comment Solving the Helmholtz equation in polar coordinates
DSolve isn't good at solving PDE, and this is just one of the PDEs it can't handle (at least now), see here for details. If your final target is to get a numeric solution, consider NDSolve. Also, you can refer to this answer.
Apr
25
comment NDSolve - sampling for result during the computation
Have you considered doing the simulation piece by piece i.e. first calculate {t, 0, 10^-4}, then {t, 10^-4, 2 10^-4} and so on?
Apr
25
comment What is the efficient way to code Successive Over-relaxation (SOR) method in Mathematica?
If you just want to solve the equations rather than practicing programming SOR method, just use LinearSolve, your self-made solver will probably never have a chance to beat it.
Apr
24
comment What is the efficient way to code Successive Over-relaxation (SOR) method in Mathematica?
Can you please explain what's SOR method and add your code?
Apr
22
comment Integrate does not accept my integrand expression
Oh, I didn't notice this, the syntax is incorrect, it should be 0 < u < 2 Pi, and after adding this, the integration becomes slower and I don't want to wait, but deleting the assumption for u yields the same result as the {u, 0, 2Pi} case.
Apr
22
comment Integrate does not accept my integrand expression
Nothing special, I just ran your code. Seems that my result of Integrate is different from yours. Have you tried the code with a fresh kernel?
Apr
22
comment Integrate does not accept my integrand expression
For your new piece of code, v8.0.4 gives {0, -(1/2) π ((Infc + Refb) Cos[u] + (Infb - Refc) Sin[u]), DirectedInfinity[-I Sign[Infb]], 1/2 π ((Infc - Refb) Cos[u] + (Infb + Refc) Sin[u]), 0}.
Apr
22
comment Integrate does not accept my integrand expression
@HaoWu Check my edit. BTW, my friend still can't get f Pi/m with his Maple 18 even with the assumption m!=0, can you provide the code?
Apr
21
comment Integrate does not accept my integrand expression
Seems that I've made some kind of mistake Saturday. Today I retried Assumptions option inside Integrate and it gives the correct result. See the answer for details.
Apr
19
comment Integrate does not accept my integrand expression
The integration with Assumptions option inside Integrate just finished and it gave back the input 囧. A friend of mine has also tried Maple 18 but it gave back the input (Maybe it's because he isn't good at Maple? ). Also, when m = 0, the result isn't actually f Pi/m but f Pi (1 - 2 Log[R]). As to the integration without assumptions, the results of that from 0 to 2 Pi and from -Pi to Pi seem to be the same when Element[m, Integers], and though a direct substitution of m won't work, we can get a simplified result for a specific m with Limit.
Apr
19
comment Integrate does not accept my integrand expression
You're right. Seems to be a bug at least to v8.0.4. BTW, if I introduce the assumptions with Assumption option of Integrate, the calculation seems to last forever. Maybe you can report it to Wolfram company?
Apr
19
comment Integrate does not accept my integrand expression
v8.0.4 evaluates to 0.
Apr
18
comment If doesn't compile if its output is the output of Compile?
@OleksandrR. In fact it's that question that motivate me to ask this one (I've noticed this behavior for some time), I read it but still failed to notice it's an identical issue 囧.
Apr
18
comment Linear interpolation over 2 variables
It's hard to give suggestions without a specific code sample, can you add one?
Apr
17
comment Derive a PDE from other PDEs
In addition, to avoid downvotes I suggest you to show your specific effort on solving this rather than just pasted the question here and vaguely said you have "read some material". BTW, you forgot to give the definition of $\rho$.
Apr
17
comment Compile with array operations
@brama Er……for example, you've used a lot of AppendTo, I'm not sure if it's because you're following the rule of thumb "the more my code inside Compile looks like C code I'd write otherwise, the more I benefit from it", but if it's what your original code looks like, you'd better set some effort on avoiding it. BTW, AppendTo is even disliked inside Compile, see this post for details. A complete discussion for this issue might need a whole book 囧, have you already read Leonid's excellent book?
Apr
17
comment Compile with array operations
@brama See my edit. (Links for CopyTensor are added above Update.)
Apr
16
comment Solving System of Nonlinear with Three Differential Equations
@bobthechemist OK, let me elaborate it into an answer.
Apr
16
comment Dsolve is not solving equation ( 3 system with 2.order diferantial equations)
I think you're looking for @b.gatessucks right? :D