3,736 reputation
1838
bio website
location China
age
visits member for 2 years
seen 1 hour ago

Feel free to correct the grammar mistakes in my posts.


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
Apr
16
comment Dsolve is not solving equation ( 3 system with 2.order diferantial equations)
Well, so v9 can solve this set of equations? With v8.0.4, I only got the original input returned…
Apr
16
comment Solving System of Nonlinear with Three Differential Equations
Then you must have once mixed up = and ==. You need Clear[Derivative]. Values stored in Derivative can't be cleared by Clear["Global`*"] because it actually means clearing all the variables under context "Global`" while Context[Derivative] gives "System`".
Apr
16
comment Derive a PDE from other PDEs
You can refer to this post: mathematica.stackexchange.com/a/6428/1871
Apr
15
comment Compile with array operations
Precisely speaking, I suggest you to at least avoid function definition based on pattern-matching. (see this post for details. )