# If $f(x)$ is differentiable in $\mathbb{R}$ & $a,b \in \mathbb{R}, a\neq b$ such that $f'(x)=(x-a)(x-b)$ then $f$ has exactly one local min and max?

If $f(x)$ is differentiable in $\mathbb{R}$ and exist $a,b \in \mathbb{R}, a\neq b$ such that $f'(x)=(x-a)(x-b)$ then $f$ has exactly one local minimum and 1 local maximum

I know that $f'$ has only two roots which are $a$ and $b$ as the possible locations for min and max points, but how do I show these are necessarily or are not necessarily min and max points?

• Check the sign of $f'(x)$ when $x<a$, $a<x<b$ and $x>b$. – Trevor Norton Apr 24 '18 at 15:57
• Use second derivative test i.e. look at $f''(a)$ and $f''(b)$, whichever is $<0$ is the local maximum and whichever is $>0$ is local minimum. First, without loss of generality, assume $a<b$, then proceed with the test – Naweed G. Seldon Apr 24 '18 at 16:00
• mathworld.wolfram.com/SecondDerivativeTest.html – user547564 Apr 24 '18 at 16:02
• Alright cool! Got it thanks guys! – Jason Apr 24 '18 at 16:05

\begin{align} f''(x) = \left( x - b \right) + \left( x - a \right) \end{align} \begin{align} f''(a) = \left( a-b \right) \end{align} \begin{align} f''(b) = \left( b -a \right) \end{align} When \begin{align} a \gt b \end{align} Then \begin{align} f''(a) \gt 0 \end{align} And \begin{align} f''(b) \lt 0 \end{align} When \begin{align} b \gt a \end{align} Then \begin{align} f''(a) \lt 0 \end{align} And \begin{align} f''(b) \gt 0 \end{align} As you can see in both cases we have a local Maxima and minima

• this only proves existence but not uniqueness – Surb Apr 24 '18 at 17:59
• When \begin{align} a\gt b \end{align} then \begin{align} f''(a) \gt 0 \end{align} and \begin{align} f''(b) \lt 0 \end{align} so here \begin{align} a \end{align} is the local minima and \begin{align} b \end{align} is local Maxima also when \begin{align} b \gt a \end{align} then \begin{align} f''(b) \gt 0 \end{align} and \begin{align} f''(a) \lt 0 \end{align} so here \begin{align} a \end{align} is local Maxima and \begin{align} b \end{align} is local minima. So in both cases we have a unique Maxima and minima – Apurv Apr 25 '18 at 1:01
• First, you may want to know that in Mathjax, $f'(a)$ produces $f'(a)$ and $$f'(a)$$ produces $$f'(a)$$. – Surb Apr 25 '18 at 5:36
• So let $c$ be another local Maxima or Minima then so in that case $f'(c) = 0$ and $(c-b)(c-a) = 0$ solving this we get $c=b$ or $c=a$ which means only Maxima or Minima we can have is $a$ or $b$ and when $a \gt b$ $a$ is local minima and $b$ is local Maxima and when $b \gt a$ $a$ is Maxima and $b$ is minima(which I have proven in the answer). So in either case we have a unique Maxima and Minima – Apurv Apr 25 '18 at 8:07
• since $f'$ has only two roots (a,b) then those are the only possible maxima and minima points, and since there exists one of each there is exactly one of each. (basically what @Apruv said but less technically) – Jason Apr 25 '18 at 8:09

Let $a<b$ without loss of generality. For $x<a$ we have $f'(x)>0$, for $x=a$ we have $f(a)=0$ and for $a<x<b$ we get $f'(x)<0$. This can be interpreted as $f$ is increasing up to $x=a$ and then decreases while $x$ approaches $b$ from the left. So $f(a)$ is a maximum. Similarly $f'(b)=0$ and $f'(x)>0$ for all $x>b$ which implies that $f$ once it reaches $f(b)$ starts increasing. So $f(b)$ is a minimum. These two points $a,b$ are the only local extrema since $f'(x)$ vanishes exactly there by its very definition.

• Currently, this is the only correct answer. – Surb Apr 24 '18 at 18:01

The stationary point qualification is done with

$$f''(x) = (x-a)+(x-b) = 2x-(a+b)$$

hence we have

$$f''(a) = a-b\\ f''(b) = -(a-b)$$

so one of then is a relative minimum and the other a relative maximum deppending on $a > b$ or $b > a$