Finding the maximum value of $f(x)=x+\sin x$ on $[0,4]$

703 Views Asked by At

Suppose I am trying to find the absolute maximum of: $f(x) = x + \sin(x)$

on the interval $[0,4].$

  • $f(0) = 0 $
  • $f(\pi) = \pi$
  • $f(4) = 4 + \sin(4)$

My professor taught us how to rationalize that $f(4) > f(\pi)$. However, I cannot remember what he said. How do I rationalize this, given that I do not have a calculator available?

3

There are 3 best solutions below

0
On BEST ANSWER

Note that $f'(x)=1+\cos(x)\ge 0$. Thus, the function is monotonically increasing (i.e. for every $x\le y$, we have $f(x)\le f(y)$). If we check $f'(\pi)$, we see $f'(\pi)=0$, so it may not be strictly increasing at $\pi$, but notice that at all values other than odd integer multiples of $\pi$, we have $f'(x)>0$, so $f$ is strictly increasing everywhere else. Thus, $f(4)>f(\pi)$ because $f'(x)>0$ on the interval $(\pi,4]$.

Edit: To see that $\pi$ is not a maximum, you can also use the second derivative test. Note that $f''(\pi)=-\sin(\pi)=0$, and $f'''(\pi)=-\cos(\pi)=1$, so in fact the derivative of $f$ has a minimum at $\pi$. Thus, the derivative cannot be going from positive to negative, and $f$ cannot have a local maximum at $\pi$.

0
On

$f'(x)=1+\cos x$ which is $\ge 0$ thus function is monotonically increasing.

now $1+\cos x=0$ then $\cos x = -1$ and hence $ x \in (2n+1)\pi$ where $n=0,\pm1,\pm2,\dots$ (but since $x \in [0,4]$, then in our case we only have $n=0$).

$f''(x)= -\sin x$. At $x=\pi$, $f''(x) =0$ and so $f$ has a minimum at $x=\pi$ and thus the maximum value of $f$ is at $x=4$.

0
On

Since $f'(x)=1+\cos x\ge0$ for all $x$, we have $f(x)\le f(y)$ whenever $x\le y$. In particular, $f(x)\le f(4)$ for all $x\le4$. Now if we had $f(c)=f(4)$ for some $c\lt4$, then $f(c)\le f(x)\le f(4)$ for all $x\in(c,4)$ would imply the function $f$ is constant in that interval, which would imply $f'(x)=1+\cos x=0$ for all $x\in(c,4)$. But $\cos x=-1$ only at isolated values of $x$ (namely odd multiples of $\pi$), not over entire intervals. So we must have $f(c)\lt f(4)$ if $c\lt4$. In particular, $f(\pi)\lt f(4)$.