Find max/min values of f(x)=cos(x)-sin(x)

  • Thread starter Thread starter ugeous
  • Start date Start date
ugeous
Messages
23
Reaction score
0
Find max/min values of f(x)=cos(x)-sin(x) in the interval of -pi (smaller or equals)x(smaller or equals)pi

I took the derivative and ended up with f`(x)=-sin(x)-cos(x). By setting it equals to zero, i get sin(x)=-cos(x). This is where I'm stuck. Don't know where to go from here.

thx!
 
Physics news on Phys.org
Divide both sides by cos(x). Remember the definition of tan.
 
Hi ugeous. Good work so far.

From the equation, sin (x) = - cos (x)... you have to interpret the answer from a "unit circle" stand point.

Ignore the signs. Pretend the equation reads sin(x) = cos(x). When is sin equal to cos? That's simple... whenever they have the same coordinates (found in Q1 and Q3 at pi/4 and 7pi/4).

Your equation sin (x) = - cos (x) dictates that the sin(x) and cos(x) differ by a difference in sign. For what values will sin (x) and cos(x) have the same numerical value but different sign? (ie: when is it -sqrt(2)/2 for one and sqrt(2)/2 for the other).
 
I would have started with
f(x)=cos(x)-sin(x)=2sin(pi/4)cos(x+pi/4)
from your approach
sin(x)=-cos(x)
sin(x)^2=cos(x)^2
sin(x)^2+cos(x)^2=1
sin(x)^2=1/2
|sin(x)|=1/sqrt(2)
cos(x)^2=1/2
|cos(x)|=1/sqrt(2)
 
Last edited:
Dick said:
Divide both sides by cos(x).
cute
Dick said:
Remember the definition of tan.
Which one?
 
lurflurf said:
Which one?

The one that defines tan in terms of sin and cos, I think. Or maybe it's a theorem depending on how you define things.
 
lurflurf said:
I would have started with
f(x)=cos(x)-sin(x)=2sin(pi/4)cos(x+pi/4)
from your approach
sin(x)=-cos(x)
sin(x)^2=-cos(x)^2
sin(x)^2+cos(x)^2=1
sin(x)^2=1/2
|sin(x)|=1/sqrt(2)
cos(x)^2=1/2
|cos(x)|=1/sqrt(2)

Can you explain this line:

sin(x)^2+cos(x)^2=1
sin(x)^2=1/2 --> How did you jump from the former to this line?

and by squaring both sides of the equation, are you not adding "false roots?"

lurflurf said:
cute

Which one?

he's talking about tan x = sin x / cos x
 
carlodelmundo said:
Can you explain this line:

sin(x)^2+cos(x)^2=1
sin(x)^2=1/2 --> How did you jump from the former to this line?

and by squaring both sides of the equation, are you not adding "false roots?"
false roots will be added, but we will just discard them.
(1) sin(x)^2+cos(x)^2=1
Is true for all x
(2) sin(x)^2=cos(x)^2
is true for the unknown x
thus
sin(x)^2+sin(x)^2=1
(replace cos(x)^2 in (1) by sin(x)^2 as allowed by (2))
2sin(x)^2=1
sin(x)^2=1/2
|sin(x)|=1/sqrt(2)
find all such x (hint obvious)
then exclude those that do not satisfy
sin(x)=-cos(x)
 
Thanks sir. that makes sense
 
  • #10
OK, I see. I used Dick's method (seems to be the fastest), and got the correct answer for maximum value(check with calculator), but how would I find the minimum value here? Equation that gave me max value was tan (x) = -1. Do I just need to use a different method for min value?
 
  • #11
You should have found two critical points where f'(x)=0 on the interval [-pi,pi]. Check the values at both of them and don't forget to check the values at the endpoints as well. Draw a rough graph of the function to keep it clear in your head.
 
  • #12
This question is driving me crazy...

I did find critical point, but I can't seem to find the second one. I know that usually you have more than one critical point when x can be more then one value, and still satisfy the equation. In this case, I had sin(x)=-cos(x). By dividing both sides by cos(x) i got sin(x)/cos(x)=-cos(x)/cos(x) which gives me tan(x)=-1. That's how I found the first x value. I found the second x value by using graphing calculator, and even when i plug it into tan(x)=-1, the equation is still valid. I'm just missing a step where I need to get to that x value algebraically. I'm not sure how I can do that.
 
  • #13
You know exact values for trig functions at certain angles because you know the relations between the sides of a 45-45-90 triangle and a 30-60-90 triangle. A graphing calculator not telling you this. Look at a graph of sin and cos. sin(-pi/4)=(-sqrt(2)/2), cos(-pi/4)=sqrt(2)/2. So tan(-pi/4)=-1. What are the values at 3*pi/4?
 
  • #14
-sqrt2/2, sqrt2/2 i believe.
 
  • #15
Sure. And -pi/4 and 3*pi/4 are your critical points, right?
 
  • #16
Right!
 
  • #17
Finally got it! Thank You!
 
Back
Top