# Derivative of -I (Log[-x] - Log[x]) - why is it zero? [closed]

Mathematica gives the derivative of the function -I (Log[-x] - Log[x]) as $$0$$, but on the real domain the expected result is $$\pi\delta(x)$$ and on complex domain it is much more complicated. Mostly on the complex plane the function is smooth, differentiable and non-constant. Why do I get its derivative zero? How can I get the true expression for the derivative?

The function can be represented as

$$-i(\ln(-x)-\ln x)=2 \arg(-x)-\pi$$

This is the plot of the desired derivative:

It was obtained with the following command:

ComplexPlot3D[-2 Derivative[1][Arg][-x], {x, -3 - 3 I, 3 + 3 I}, WorkingPrecision -> 100]

It is zero only along the real axis.

• @MariuszIwaniuk the derivative function cannot differentiate Sign[x]. Additionally, it is undefined for complex values. The original function is well defined on the whole complex plane. – Anixx Apr 2 at 10:33
• That derivative is zero because of the chain rule. Which means it vanishes on C, not just R. – Daniel Lichtblau Apr 2 at 13:26

LaplaceTransform[-I (Log[-x] - Log[x]), x, s]