# Minimum of a trigonometric function involving absolute value

Given $$f(x) = | \sin( | x | ) |$$, I am told to found the local and global minimum and maximum of $$f$$ (If they exist).

Simply from sketching the graph of $$f$$ I get that the function maximizes periodically for every $$x = k \frac{\pi}{2}$$ with $$k$$ being a whole number, giving that there's no global maximum but infinite local maxima equal to $$1$$.

Following the same logic, I thought the function would minimize with period $$\pi$$ to give local minima of $$0$$. However, when checking for the answer, it appears the function has no global nor local minima.

• What are your definitions for local and global minima? To me it seems like there are both. For me, functions which have no global minima are unbounded (like $y = 1/x$). – paulinho Jun 7 at 14:00
• Why do you think $1$ is not the global maximum? It certainly is. Also, $0$ is the global minimum. (I'm assuming $x$ is only allowed to take real values.) – saulspatz Jun 7 at 14:05
• How did you "check answer" and why does it appear there is not minima. Your logic that $|sin |x|| \ge 0$ and $|sin |k\pi|| = 0$ indicate that $0$ are the local/global minimum. So whatever said there were none is wrong. – fleablood Jun 7 at 15:30
• What is interesting to note is that the method of finding local extrema via solving $f'(x) = 0$ will not work here because $|\sin |x||$ is not differentiable at $k\pi$. But solving $f'(x)=0$ is not the only way to have or find extrema. – fleablood Jun 7 at 15:32

Your general reasoning is correct. The global minimum is $$0$$, and it is attained in points of the form $$x = k \pi$$. The global maximum is 1, and it is attained in points of the form $$x= \frac{\pi}{2}+ k \pi$$. Obviously all these global maxima/minima are also local maxima/minima.

I find it very strange that the solution says differently... Are you certain of the expression for $$f$$?

Good insights to start off about the periodicity of the sine function.

Let's think about this in parts - dissecting the function from the outside inward. Remember the definition of absolute value: $$f(x) = | g(x) | = \left\{ \begin{array}{ll} g(x) & g(x) \geq 0 \\ -g(x) & g(x) < 0 \end{array} \right.$$ $$g(x)=\sin(|x|)=\sin\left( \begin{array}{ll} x & x \geq 0 \\ -x & x < 0 \end{array}\right)$$

By definition, the minima cannot be lower than 0. That does not make it the minima of the function, but it is a good check for the result we get.

So what is the maxima/minima of $$\sin(x)$$? $$-1 \leq \sin(x)\leq 1$$ So what is the minima applying the absolute value? $$0 \leq |\sin(x)| \leq 1 \forall x$$ Those are the maxima/minima of the function, regardless of the $$x$$ input. Let's solve for $$x$$: $$\sin x = 0 \rightarrow x = ... ,-2\pi,\pi,0,\pi,2\pi, ...$$ $$\sin x = 1 \rightarrow x = ... ,{-3\pi \over 2},{-\pi \over 2},{\pi \over 2},{3\pi \over 2},...$$ Notice all the negative values, those don't apply since we apply the absolute value to $$x$$. $$x_{min}=0,\pi,2\pi,...$$ $$x_{max}={\pi \over 2},{3\pi \over 2},...$$ There are no local maxima/minima which are not the global maxima/minima.

• "There are no local maxima/minima which are not the global maxima/minima*" (emphasis mine). But there are local maxima/minima that are the local extrema. So for as I know there is no requirement in this question or in any definition that local extrema can not also be global extrema. – fleablood Jun 7 at 15:35
• Nope, there isn't. Just a note I figured I would add. – FundThmCalculus Jun 7 at 15:45

By graphing you function it seems that $$1$$ and $$0$$ are the maximum and minimum values for the result, Why ?
The answer is: it's well known that the trigonometric functions are commonly used for expressing ratios between sides of right angled triangle, between$$(-1,1)$$ each $$\frac \pi 2$$, but by using the absolute value the result can only be positive so the result goes between $$0$$ and $$1$$.

So, the function has a unique global maximum of value $$1$$ at $$x=k \frac \pi 2, k \in \mathbb Z$$ and a unique global minimum of value $$0$$ at $$x=m, m \in \mathbb Z$$.