How do you prove a function g has a max and min and that f of g does not have a max on R?

82 Views Asked by At

Question: Let g: $\mathbb{R}$ $\to$$\mathbb{R}$ be a function (not necessarily continuous) which has a maximum and minimum on $\mathbb{R}$.Let $f:$ $\mathbb{R}$ be a function which is continuous on the range of g. Does $f$ of $g$ necessarily have a maximum on $\mathbb{R}$? Prove your answer, or provide a counterexample.

How exactly do I solve this? I have no conception on what to do? My guess was that I could use $sin(x)$ or some other trig function?

3

There are 3 best solutions below

0
On

The answer is no.

We can build $g$ as follows: set the maximum and minimum to be $\pm 1$, by setting $g(1) = 1, g(-1) = -1$. Set everything in between $-1$ and $1$ to be anything that's not $0$, like say $\frac 12$.

Now for the rest of the function, make $g(x)$ always be positive for $x>1$, but tend to $0$, and similarly, make $g(x)$ always be negative for $x<-1$, but tend to $0$.

Now we choose $f: [-1,1] \to \mathbb{R}$ which is continuous and attains a unique maximum at $x=0$ (there are many such examples; you could simply take a triangular spike, or take $\cos(x)$, for example). Clearly, $f(x)$ will get arbitrarily close to its maximum at $0$, since $g$ tends to $0$ at either end, but $f(x)$ will never actually attain this maximum.

2
On

Let $f=1/x$ and let $g$ be some appropriate function whose range contains $(0,1)$, for example $g(x)=x$ on $(0,1)$ and $-1$ for negative values and $1$ for values greater or equal than $1$. Then $f\circ g$ is unbounded.

0
On

Consider the following two $\mathbb R \to \mathbb R$ functions, identical except at a single point:

  • $f(x)=\frac{1}{1+x^2}$, which is continuous, taking values in $(0,1]$

  • $g(x)=\frac{1}{1+x^2}$ for $x\not=-1$ and $g(-1)=-\frac12$, taking values in $\{-\frac12\}\cup (0,1]$ and having a maximum of $f(0)=1$ and a minimum of $f(-1)=-\frac12$

Then $f(g(x))=\frac{(1+x^2)^2}{1+(1+x^2)^2}$, which does not have a maximum, but does have a supremum of $1$ which is approached as $x \to \pm \infty$ and looks like

enter image description here

This is a variant of hdighfan's suggestions