Let $f$ be a real, continuous, twice differentiable function satisfying $f(x)f''(x) \neq 0 \ \forall x $, prove that $f(x)f''(x)>0$. Let $f$ be a real, continuous, twice differentiable function satisfying $f(x)f''(x) \neq 0 \ \forall x $, prove that
$f(x)f''(x)>0$.
I can see why this should be true .
Suppose otherwise, then if $f(x)>0$ implies $f''(x)<0$ and this means the graph is concave downwards and it must continue decreasing after some point without changing concavity and thus $f(x)=0$ giving a contradiction. Similar for other case when $f(x)>0$.
So my question is how to rigorously prove this?
Any help would be appreciated?
 A: I guess that $f$ is defined on the whole real line. This is a slight different approach.
We first note that $f$ is not constant and therefore there is $a\in\mathbb{R}$ such that $f'(a)\not=0$. Moreover, by the intermediate value properties, both $f$ and $f''$ have constant sign over the real line.
If $f(x)>0$ and $f''(x)<0$ then $f$ is strictly concave and the graph of $f$ lies below the tangent line at $a$:
$$f(x)\leq f'(a)(x-a)+f(a)\qquad \tag{*}$$
If $f'(a)<0$ then take the limit as $x\to +\infty$ and it follows that the RHS of (*) goes to $-\infty$ and therefore also $f(x)$ is eventually negative. Contradiction.
Similarly, if $f'(a)>0$ then take the limit as $x\to -\infty$ and it follows that the RHS of (*) goes to $-\infty$ and therefore also $f(x)$ is eventually negative. Contradiction.
Along the same lines, by using concavity, we exclude the case $f(x)<0$ and $f''(x)>0$.
Thus we may conclude that $f$ and $f''$ have the same sign and $f(x)f''(x)>0$.
A: The hypothesis $f(x)f''(x) \neq 0$ implies that $f$ does not vanish, so by continuity, it keeps a constant sign. Let's suppose that for all $x$, one has $f(x) > 0$. Such a function cannot be concave on $\mathbb{R}$, so there exists $x$ such that $f''(x) \geq 0$.
But because $f''$ is a derivative, then by Darboux theorem, it satisfies the intermediate value property. Moreover, $f''$ does not vanish, so $f''$ keeps a constant sign. We deduce that $f''(x) > 0$ for all $x$, and so $f(x) f''(x) > 0$ for all $x$.
The case where $f(x) < 0$ is similar.
