# Showing the local maximum or minimum, while the function changes sign infinitely often

Please I need a hand in solving this problem:

These 3 functions' values at $0$ are all $0$ and for $x\ne0$, $$f(x)=x^4\sin\frac{1}{x}, \, g(x)=x^4\left(2+\sin\frac{1}{x}\right), \, h(x)=x^4\left(-2+\sin\frac{1}{x}\right)$$

b- Show that $f$ has neither a local maximum nor a local minimum at $0$, $g$ has a local minimum, and $h$ has a local maximum.

The derivatives of these functions change sign infinitely often on both sides of $0$. I couldn't use the 1st nor the 2nd derivative test.

The behavior of these functions is easily handled without using derivatives. Note that for any given open interval $I$ containing $0$ we can find positive integer $n$ such that points $c, d$ given by $$c=\frac{2}{(4n+1)\pi},d=\frac{2}{(4n+3)\pi}$$ lie in $I$ and $f(c) >0=f(0)>f(d)$. So $0$ is neither a local maximum nor a local minimum of $f$.

Functions $g, h$ are easier to handle. For $g$ note that $(2+\sin(1/x))>0$ so that $g(x)$ is positive for all $x$ except $x=0$ and similarly $h(x)$ is always negative except at $x=0$. The desired conclusion follows immediately.

• If $g'(x)=4x^3\left(2+\sin \left(\frac{1}{x}\right)\right)-x^2\cos \left(\frac{1}{x}\right)$; how can I prove that as x gets sufficiently close to $0$, $g'(x)$ attain the same sign of $x$? I know that $2\leq2+\sin \frac{1}{x}\leq3$, but $x^3$ always pulls it down. I think I need to prove that $4x^3\left(2+\sin \left(\frac{1}{x}\right)\right) > x^2\cos \left(\frac{1}{x}\right)$, but I don't know how... Sep 5, 2017 at 9:19
• @AbduMagdy: it appears I wrote the first paragraph in haste. I will edit the answer to fix this. Sep 5, 2017 at 16:06
• Ah! I got it now. Thanks so much!. However I think we need to change slightly your technique regarding $f(x)$ because your both $c$ & $d$ are positive, so they cover only the right side of $0$. But if we put $c=\frac{2}{\left(4n+1\right)\pi }$ and $d=\frac{-2}{\left(4n+1\right)\pi }$, we will always have $d<0<c$ and $f\left(d\right)<0=f\left(0\right)<f\left(c\right)$. As a result, we will always have a change in sign from negative to positive, which means that $f(0)=0$ is neither a maximum nor a minimum. How do you think? Sep 5, 2017 at 18:39
• Another question, please: how did you get to these two numbers; what reasoning did you use? Sep 5, 2017 at 18:45
• @AbduMagdy : $\sin (1/x)$ is positive if $1/x$ is in first or second quadrant. One such value is $2n\pi +(\pi/2)=(4n+1)\pi/2$ and thus I put this value as $1/x$ and therefore $x=2/(4n+1)\pi$. By taking $n$ large we can get near as near to $0$ as we please. Sep 5, 2017 at 19:19

HINT: we have for 1) $$f'(x)=4x^3\sin\left(\frac{1}{x}\right)+x^4\cos\left(\frac{1}{x}\right)\cdot \left(-\frac{1}{x^2}\right)$$ and for 2)$$g'(x)=4x^3\left(2+\sin\left(\frac{1}{x}\right)\right)+x^4\cdot\cos\left(\frac{1}{x}\right)\left(-\frac{1}{x^2}\right)$$ and 3)$$h'(x)=4x^3\left(-2+\sin\left(\frac{1}{x}\right)\right)+x^4\cos\left(\frac{1}{x}\right)\left(-\frac{1}{x^2}\right)$$ additionally use that $$|f(x)|\le x^4$$ and for $$f(x)$$ we have a sign Change from minus to plus $g(x)$ has a sign change from plus to plus $h(x)$ has a sign change for minus to minus.....

• HINT: solve $$f'(x)=0,g'(x)=0,h'(x)=0$$ Sep 4, 2017 at 13:12
• I give up; I can't do it... Sep 4, 2017 at 13:42
• May you solve it with clearer explanation, please? Sep 4, 2017 at 15:05
• ok i will do it in one or two hours, ok? Sep 4, 2017 at 15:06
• ok... Thanks so much Sep 4, 2017 at 15:29