3,020 reputation
1629
bio website
location China
age
visits member for 1 year, 8 months
seen 53 mins ago

Feel free to correct the grammar mistakes in my posts.


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 NDSolve_ODESolve_Plotsolution
Just as @Sektor said, that's because NDSolve is a numerical solver, so those parameters need numeric values. Oh, I just tried it and found your equation can be solved by DSolve: Clear[a, v, e]; eqn = (-v a^2/2) ψ''[x] - v Cos[2*Pi*x/a]*ψ[x] == e*ψ[x]; sol = DSolve[{eqn, ψ[0] == 0, ψ'[0] == 1}, ψ, x]. However, to get the plot you still need values for those parameters.
Mar
11
comment NDSolve_ODESolve_Plotsolution
Welcome to mathematica.SE! Then, your code is full of simple mistakes, you'd better make some effort on learning the basic syntax of Mathematica before using it. After removing those mistakes and add values for a, Subscript[V, 0] and E, the equation can be easily solved: a = 1; v = 1; e = 1; eqn = (-v a^2/2) ψ''[x] - v Cos[2*Pi*x/a]*ψ[x] == e*ψ[x]; sol = NDSolve[{eqn, ψ[0] == 0, ψ'[0] == 1}, ψ, {x, 10^-8, 1.005}]; Plot[ψ[x] /. sol, {x, 10^-8, 1.005}]. Also, you may be interested in 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
10
accepted The introduction for Context in Wagner's book is out of date?
Mar
8
awarded  Autobiographer
Mar
8
asked The introduction for Context in Wagner's book is out of date?
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
8
answered The output is the same as Input when I add the boundary conditions to a PDE
Mar
7
awarded  Nice Question
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.