Many problems in science and engineering are related to the analytic continuation and in particular infinitesimal analytic continuation to the upper or lower complex plane, i.e., a generic complex function $f(\omega)$ with real $\omega$ is changed to $$F(\omega)=\lim_{\eta\rightarrow0^+}f(\omega\pm i\eta).$$ In many applications, only the part introduced by $\eta$ is necessary, which is $$A(\omega)=\lim_{\eta\rightarrow0^+}[f(\omega+i\eta)-f(\omega-i\eta)].$$
Question: How to symbolically obtain $A(\omega)$?
A related question here deals with the simplest case (the first formula below), but I am asking about more general cases when symbolic Fourier transform or integral does not work.
Simple Limit
does not work, because the Sokhotski–Plemelj formula
$$\lim_{\eta\to0^{+}} \frac{1}{x\pm i\eta}= \mp i\pi\delta(x) + {\mathcal{P}} {\Big(\frac{1}{x}\Big)}$$
plays a role in the calculation. Here $\delta$ denotes Dirac delta function (DiracDelta
), $\mathcal{P}$ denotes the Cauchy principal value. A more general version of this formula is
$$\lim_{\eta\to0^{+}} \frac{1}{(x\pm i\eta)^{n+1}}= \mp i\pi(-1)^n\frac{\delta^{(n)}(x)}{n!} + {\mathcal{P}} {\Big(\frac{1}{x^{n+1}}\Big)}$$
where $\delta^{(n)}$ denotes the $n$-th derivative of $\delta$-function. But note that all these will just appear as convenient symbols, not to be evaluated anywhere.
Two examples are given below, where all parameters are real. Therefore only the imaginary part is purely generated by $\eta$.
For $f(\omega)=\frac{a\omega+\sqrt{c+\omega^2}}{e}$, we have
\begin{equation}
\begin{split}
A(\omega)&=2i\lim_{\eta\rightarrow0^+}\Im f(\omega+i\eta)\\
&=2i\lim_{\eta\rightarrow0^+}\Im\frac{a(\omega+i\eta)+\sqrt{c+(\omega+i\eta)^2}}{e}\\
&=2i\lim_{\eta\rightarrow0^+}\Im\frac{a(\omega+i\eta)+c+\omega^2+i\eta\frac{\omega}{c+\omega^2}}{e}\\
&=2i\lim_{\eta\rightarrow0^+}\frac{ai\eta+i\eta\frac{\omega}{c+\omega^2}}{e}\\
&=0.
\end{split}
\end{equation}
For $f(\omega)=\frac{a+b\omega}{\omega-c}$ we have
\begin{equation}
\begin{split}
A(\omega)&=2i\lim_{\eta\rightarrow0^+}\Im f(\omega+i\eta)\\
&=2i\lim_{\eta\rightarrow0^+}\Im\frac{a+b(\omega+i\eta)}{\omega-c+i\eta}\\
&=2i\lim_{\eta\rightarrow0^+}\Im\,\{[-i\pi\delta(\omega-c)+\mathcal{P}(\frac{1}{\omega-c})][a+b(\omega+i\eta)]\}\\
&=2i\lim_{\eta\rightarrow0^+}[-\pi(a+b\omega)\delta(\omega-c)+b\eta\mathcal{P}(\frac{1}{\omega-c})]\\
&=-2i\pi(a+b\omega)\delta(\omega-c).
\end{split}
\end{equation}
Here, simple Limit
does not work, which merely gives 0 as shown below.
f[ω_] := (a + b ω)/(ω - c);
Limit[f[ω + I η] - f[ω - I η], η -> 0, Direction -> "FromAbove"]
Edit
We aim at generic functions $f(\omega)$ that can be more complicated than such minimal examples. For instance, $f(\omega)=\frac{a x + \sqrt{c + \omega^2}}{\sqrt{c + \omega^2}}$. Therefore, I think expansion with respect to $\eta$ and keeping the leading order is necessary. Note that due to the limit, only the leading order effect is relevant and higher-order terms can be dropped. Here, the denominator can be put in the form $$\sqrt{c + \omega^2}=\frac{\omega}{\sqrt{c+\omega^2}}(c+\omega^2+i\eta)$$ and the pattern in our formula can be used.
I thought about this for some time, but due to my very limited MMA skill, I don't see how to realize such a calculation.