# Minimum of piecewise defined function

## Homework Statement

[/B]
Let ##f:ℝ→ℝ## such that ##f(x)= \left\{
\begin{array}{l}
2x^4+x^4sin(\frac{1}{x}), x≠0 \\
0 , x=0 \\
\end{array}
\right. ##

a.) Prove ##f## is continuous and differentiable everywhere. Find the (global) minimum (##f(x_0)##) of ##f## and point ##x_0##.
b.) Prove there doesn't exist half-open interval ##[x_0,b[##, ##b>x_0##, where ##f'(x)≥0## ##∀x∈[x_0,b[##.

## The Attempt at a Solution

a.) When ##x≠0##, ##f## is continuous as a sum of continuous functions and ##f'(x)=8x^3+4x^3sin(1/x)-x^2cos(1/x)##.

When ##x=0##, ##f## is continuous because ##\lim_{x \rightarrow 0} 2x^4+x^4sin(\frac{1}{x})=...=0=f(0)## and ##\lim_{x \rightarrow 0} \frac{2x^4+x^4sin (1/x)-0}{x-0}=\lim_{x \rightarrow 0} 2x^3+\lim_{x \rightarrow 0}x^3sin (1/x)=0+0=0=f'(0)##.

My idea is to show that ##f(x)>0## if ##x∈]0, π/2[ ##and ##f(x)<0## if ##x∈]-π/2, 0[##. Then 0 would be local and therefore global minimum?

b.) no idea

Last edited:

Q.a :
I agree with the proof of continuity you've given when ##x\neq 0##. You didn't prove differentiability when ##x\neq 0## but a similar argument will do.
For continuity and differentiability in 0, I believe you are jumping to a conclusion. You assume (correctly) that ##x^4 \sin(\frac{1}{x}) \to 0 ## and ##x^3 \sin(\frac{1}{x}) \to 0 ## as ##x\to 0## but you don't show it. I believe it is part of a complete answer to show it.
For the global minimum, note that the sine function takes value in ##[-1,1]##, and therefore ##f(x) \ge x^4 ## when ##x\neq 0##, and ##f(0) = 0##. So what is the global minimum ?

Q.b :
I suggest you plot on Wolfram function ##f'## and zoom in around ##x_0##. What does it suggest ?
How could you use sequence ##x_n := \frac{1}{2n\pi}##, ##n \ge 1 ## to prove the statement ?

##f(x)≥x^4>0 \,∀x∈ℝ\setminus{0}## and ##f(0)=0## when ##x=0##, so ##f(x)≥0 \, ∀x∈ℝ##
Therefore minimum is 0 and ##x_0=0.## And the sequence converges to 0.

##f'(1/(2πn))<0##
##1/(2πn)## is irrational because π is irrational and since irrational numbers are dense in ℝ, there always exists 1/(2πn)∈[0,b[ such that ##f'(1/(2πn))<0##.

Last edited:
Ok for the global minimum.

For Q.b, I insist, graph the function with a visualization tool, and zoom in around ##0^+##, at different orders of magnitude.
What do you see ? What can you conjecture ? How does sequence ##x_n## prove that conjecture ?

You should observe that ##f'## oscillates about the x-axis as you zoom in around ##0^+##, at multiple orders of magnitude, meaning that the sign of ##f'## alternates as you get closer to zero. One can think that these oscillations occur indefinitely, this is to say that the sign of ##f'## alternates indefinitely, as you get closer and closer to 0.

You can then conjecture that there exists a positive sequence ##\{x_n\}## that tends to 0 at infinity, and such that ##f'(x_n) < 0## starting from rank ##N##.

You should observe that ##f'## oscillates about the x-axis as you zoom in around ##0^+##, at multiple orders of magnitude, meaning that the sign of ##f'## alternates as you get closer to zero. One can think that these oscillations occur indefinitely, this is to say that the sign of ##f'## alternates indefinitely, as you get closer and closer to 0.

You can then conjecture that there exists a positive sequence ##\{x_n\}## that tends to 0 at infinity, and such that ##f'(x_n) < 0## starting from rank ##N##.
I still don't get it. And rank N means n>1? How do I know that ##f'(x_n)<0## always. And where does the sequence come from? From the graph?

Last edited:
The question was to show that in any interval in the form ##[0,b[##, there exists ##x## such that ##f'(x) < 0##. What is interesting with this question is that one can use the computer in order to get an intuition of the answer.

When you graph the function and see what looks like endless oscillations near 0, you get the intuition that no matter how small ##b## is, you will always find in these oscillations an ##x\in[0,b[## for which ##f'(x) < 0##.

Now, what is interesting with the positive sequence that tends 0 is that after a rank ##N##: ##x_n \in [0,b[ ##.
If furthermore, there exists a rank ##N'## such that after this rank, ##f'(x_n) < 0##, then

