# Prove a $2$-dimensional function is nonnegative

This question arose when I am considering the disturbed Generating Moment Function (GMF) of a Bernoulli random variable. Mathematically speaking, given a Bernoulli random variable $$X$$ with mean $$p$$, we define its disturbed GMF as $$\varphi_\varepsilon (t) \;=\; \mathbb{E} (e^{t(X - p - \varepsilon)}) \;=\; p e^{t(1-p-\varepsilon)} + (1-p) e^{-t(p+\varepsilon)}.$$ I want to prove for any $$p\in [0, 1]$$ (since it is the probability), for any $$\varepsilon > 0$$, $$\varphi_\varepsilon (4 \varepsilon) \le 1,$$ which is equivalent to $$f(p, \varepsilon, \theta) \;=\; e^{\theta\varepsilon (p+\varepsilon)} - p e^{\theta\varepsilon} + p - 1 \;\ge\; 0$$ with $$\theta = 4$$, $$p\in [0,1]$$, and $$\varepsilon > 0$$.

When I tried to solve this, I found that it seems for any $$t\ge 0$$, for any $$x,y\in \mathbb{R}$$, $$f(p, \varepsilon, t) \ge 0$$, and the equality holds when $$x=0$$. I wonder if there is any way to solve this problem, or the former specific case. Any comment helps.

• To be clear, $t=4$? I am asking because you kept $t$ variable in the last paragraph. Commented Jan 26 at 9:07
• Thank you for comment. In the original problem, it is equal to $f(p, \varepsilon, 4) \ge 0$. However, it seems that the inequality holds for all nonnegative $t$. For clarity, I will change a variable so that it will not contradict with the first definition. Commented Jan 26 at 9:11

First, we claim that if $$\theta > 8$$, there exist $$p\in (0, 1)$$ and $$\varepsilon > 0$$ such that $$e^{\theta\varepsilon (p+\varepsilon)} - p e^{\theta\varepsilon} + p - 1 < 0$$. Indeed, let $$f(\varepsilon) := e^{\theta\varepsilon (p+\varepsilon)} - p e^{\theta\varepsilon} + p - 1$$. We have $$f(0) = 0$$, $$f'(0) = 0$$, and $$f''(0) = p^2\theta^2 - p\theta^2 + 2\theta = \theta^2(p - 1/2)^2 - \frac{\theta(\theta - 8)}{4}$$. Thus, if $$\theta > 8$$, there exists $$p \in (0, 1)$$ such that $$f''(0) < 0$$. Thus, there exist $$p \in (0, 1)$$ and $$\varepsilon > 0$$ such that $$f(\varepsilon) < 0$$.

Second, we have the following result.

Fact 1. Let $$\theta \in [0, 8]$$, $$p \in [0, 1]$$, and $$\varepsilon > 0$$. Then $$e^{\theta\varepsilon (p+\varepsilon)} - p e^{\theta\varepsilon} + p - 1 \ge 0$$.

Proof of Fact 1.

Taking logarithm, it suffices to prove that $$F(\varepsilon) := \ln\left(e^{\theta\varepsilon (p+\varepsilon)} + p - 1\right) - \ln p - \theta\varepsilon. \tag{1}$$

We have $$F'(\varepsilon) = \frac{\theta(p + 2\varepsilon)e^{\theta\varepsilon (p+\varepsilon)}}{e^{\theta\varepsilon (p+\varepsilon)} + p - 1} - \theta \ge 0. \tag{2}$$ (The proof of (2) is given at the end.)

Also, we have $$F(0) = 0$$. Thus, $$F(\varepsilon) \ge 0$$ for all $$\varepsilon > 0$$.

We are done.

Proof of (2).

It suffices to prove that $$(p + 2\varepsilon)e^{\theta\varepsilon (p+\varepsilon)} \ge e^{\theta\varepsilon (p+\varepsilon)} + p - 1$$ or $$1 - p \ge (1 - p - 2\varepsilon)e^{\theta\varepsilon (p+\varepsilon)}.$$

We only need to prove the case that $$1 - p - 2\varepsilon > 0$$. It suffices to prove that $$1 - p \ge (1 - p - 2\varepsilon)e^{8\varepsilon (p+\varepsilon)}$$ or $$G(\varepsilon) := 1 - p - (1 - p - 2\varepsilon)e^{8\varepsilon (p+\varepsilon)} \ge 0.$$

We have $$G'(\varepsilon) = 2e^{8\varepsilon (p+\varepsilon)} (2p + 4\varepsilon - 1)^2 \ge 0.$$ Also, we have $$G(0) = 0$$. Thus, $$G(\varepsilon) \ge 0$$ for all $$\varepsilon > 0$$.

We are done.