3,878 reputation
1840
bio website
location China
age
visits member for 2 years, 1 month
seen 8 hours ago

Feel free to correct the grammar mistakes in my posts.


Mar
27
comment How to find discretezation error of NDSolve
The last part (Spatial Error Estimates) of this tutorial may be helpful?
Mar
26
comment Trying to solve a differential equation with a piecewise initial condition
DSolve can't handle heat conduction equation, consider NDSolve instead if a numerical solution is OK, or you can refer to this post.
Mar
26
comment ExpToTrig transforms solution to 4th order ODE into unwanted form
How about HoldForm@Evaluate@DSolve[a y''''[x] + b*y[x] == 0, y[x], x] /. E^x_ :> (Cos[-I x] + I Sin[-I x]) ?
Mar
25
comment Do you really want to quit the kernel? Yes!
For a better understanding of the second solution, I think it's better to mention this answer :)
Mar
21
comment Shooting method problem
Your code contains simple mistakes. the third argument of NDSolve should be {x, 0, 10}. What's the meaning of Map here? The equation in your code is different from the one at beginning: is it u''[x] - u'[x]/x or u''[x] - u'[x]? Your i.c. is inconsistent with what you choose in your "StartingInitialConditions", is it u[0.001]==0 or u[0.001]==1? The x[t] in your Plot should be u[t]. After correcting all this, your code can easily give a result with no error.
Mar
17
comment How do I solve a PDE with a strange boundary condition?
@george2079 Wow, this time it seems to be true! If so, it'll be the best news for me about v10 :D
Mar
11
comment Shooting method for solving 3rd Oder ODE with RK method
Seems that since you add a - after my name, I didn't receive the message for your comment. I chose the initial condition y''[0] == 1 for I didn't notice it's just assumed and the actually boundary is f'[Infinity] == 1, then, if you want to apply shooting method, you may be interested in this and this post.
Mar
11
comment Are there some other ways to solve a second PDE except DSolve?
You can refer to this answer.
Mar
11
comment Spherical harmonic derivative
The problem seems to be caused by the Gamma function generated by the direct derivation. Observe the result of Derivative[2, 0][SphericalHarmonicY[3, 3, #, #2] &] and try Limit[Derivative[2, 0][SphericalHarmonicY[3, 3, #, #2] &] /. Gamma[a_] -> Gamma[a + c], c -> 0][th, ph] // Simplify. Not sure if it's a bug or just the property of SphericalHarmonicY.
Mar
11
comment Finding differences between Pi with varying number of decimals
Nice update. It's a pity that I can't upvote twice for one post :)
Mar
10
comment Finding differences between Pi with varying number of decimals
Yeah, that's just where I feel confused, the rule for the decision of the precision isn't so clear here. Maybe I should start a new question?
Mar
10
comment Finding differences between Pi with varying number of decimals
@MarkMcClure But according to Michael E2's explanation, a non-zero value which can be exposed by FullForm should be hidden in a, since 34/10 and Pi have numerical difference :)
Mar
10
comment trying to speed up sequential use of NDSolve for large system of ODEs
Well, it's really hard to give suggestions without a specific example. Considering the description you give, all I can say is, I think Compile won't help much, since NDSolve is a high-level function.
Mar
10
comment Finding differences between Pi with varying number of decimals
Then how to explain the result of a = N[34/10, 2] - N[Pi, 1]; SetPrecision[a, 3]?
Mar
10
comment Finding differences between Pi with varying number of decimals
Speak of this, I feel quite confused about how Mathematica decide the precision of the result produced by the calculation of numbers with arbitrary precision. (For this case, Precision[N[Pi, 2] - N[Pi, 1]] outputs 0., while one may guess the result should be 1. by intuition. ) The document seems not to explain this… have I missed something?
Mar
10
comment The introduction for Context in Wagner's book is out of date?
@IstvánZachar Another interesting thing is that I didn't notice this question has already been asked……I usually have a quick scan at our homepage every day and in fact I knew this question might be asked around Mar 4, but I still overlooked it. Very suspicious :D
Mar
8
comment Fitting data using a series of Sin and Cos
And to make this fitting success, the index of fitted function should start from $i=0$ :)
Mar
6
comment Fourier transformation of HeavisideTheta functions
I guess it might be related to this and this.
Mar
5
comment Problems with NDSolve and stiffness
Do you mind fixing OP's code in this way? In fact it's not the first time I see this method suggested, but I never find a specific example in this site.
Mar
3
comment Shooting method for solving 3rd Oder ODE with RK method
Where's the definition of m? Then your equation involves simple mistake, y*(D[y[x], {x, 2}])^2 should be y[x] (D[y[x], {x, 2}])^2. Finally, I tried to set m = 1, and this equation is easily solved by NDSolve.