Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This looks like a very trivial question, but I could not find an answer on the web or my usual math references.

Suppose I have an inequality of the form $f(x) + g(x) \leq 0$ where $f$ and $g$ are, say, $C^2$. When is it allowed to take the derivative w.r.t. $x$ of both sides of the inequality without reversing the $\leq$ sign or otherwise doing something illegal? I know that if I have an identity $f(x) + g(x) = 0, \; \forall x \in \mathbb{R}$, then it is of course permissible to take derivatives of it, but not for a general equality.

Thanks in advance!

share|cite|improve this question
This generally can't be done. Consider something like $h(x)= x +x\sin(1/x)$, $x>0$ (this is for $\Bbb R^+$; but, suitable alterations can be made to provide a counterexample in all of $\Bbb R$. The point is $f$ can be small but $f'$ can nevertheless be big). – David Mitra Feb 16 '12 at 16:43
up vote 6 down vote accepted

After taking the derivative, the inequality need not hold in either direction. As a counterexample: Let $f(x)=1$ and $g(x)=\cos( x)$. Then $f(x)+g(x)\ge 0$ for all $x$ in $\Bbb R$; but $f'-g'$ takes on both positive and negative values.

I don't think there are any general conditions that give you what you want, other than those that actually give the inequality for the derivatives.

What goes wrong here, is that in most cases, given a smooth function $f$ that satisfies a given inequality, it is possible to find another function that satisfies the same equality but whose derivative takes on arbitrarily large positive and negative values (make the graph of $f$ "wavy" by, for example adding the term $\alpha\sin(\beta x)$ where $|\alpha|$ is small and $\beta$ is big).

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.