Solving inequalities by creating a function.

I have noticed a few answers involving inequalities proven by creating a function comprised of the terms in the inequality. I hadn't seen this before and was wanting to know more about how to use it.

From what I have seen, it goes something like:

I don't know if this is a good example, but say we wanted to prove: $$\sqrt{x+4} - 2 < \frac{x}{4}$$

If I defined $f$ to be $f(x) = \frac{x}{4} + 2 -\sqrt{x+4}~$ (which would have a domain of $[-4, \infty) \in \mathbb{R}$), then if I can show that it is always positive then this will prove my inequality right?

$$f'(x) = \frac{1}{4} - \frac{1}{2\sqrt{x+4}}$$

$$\sqrt{x+4} = 2$$

$$x = 0$$

So, $x = 0$ is a critical point.

$$f''(0) = \frac{1}{32} > 0$$

Therefore, $0$ is a minimum.

$$f(0) = 0$$

So, $0$ is the minimum value of the function, i.e., $f(x) \geq 0$ for all defined $x$.

Is this all correct? What about the original inequality, how do I account for all $x$, if my function only proved it for $[-4, \infty)$?

Basically, I just wanted to know about the strategy and everything that I can use it for.

-
Your method is spot on, good work. Notice that in the original equality you can only put have $x\in [-4,\infty)$ any way, there's no more $x$ to prove it for. – Ragib Zaman Jun 10 '12 at 14:56
You might be interested in Chapter IV of Hardy-Littlewood-Polya's Inequalities which is more or less all devoted to this technique. By the way, I think that the jargon for $f$ is deficit function. – Giuseppe Negro Jun 10 '12 at 16:21