##n \ge \max(N,N') \Rightarrow x_n\in [0,b[\text{ and } f'(x_n) < 0 ##

Which is what we have to prove.

Okay. By intuition, let ##x=\frac{1}{2πn}(>0), n∈ℕ##.
Now ##f'(\frac{1}{2πn})=...=\frac{4-πn}{4πn^3}<0##, when n>1. I conjecture there exists the positive sequence ##x_n=\frac{1}{2πn}, n>1##. It is obvious (?), that ##x_n## tends to 0 as x approaches infinity. So by the definition of convergence ##n>n_ε ⇒ |\frac{1}{2πn}-0|<ε## (ε is arbitrary and positive) and ##f'(\frac{1}{2πn})## is negative which means that derivative of ##f## is negative arbitrarily close to point ##x=0##, so one cannot construct an interval ##[0,b[## where ##f'(x)≥0 \, ∀x∈[0,b[##.

Last edited:
No, you don't conjecture that ##n\to 1/2n\pi## exists! It does exist since it is perfectly defined as soon as ##n > 0##!

The only thing you conjecture is that their exists a sequence that will at a time or another fall within ##[0,b[## because it approaches 0 by the right side, and at a time or another (not necessarily the same time) verify ##f'(x_n) < 0## because ##f'## oscillates near 0. Conjecturing stops here !

I didn't conjecture anything about ##n\to 1/2n\pi##, I just realized that it's one of the most simple sequence that goes to 0 by the right side and forces ##f'## to go negative.

I will give up then, I have tried my best.

And I have tried the best of my best to help you

And I have tried the best of my best to help you
What's wrong with my proof above?

I wouldn't say incorrect, because the ideas are there, but the wording is so strange that it looks like you don't understand.
Firstly because you start a formal proof by writing "By intuition", which I find very hard to swallow.
Secondly because you conjecture something that obviously exists.

I wouldn't say incorrect, because the ideas are there, but the wording is so strange that it looks like you don't understand.
Firstly because you start a formal proof by writing "By intuition", which I find very hard to swallow.
Secondly because you conjecture something that obviously exists.
The wording may sound a bit strange because I am not a native English speaker. So the proof is not incorrect except the wording?

I don't know, post it in your language and hopefully someone who understands it will tell you. Good luck.

pasmith
Homework Helper

## Homework Statement

[/B]
Let ##f:ℝ→ℝ## such that ##f(x)= \left\{
\begin{array}{l}
2x^4+x^4sin(\frac{1}{x}), x≠0 \\
0 , x=0 \\
\end{array}
\right. ##

a.) Prove ##f## is continuous and differentiable everywhere. Find the (global) minimum (##f(x_0)##) of ##f## and point ##x_0##.
b.) Prove there doesn't exist half-open interval ##[x_0,b[##, ##b>x_0##, where ##f'(x)≥0## ##∀x∈[x_0,b[##.

## The Attempt at a Solution

a.) When ##x≠0##, ##f## is continuous as a sum of continuous functions and ##f'(x)=8x^3+4x^3sin(1/x)-x^2cos(1/x)##.

Or, "When $x \neq 0$, $f$ is differentiable as it is a composition of differentiable functions. A differentiable function is necessarily continuous."

When ##x=0##, ##f## is continuous because ##\lim_{x \rightarrow 0} 2x^4+x^4sin(\frac{1}{x})=...=0=f(0)## and ##\lim_{x \rightarrow 0} \frac{2x^4+x^4sin (1/x)-0}{x-0}=\lim_{x \rightarrow 0} 2x^3+\lim_{x \rightarrow 0}x^3sin (1/x)=0+0=0=f'(0)##.

My idea is to show that ##f(x)>0## if ##x∈]0, π/2[ ##and ##f(x)<0## if ##x∈]-π/2, 0[##. Then 0 would be local and therefore global minimum?

It suffices to observe that for $x \neq 0$ we have $-1 \leq \sin(x^{-1}) \leq 1$ and thus $0 < x^4 \leq f(x) \leq 3x^4$. Hence a global minimum is obtained at $f(0) = 0$.

(Incidentally, this also establishes continuity at 0 by the squeeze theorem.)

b.) no idea

As you later observe, by inspection (not intuition), if $x = 1/(2n\pi)$ for some $n \in \mathbb{N}$, then $f'(x) = 8x^3 - x^2 = x^2(8x - 1)$. This is negative when $x < \frac18$, which can be achieved by taking $n \geq 2 > \frac{4}{\pi}$.

You don't need to discuss the limit as $n \to \infty$ of $1/(2n\pi)$ which is obviously zero; you can instead just observe that if $b > \frac18$ then $n = 2$ suffices, and if $b \leq \frac18$ then any $n > \max\{2,1/(2\pi b)\}$ will do.

Ray Vickson