derivative of (N + x) \log \frac{N + x}{(N + 2x) p} + x \log \frac{x}{(N + 2x)(1 - p)} in x