0
$\begingroup$

I have probably asked this question twice and my follow-up comment was deleted by the moderator, claiming that it is not an answer to the question. I will ask it once more, trying to be as clear as possible this time. The function I am dealing with is the local density of states (LDOS) [Please see below]. It is the first diagonal element of a matrix; this matrix is the famous Green function. The definition of the LDOS is the Lim (x->0+) (Im[Gll]), where Gll represents the diagonal elements of the matrix. In these kinds of calculations, they usually add an infinitesimal imaginary part to the frequency (call this part 'x') and take the limit. Obviously performing this limit will give 0 for all values of the frequency. @thorimur and @LukasLang have suggested : Limit[Rationalize[expr] /. Solve[0 == (Rationalize[expr] /. x -> 0 // Denominator)], x -> 0, Direction -> "FromAbove"] // N. However, this also gave a zero, which is not very surprising.

I have tried taking x to be very small but not exactly 0. It obviously works, but then how small should x be? Taking different 'small' values leads to different results: for example, results corresponding to x=0.0001 are different from those corresponding to x=0.0000001. My question is how to perform such an operation in Mathematica? Any help would be highly appreciated. The expression is: (Omega is the frequency. I have already changed Omega to omega + I *x):

(3449.6 - 5568.21 (I x + Ω) + 
3674.52 (I x + Ω)^2 - 
1269.68 (I x + Ω)^3 + 
242.537 (I x + Ω)^4 - 
24.3112 (I x + Ω)^5 + (I x + \
Ω)^6)/(-23904.9 + 45528.9 (I x + Ω) - 
35519.1 (I x + Ω)^2 + 
14741.9 (I x + Ω)^3 - 
3515.16 (I x + Ω)^4 + 
480.263 (I x + Ω)^5 - 
34.5886 (I x + Ω)^6 + (I x + Ω)^7)
$\endgroup$
3
  • $\begingroup$ The approach you describe seems a conceptual calculation device that leads to further simplification or transformation of your expression into a more tractable one. I am not sure that it would translate well to numerical calculation. To answer your direct question, you would probably want to make $x$ as small as possible (What's the smallest positive real allowed in mathematica?). But I would still urge you to dig a bit deeper: the algorithms for manual solution of a problem vs. its numerical solution on a computer May be very different. $\endgroup$
    – MarcoB
    Commented Sep 11, 2022 at 14:16
  • $\begingroup$ "my follow-up comment was deleted by the moderator, claiming that it is not an answer to the question" To clarify your question Edit the question so that anyone interested in the question will see the clarification. $\endgroup$
    – Bob Hanlon
    Commented Sep 11, 2022 at 14:23
  • $\begingroup$ It is difficult to figure out what is wanted here. One thing to note is the numerator and denominator have a few root pairs that are fairly close so expect numerical issues with any analysis near such values. $\endgroup$ Commented Sep 12, 2022 at 16:01

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.