1
$\begingroup$

Using first derivative test for extrema, show that $$f(x) = \begin{cases} 2x+3 &\mbox{if } x<0 \\ -3x+1 & \mbox{if } x\geq 0. \end{cases}$$ has neither neither local maximum or local minimum at $0$ but the function $$g(x) = \begin{cases} 2x+3 &\mbox{if } x>0 \\ -3x+1 & \mbox{if } x\leq 0. \end{cases}$$ has a minimum at $0$.

Attempt: $$f'(x) = \begin{cases} 2 &\mbox{if } x<0 \\ -3 & \mbox{if } x> 0. \end{cases}$$ $f'(x)>0$ for $x\in (-\delta, 0)$ and $f'(x)<0$ for $x\in (0,\delta)$ for some $\delta>0$, so $f(x)$ has local maximum at $0$. I don't know where I have made a mistake. Please help.

..................................................

The First Derivative Test

Let f be a continuous function, and let c be a critical point.

  1. If $f'(x)$ changes sign from positive to negative at c, then f has a local maximum value at $c$.

  2. If $f'(x)$ changes sign from negative to positive at $c$, then $f$ has a local minimum value at $c$.

  3. If $f'(x)$ DOES NOT change signs, then there is no local extreme value at $c$.

2 Answers 2

2

Considering the terminologies:
$\qquad - \space$ Local minimum/maximum $\,\equiv\,$ Minima/Maxima.
$\qquad - \space$ Global minimum/maximum $\,\equiv\,$ Minimum/Maximum.
Let: $$ f(x) = \begin{cases} f_{{\small1}}(x)=+2x+3 &\colon x<0 \\[2mm] f_{{\small2}}(x)=-3x+1 &\colon x=0 \\[2mm] f_{{\small2}}(x)=-3x+1 &\colon x>0 \end{cases} \qquad g(x) = \begin{cases} g_{{\small1}}(x)=-3x+1 &\colon x<0 \\[2mm] g_{{\small1}}(x)=-3x+1 &\colon x=0 \\[2mm] g_{{\small2}}(x)=+2x+3 &\colon x>0 \end{cases} $$ Because $\,f_{{\small1}}(0)=3 \ne 1= f_{{\small2}}(0)\,\,\,$ and $\,\,\,g_{{\small1}}(0)=1 \ne 3= g_{{\small2}}(0)\,$,
both $f(x)$ and $g(x)$ have $\,\color{red}{{\small\text{discontinuity at}}\,x=0}$, and first derivative test is not applicable as is.
Nevertheless, we still can apply the theorem on each interval and treat $x=0$ as an endpoint.


For $f(x)$: $$ \begin{cases} f'_{{\small1}}(x)=+2\,\,{\small\left\{\text{increasing}\right\}}\, &\colon\,x\in\,]-\infty,\,0[ \space\Rightarrow\quad\,f_{{\small1}}(0)=3\,\,{\small\text{is a Maximum}} \\[2mm] f'_{{\small2}}(x)=-3\,\,{\small\left\{\text{decreasing}\right\}}\, &\colon\,x\in\,]0,\,\,\,+\infty[ \space\Rightarrow\quad\,f_{{\small2}}(0)=1\,\,{\small\text{is a Maximum}} \end{cases} $$ Thus at $\left(x=0\right)$, $f(x)$ dos not have any minimum/minima, and may have a maximum if $f(0)=f_{{\small1}}(0)$. Unfortunately, $\,\left\{f(x)=f_{{\small2}}(x)\,\colon\,x=0\right\}\,$; Hence, $f(x)$ does not have any maximum/maxima at $x=0$.


For $g(x)$: $$ \begin{cases} g'_{{\small1}}(x)=-3\,\,{\small\left\{\text{decreasing}\right\}}\, &\colon\,x\in\,]-\infty,\,0[ \space\Rightarrow\quad\,g_{{\small1}}(0)=1\,\,{\small\text{is a Minimum}} \\[2mm] g'_{{\small2}}(x)=+2\,\,{\small\left\{\text{increasing}\right\}}\, &\colon\,x\in\,]0,\,\,\,+\infty[ \space\Rightarrow\quad\,g_{{\small2}}(0)=3\,\,{\small\text{is a Minimum}} \end{cases} $$ Thus at $\left(x=0\right)$, $g(x)$ dos not have any maximum/maxima, and may have a minimum if $g(0)=g_{{\small1}}(0)$. Indeed, $\,\left\{g(x)=g_{{\small1}}(x)\,\colon\,x=0\right\}\,$. Hence, $g(x)$ does have minimum at $x=0$.


enter image description here

1

HINT: Check the values in a small neighbourhood of $0$, which is the only possible point from the derivative test (the derivative is equal to zero or doesn't exist).

Edit: Function $f$ is not continuous, $f(0)=1$ and in any small neighbourhood we can find values greater than $1$ ($f$ tends to 3 from the left-hand side) and certainly less than $1$.

  • 0
    I have checked that and written above. See my attempt.2017-01-23
  • 0
    @user1942348 But it it seems that you haven't noticed, that the function $f$ is not continuous.2017-01-23
  • 0
    Please see the edited part of the question. $g(x)$ is not also continuous at 0. Although it has min2017-01-23