3
$\begingroup$

I'm trying to help a friend of mine solve this problem. It's been like 10 years since I took calculus please help:

Find min/max values of $y = \sin x + \cos x$ on $[0, 2\pi)$

Thanks.

I've got this much:

  • $f'(x) = \cos x - \sin x$.
  • $0 = \cos x - \sin x$.
  • $\sin x = \cos x$.
  • $\tan x = 1$.

Thanks

Evaulate at end points and at the critical point:

  • $f(0) = 1$
  • $f(2\pi) = 1$
  • $\sin x = \cos x$ at $\pi/4$

Hence, $f(x)$ has a minimum at $\pi/4$ and $f(x)$ has a maximum at $x = 0$ on $[0,2\pi)$ (Extreme Value Theorem)

  • 0
    $\sin x=\cos x$ at another point in your interval. Also at $\pi/4$ the value of $\sin x + \cos x$ exceeds 1, so the value at 0 is not the maximum.2011-01-16

3 Answers 3

5

No, you don't get $\tan x = 0$; you would get, at best, $\tan x = 1$ (remember that $\tan x = \frac{\sin x}{\cos x}$. If $\sin x$ and $\cos x$ are equal, then the quotient is equal to $1$, not to $0$).

So, you remembered that you want to find the critical points (points where the derivative is zero). That's good. What you also need to remember is that if you have a continuous function on a closed interval, then the maximum and the minimum will each be achieved at either a critical point or an endpoint.

Here, you might as well work over $[0,2\pi]$ (the value at $2\pi$ is the same as the value at $0$). So the maximum and the minimum of $f(x)$ will be achieved either at $x=0$, or at a point where $f'(x)=0$, that is, a point where $\sin(x) = \cos(x)$ in the interval (better to work with these, since this equality does not depend on $\cos(x)\neq 0$, whereas $\tan(x)=1$ does; of course, it does not really matter here because if $\cos(x)=0$, then $\sin(x)\neq \cos(x)$).

So, the question is: for what points $x$, $0\leq x\leq 2\pi$, do you have $\sin(x)=\cos(x)$? There are two such points; once you have them, simply evaluate the original function at these points, and at $x=0$ (where it has the same value as at $x=2\pi$, which is why we were able to add $2\pi$ to the interval for simplicity). The largest value you get is the maximum, the smallest value you get is the minimum.

  • 0
    "simply evaluate the function at these points" the function or the derivative?2011-01-16
  • 0
    Good answer. I suppose you were simplifying things by saying that the endpoints should be checked, even though it is unnecessary for a periodic function (unless the endpoint happens to be a critical point)?2011-01-16
  • 0
    @subt13: "The function": the original function. The derivative will be zero at the critical points.2011-01-16
  • 0
    I've updated my answer. How's that look?2011-01-16
  • 0
    @Jonas Meyer: Yes, of course you don't really need to check endpoints if the function is periodic *and* the interval includes at least one full period; here I wasn't using that the function is periodic, just that $f(0)=f(2\pi)$ so that we can work on the finite closed interval. We would have to mention that the function is periodic and that it is of period $2\pi$; seems like as much work as to plug in $0$ and evaluating...2011-01-16
  • 0
    @subt13: You miscalculated the values at $\pi/4$ and at $-\pi/4$. Again, you don't want to evaluate the derivative at the critical points and at the endpoints, you want to evaluate **the original function.** This because the Extreme Value Theorem tells you that the maximum and the minimum of $f(x)$ will be either at an endpoint or at a point where $f'(x)=0$.2011-01-16
  • 0
    Ok, to make sure I understand: f(0) = 1 and f(2pi) = 1, correct?2011-01-16
  • 0
    @subt13: Yes; $f(0) = \sin(0)+\cos(0) = 0 + 1 = 1$; $f(2\pi) = \sin(2\pi)+\cos(2\pi) = 0+1 = 1$. And $\sin(\pi/4) = \cos(\pi/4) = \sqrt{2}/2$.2011-01-16
  • 0
    @subt13: Also, please try to use mark-up. See how I edited your original question for how to get mathematical symbols to show up. If you prefer, I can edit it for you as well, but I would wait until you are done making changes.2011-01-16
  • 0
    Sorry about the markup, first time on here.2011-01-16
  • 0
    I believe I have the answer.2011-01-16
  • 0
    @subt13: No, you don't. $f(0)=f(2\pi)=1$. $f(\pi/4) = \sqrt{2}$. And you forgot to check the last point where the derivative is $0$, which you miscalculated (it's not $3\pi/4$ and it's not $-\pi/4$, it's $5\pi/4$). And $f(5\pi/4) = \sin(5\pi/4)+\cos(5\pi/4) = -\sqrt{2}/2 - \sqrt{2}/2 = -\sqrt{2}$. So, the values you get at $0$, $\pi/4$, $5\pi/4$, and $2\pi$ are $1$, $\sqrt{2}$, $-\sqrt{2}$, and $1$, respectively. Which is the largest, and which is the smallest?2011-01-16
  • 0
    largest is sqrt(2) and minimum is - sqrt(2)2011-01-16
  • 0
    I suppose I should try doing this in the morning instead at midnight hahaha2011-01-16
3

An other thing you might try is to simplify the original function using trigonometric formulas.

Recall the addition formula for the sine function: $$\sin(A+B)=\sin(A)\cdot\cos(B)+\sin(B)\cdot\cos(A).$$ Using this we see $f(A)\cdot C=\sin(A)\cdot C+\cos(A)\cdot C=\sin(A+B)$, provided $\cos B =\sin B=C$. Next, we have $$1=\sin^2 B+\cos^2 B=2C^2$$ hence we get $$f(A)=\sqrt{2}\sin(A+B) \quad \text{ or }\quad f(A)=-\sqrt{2}\sin(A+B)$$ which shows that the maximal possible value of $f$ is $\sqrt{2}$ and the minimal possible value is $-\sqrt{2}$. (Looking at the "circle-definition" of sine and cosine it is easy to see where these values are attained -- on the line $y=x$).

  • 0
    My friend showed me how the teacher solved it. The teacher didn't use calculus at all. She did it like you just did. Turns out he hasn't taken calculus yet. Thanks for the answer.2011-01-16
  • 0
    @subt13: Ok, thanks - it is a standard method that works for expressions of the form $A\cdot\sin x+B\cdot\cos x$.2011-01-16
1

Let $$f(x)=\sin(x)+\cos(x)$$

Thus

$f(x)^2 = (\sin(x)+\cos(x))^2 = \sin(x)^2+2\sin(x)\cos(x)+\cos^2(x) = 1+\sin(2x)\Rightarrow$

$0\le f(x)^2 \le 2 \Rightarrow -\sqrt{2}\le f(x)\le\sqrt{2}$

How $f(\frac{\pi}{4})=\sqrt{2}$ and $f(\frac{5\pi}{4})=-\sqrt{2}$, then the maximum value is $\sqrt{2}$ and the minimum is $-\sqrt{2}$

  • 0
    This is a nice alternative too.2018-02-23