Is it the right way to find the maximum of a function? (simple query)

55 Views Asked by At

I have a function $f(x)$. I know its derivative is positive for some range of $x<x_1$ and is negative for $x>x_1$. I know this because of the expression for the derivative of the function. Now, since I know that the derivative is strictly positive for $x<x_1$ and strictly negative for $x>x_1$, can I say that the function achieves its maximum value at $x=x_1$?

2

There are 2 best solutions below

2
On

Because it was unstated in your question, I am going to assume that the function in question is differentiable for all real $x$.

If $f(x_1)$ is not the maximum value of $f$, then there is another point $y \in \mathbb{R}$ for which $f(x_1) < f(y)$.

If $y > x_1$ then $\frac{f(y) - f(x_1)}{y-x_1} = f'(\xi)$ for some $\xi \in (x_1,y)$ by the mean value theorem. The quantity $\frac{f(y) - f(x_1)}{y-x_1}$ is positive and so $f'(\xi) > 0$. This contradicts your statement of $f'(x) < 0$ for all $x > x_1$.

Similarly, if $x_1 < y$ we find that there must be a point $f'(\xi) < 0$ for some $\xi < x_1$. Which would also be a contradiction.

Thus there can't be any point $y$ for which $f(y) > f(x_1)$. Indeed, $f(x_1)$ is the maximum value of $f$.

1
On

If $f$ is differentiable for $x \neq x_1$ and continuous everywhere then the $\max$ occurs at $x_1$.

To see this, pick $x<x_1$ then the mean value theorem gives some $\xi \in (x,x_1)$ such that $f(x_1) = f(x)+ f'(\xi)(x_1-x) \ge f(x)$ and similarly for $x_1<x$ we have some other $\xi \in (x_1,x)$ such that $f(x) = f(x_1) + f'(\xi)(x-x_1) \le f(x_1)$.

$f$ need not be differentiable at $x_1$.