1

Given $f(x)=4-e^{-\cos(x-2)}$

Find the maximum value of $f(x)$ in the range $[-2,0]$.

$\forall a \in \mathbb R$, $e^a>0$

Hence, the maximum of $f(x)$ will occur when $e^{-\cos(x-2)}$ is a minimum.

$e^a$ will be minimised when $a$ is minimised due to the Upward Concave nature of the $e^a$ function. Hence we have to minimise $a$.

On $[-2,0]$, $-\cos(x-2)$ will be minimised when $\cos(x-2)$ is maximised. The latter function is maximised in the given range when $x=0$.

Hence, I can deduce that max{ $f(x)$} on $[-2,0]$ = $3.631896388$.

I'm not sure if i'm right about this though and I was wondering if there was a more direct method to deduce this.

ViktorStein
  • 4,838
Danxe
  • 1,695

2 Answers2

0

This is correct and in my opinion, in this special case, it actually works better than the derivative method.

In general, the steps to find maximum or minimum of a continuous function $f(x)$ in a closed interval $[a,b]$ are:

  1. Find $f'(x)$ and set $f'(x)=0$ to find the critical points.
  2. Check whether the critical points are in the interval. The ones left and the boundary points $a,b$ are candidates for max and min.
  3. Plug the critical points and $a,b$ into $f(x)$ and compare the result. The largest one is the maximum and the smallest one is the minimum.

In your problem, the critical point is $2$, which is not in the interval. You then need to compare $f(-2)$ and $f(0)$ and compare their values. This gives you the same result.

KittyL
  • 16,965
  • Oh thanks for that. So it's relatively similar to the technique used in finding the max and min of a multivariable function. Thanks for clarifying!! – Danxe Jan 24 '16 at 13:01
0

We can write the function as $ \ f(x) \ = \ \large{4 - \frac{1}{e^{ \cos(x-2)}} } \ \normalsize $ in evaluating your reasoning. Since you are seeking the maximum value of this function on $ \ [-2 \ , \ 0] \ \ , \ $ you would want $ \ \large{ \frac{1}{e^{ \cos(x-2)}} } \ \normalsize $ to be as small as possible, and hence $ \ e^{ \cos(x-2)} \ \ $ to be as large as possible. Since $ \ e^x \ $ is a strictly increasing function of $ \ x \ \ , \ $ you then want to find the largest value of $ \ \cos(x-2) \ $ on the interval.

The transformation $ \ \cos x \ \rightarrow \ \cos(x-2) \ $ translates the cosine function on the interval $ \ [-4 \ , \ -2] \ $ to the interval of interest. The only "critical point" of $ \ \cos(x-2) \ $ in $ \ [-4 \ , \ -2] \ $ is $ \ \cos (-\pi) \ = \ -1 \ \ , \ $ which unfortunately is the "wrong" kind of extremum for our purposes. Instead, we must apply the Extreme Value Theorem and examine the cosine values at the endpoints of the interval. We can conclude without consulting a graph that, as $ \ -4 \ $ is closer to $ \ -\pi \ $ than $ \ -2 \ $ is, and $ \ \cos x \ < \ 0 \ $ at all of these values of $ \ x \ \ , \ $ we have the chain inequality $ \ \cos(-\pi) \ < \ \cos(-4) \ < \ \cos(-2) \ \ . \ $ Therefore, $ \ \cos(x-2) \ $ is greatest on $ \ [-2 \ , \ 0] \ \ $ at the endpoint $ \ x \ = \ 0 \ \ , \ $ making the maximal value of $ \ f(x) \ $ on the interval $ \ \large{4 - \frac{1}{e^{ \cos(-2)}} } \ \approx \ \large{4 - \frac{1}{e^{-0.41615}} } \ \normalsize {\ \approx \ 4 - 1.51611 \ \approx \ 2.48389 } \ \ . \ $ (This last is the only point I disagree on: I believe the numerical value you show is $ \ 4 - \frac{1}{e} \ \ . \ ) $

The extremization using calculus would involve checking $ \ f'(x) \ = \ -e^{ -\cos(x-2)} · [ \ \sin(x-2) \ ] \ = \ 0 \ \ $ on $ \ [-2 \ , \ 0] \ \ . \ $ Since the exponential factor is never zero, we solve $$ \sin(x-2) \ \ = \ \ 0 \ \ \Rightarrow \ \ x \ - \ 2 \ \ = \ \ \ldots \ , \ -2 \pi \ , \ - \pi \ , \ 0 \ , \ \pi \ , \ \ldots \ $$ $$ \Rightarrow \ \ x \ \ = \ \ \ldots \ , \ 2 - 2 \pi \ \ , \ \ 2 - \pi \ \ , \ \ 2 \ \ , \ \ 2 + \pi \ , \ \ldots $$ to find the only critical point in the interval to be $ \ x \ = \ 2 - \pi \ \ . \ $ However, the second derivative function $$ f''(x) \ = \ -e^{ -\cos(x-2)} · [ \ \sin^2(x-2) \ + \ \cos(x-2) \ ] $$ is positive for this value of $ \ x \ \ ( \ f''(2 - \pi) \ = \ - [ \ >0 \ ] · [ \ 0 \ + \ (-1) \ ] \ ) \ \ , \ $ so we see again that this is a relative (and, as it turns out, absolute) minimum of the function. An argument such as that given above, or just direct testing of numerical values at the interval endpoints, shows us that $ \ f(0) \ $ is the maximal value on the given interval.

In this situation, your application of the properties of the function is "quicker" than following an extremization procedure, as remarked upon by KittyL.